I had the same issue with 128GB 12.9" iPad getting error message of " This accessory is not supported by this device" for last few months.
I bought the smartkeyboard along with Apple Pen when I purchased the iPad Pro January 2016 from a retailer in Sydney Australia.
It has been randomly worked and frustrating to type with the keyboard.
When I saw the posting of Apple's 3 years warranty offer (1year standard and 2 year extended warranty for Smartkeyboard from 2015), I called Apple support to check if the extended warranty is available in Australia. but Applecare didn't answer the question but ask me to bring it to Genius bar.
After booking the Genius Bar, I took my iPad Pro and Smartkeyboard along with the original case this afternoon. The guy at the Genius bar didn't ask anything but checked if the Smartkeyboard is working without any issue. When he saw the keyboard is not working as intended, he replaced it with a brand new Smartkeyborad straight away.
The whole process was hassle free quick and simple service. Even my keyboard is more than 19months old, they didn't asked but checked the serial number then replaced it with a brand new one at the store.
So don't be bothered fixing by yourself but take it to Apple Genius bar no matter how old the Smartkeyboard is.
Cheers,
Ed