
btstack - issue #21
Keyboard: Option to auto-reconnect to same keyboard with no intervention (upon powerup of either or both device)
(moved from a comment I posted, and edited to expand)
BACKGROUND: Excellent -- thank you very much. As a deaf guy, I often communicate on keyboard even in person. I just purchased a copy of BTStack keyboard and it works perfectly with my ThinkOutside? keyboard. (I've used it for many years on PocketPC's as well as on a BlackBerry? Curve). I'm also a developer too as well. Matthias, I have a big favour to ask of you.... I would like to request that improvements to be made:
FEATURE REQUEST: An option to automatically reconnect to the most-recently connected keyboard when the keyboard is turned back on. Meaning, I can take my iPod/iPhone out of my pocket, open the Bluetooth keyboard, and start typing right away. These could be perhaps two checkboxes:
[X] Keep keyboard always connected [disable sleep] [X] Automatically reconnect to last keyboard [even if not discoverable] Warning: Enabling either or both above options may consume extra battery power.
This is how the keyboard driver on the Windows Mobile, as well as the discontinued BlackBerry? Curve driver (OS 4.2) made by ThinkOutside?. Meaning the keyboard always worked when opened up, although there was often a 2-3 second delay before the text showed up. Either the keyboard driver is continuously reconnecting to the existing pariing (MAC address?) or the keyboard is initiating an incoming connection to the device.
Meaning I would never have to launch the BTstack keyboard app again except to turn on/off the automatic reconnect feature (unless the iPod/iPhone was rebooted).
I know that whenever the keyboard is turned back on, it won't be discoverable. But that works in the keyboard drivers of other devices. This means BTstack would need to memorize what keyboard it paired with last time, and might require polling for it directly "in the blind". I know, this will consume more battery power, but this feature is extremely important to me. (Because I am a deaf guy and I often like to communicate by keyboard --- whipping out my iPod and keyboard, powering up the keyboard, and immediately typing, without needing to unlock the iPhone and launch BTstack first. It should work regardless of which device is turned on first, and should work when the keyboard is powered up (many keyboards, such as ThinkOutside, don't reenable discoverable mode when merely opened up, which powers it on)
Also: This will also solve the following problems too: - Keyboard stopping working if it goes out of range - Keyboard driver stopping working if the keyboard "goes to sleep" on its end (Thinkoutside ultra low power mode) Meaning, BTstack can be made to automatically reconnect when the keyboard is back in range, or when the keyboard is woken up by a keypress.
BTW - when I use on other devices, I noticed that the ThinkOutside? keyboard also has a built in keyboard buffer, and bursts out the last few keypresses once fully reconnected. But you don't have to worry about this feature as I don't mind waiting 2-3 seconds for an automatic reconnect) Can you please add this feature to your BTstack driver too? I offer to pay $50 by PayPal? immediately up front if you can work on this feature and make it available as soon as you are able to.
P.S. BTstack keyboard is the ONLY reason I jailbroke my iPhone! :-) The first app I ever purchased from Cydia (yet).
Comment #1
Posted on Feb 15, 2010 by Swift Ox(No comment was entered for this change.)
Comment #2
Posted on Feb 19, 2010 by Swift CamelDo you need any coding help to make this feature possible? Do I need low-level
Bluetoothk tinkering to do this, or are these simple changes I could do myself?
(I'm a coder myself, though mainly code for BlackBerry, Windows Mobile, and now
Android, but I'm also expanding to iPhone too.)
i.e. - (easy?) Save MAC address of last keyboard to internal settings file - (easy?) Re-autoconnect to that keyboard whenever it sees that MAC (even when running in the background) whenever it sees that keyboard in discoverable mode. - (easy?) Turn off the 15 minute timeout - (harder?) Intermittently poll for that MAC address of the already-paired keyboard, whenever it'd disconnected and isn't 'discoverable' because it may stil be on an nearby.
Please feel free to reply to re-rank the bullets; and which bullets you think can be worked on the already pubicly available btstack source code; and which bullets require modifying the proprietary app?
Any way to help out here?
Comment #3
Posted on Feb 19, 2010 by Swift CamelNote -- this would be one of my first real Bluetooth project, although I have lots of experence with older serial protocols -- I'll have to do some studying on the necessary Bluetooth protocols (especially SDP, HID, etc) before I can even attempt to try and take upon this. If each bullet requires changes to the proprietary app, then I'm out of luck.
Comment #4
Posted on Feb 25, 2010 by Swift Oxhi markybox
i think the best solution would be to handle incoming connections. I've added the missing pieces in BTstack beginning of this month, the rest (all your bullets) is in the "proprietary" code. It's not that much work, but I just lack enough time to do everything I could.
the one thing which is related is to prevent the iPhone from sleeping while BT is on. Currently this is done within the keyboard app, but it should be in the daemon. If you're interested in using/helping with BTstack, please join the dev list. :)
Comment #5
Posted on Feb 25, 2010 by Swift CamelUpon further research, I believe you are right. My keyboard evidently attempts to connect to the host when I press a keypress. So it's not a matter of polling for it, but a matter of ability to accept incoming connections. That would be perfect, I hope.
Less important is iPhone sleeping while BT is on, is to at least make it work automagically:
- Turn on iPod/iPhone (press button)
- Turn on keyboard (which is usually just tap a key)
And the keyboard automatically connects. That's evidently how conveniently it works on other handheld devices including BlackBerry Curve 8300 (OS 4.2 only, using old ThinkOutside driver that doesn't work on OS 4.5), as well as on Windows Mobile devices.
So basically, for now, perhaps some low lying apples (pun intended) can easily be done:
(1) Checkbox "[x] Alway keep Bluetooth on (May use more battery power)" (not necessarily disable sleep mode, that can be a future checkbox "[x] Prevent sleep when Bluetooth on")
(2) Checkbox "[X] Automatically reconnect to last keyboard upon startup of BTStack"
Meaning, I just have to launch BTStack and it will automatically reconnect to my
keyboard when I merely make discoverable.
(Your future rewrite will make this even more convenient, but at least this is an
easy interim step?)
Comment #6
Posted on Feb 25, 2010 by Swift CamelAddendum, when I say 1. Turn on iPod/iPhone (press button) 2. Turn on keyboard (which is usually just tap a key)
I mean, without launching a pairing app or launching BTStack. Meaning, I keep working right away in the same application that was already running when the iPod last went to sleep (when I intentionally press the power button)
I want quick power-off and quick power-on convenient, for sudden nomadic starts and stops of the Bluetooth keyboard -- very important to me.
Comment #7
Posted on Nov 23, 2010 by Helpful ElephantI also would like to express my appreciation for a feature like this to be implemented. I also have the same bt keyboard and find that it has a very small timeout and therefore I am constantly having to reboot my ipad to get the btstack keyboard app to see the keyboard again. (For some reason once the keyboard goes to sleep it has a tough time finding it again and the only surefire way I've been able to solve this is by rebooting). I also echo that this and the bt mouse are the only reasons why I jealbroke my ipad (to use with logmein). Keep up the great work!
Comment #8
Posted on Nov 2, 2012 by Swift Oxhi. I never implemented incoming connections for BTstack Keyboard or Mouse, but I've release BTC Mouse & Keyboard which integrates into iOS Bluetooth. I hope this makes the BTstack Keyboard & Mouse combination obsolete and provides a better user experience as the iOS stack supports re-connection out of the box.
Status: WontFix
Labels:
Type-Enhancement
Priority-Medium