I've got one of those external Apple iPad Smart Keyboards. I love everything about it except that there are times when it disconnects and I just can't seem to get the iPad to connect to it.
In fact, when I first got it and the new iPad, even the Apple Genius had serious problems getting it to connect, so much so he went to grab another new keyboard.
For a good while, it's been on and off, until I stumbled into a solution buried on an Apple Discussion formum.
Someone discovered that when they go from Airplane mode to WiFi (like in a Starbucks), the keyboard that was working just fine suddenly stops working. That's what I'm seeing.
He further deduced that the problem surfaced when, just after you connect, Apple throws up a "connection web page" where you sign in. It's at this 'dialog' where things go south.
What he discovered was that if you join the network, using the regular iPad screen's keyboard, and once connected drop everything by going into Airplane mode and right back out, you've still got your network connection and the Smart Keyboard springs to life again.
Curiously, while you're in Airplane Mode, the keyboard starts working again.
I've just tried this remotely, and it worked exactly as described.