-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pairing does not complete on any keyboard #6
Comments
I tried to build an updated version here: https://drive.google.com/file/d/0B7eNn0CRewQ8cHZmclY4d3NFYkE/edit?usp=sharing But I don't have a BT keyboard to test with. Someone on the Glass Developers Google+ community is testing the Favi for me atm. I need to get some logcat output if possible to know what the issue might be. I just added a lot of debug log statements which should help track this down if it is still not working. Note that this is very similar to issue #3 which reports that pairing of keyboards is possible, but that keystrokes do not make it to Glass since XE11. |
@Splaktar I didn't have much time, but I gave your build a quick try and still the same with my Favi and iPazzport keyboards. I can post the logcat here or email it to you. |
I got the following logcat from Google+, I'd be happy to review yours as well (splaktar @ gmail .com).
|
One of these ASSERTs appears to be related to the following AOSP bug: https://code.google.com/p/android/issues/detail?id=40099 The proposed fix is checking if the device is in discovery mode before canceling discovery:
This is unlikely to solve the pairing issue though. Update: And in fact all calls to cancelDiscovery() already check isDiscovering(). |
It looks like in addition to pairing the device, we may need to actually connect to the device (via a RFCOMM socket) in order for it to become usable. This is especially true for a keyboard which needs the socket open to communicate with Glass via its HID profile. I am currently investigating and debugging this. I'm hoping to loan a BT keyboard from a friend soon for additional debugging/testing. |
I'm very eager to have this working. Splaktar, if you email me a shipping address ([email protected]) I'll gift you a Favi FE02BT-BL with Amazon. |
I've been trying to get more information about what BT profiles are expected to work in 4.4.2. Here is what I've come up with so far: Advanced Audio Distribution Profile (A2DP) I was able to pair this loaner Microsoft Bluetooth keyboard to my Nexus 5 (4.4.2) but it took two attempts to be functional. Android recognized the device as an Input Device and handled it quite well. With my current changes, I am able to get Glass to prompt me to type in a keycode via the BT keyboard which is accepted and pairing completes. Are people able to do this with the current version of the app or does this prompt not happen? |
@Splaktar I am able to get Glass to prompt me for the keycode, once entered I get the indication that my keyboard has paired. However, the keyboard does not actually pair with Glass. I've tried this with a Favi, iPazzport and Apple Bluetooth keyboard. All 3 provide the same results. |
OK, that is very helpful, thank you. The pairing is indeed happening. The problem appears to be in the next step which is connecting the device's (BluetoothSocket) and handling it's BluetoothProfile correctly. This is normally automatically handled by Android but hasn't been working in Glass for some period of time now (some say since XE 11, others since XE 16). |
There is an open issue with the GDK submitted by jimrandomh here: https://code.google.com/p/google-glass-api/issues/detail?id=495 |
This issue (https://code.google.com/p/google-glass-api/issues/detail?id=272) appears to suggest that having Glass connected to your phone for data, instead of being on WiFi only, could cause your Bluetooth socket connections to fail. This seems odd since I've seen statements that Android should support 6-7 simultaneous Bluetooth socket connections. I'll do some more testing with my Glass running only on WiFi and my phone's BT disabled. |
I've looked into the following:
It appears to be related to https://code.google.com/p/google-glass-api/issues/detail?id=512 which seems to just cause periodic warning messages (and possible network slowdowns) related to BluetoothMapClientService. This should have nothing at all to do with the handling of a BluetoothInputDevice (keyboard). |
I was investigating how to manage the BluetoothInputDevice profile, but Android has annotated it with the @hide annotation to make it inaccessible in the SDK. There may be a way to use reflection to get around this, but it appears that this should not be needed if Android would handle the device properly. I was able to get Glass Launcher working with XE17 but I don't have a good example app where I can get a text input box. Is there a better way to test if the keyboard is working? Here are some of the logcats that I'm seeing:
The exception I get when trying to connect to a Keyboard after pairing is the following:
Above were logs from the app, here is what Android is logging after pairing:
|
The keyboard should work during normal navigation, left right, to move through the timeline. I've tried a few things myself with BluetoothInputDevice to no avail, I'll post my notes when I get to a computer. Mike dg via mobile On May 10, 2014 6:33 PM, Michael Prentice [email protected] wrote: I was investigating how to manage the BluetoothInputDevice profile, but Android has annotated it with the @hidehttps://github.com/hide annotation to make it inaccessible in the SDK. There may be a way to use reflection to get around this, but it appears that this should not be needed if Android would handle the device properly. I was able to get Glass Launcher working with XE17 but I don't have a good example app where I can get a text input box. Is there a better way to test if the keyboard is working? Here are some of the logcats that I'm seeing: 05-10 18:12:23.409 19569-19569/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R Canceled BT discovery. The exception I get when trying to connect to a Keyboard after pairing is the following: 05-10 18:23:52.502 19696-19734/com.recursivepenguin.bluetoothmanagerforglass E/ConnectThread¡R Connection failed, trying fallback... ¡X The information contained in this email message and its attachments is intended only for the private and confidential use of the recipient(s) named above, unless the sender expressly agrees otherwise. Transmission of email over the Internet is not a secure communications medium. If you are requesting or have requested the transmittal of personal data, as defined in applicable privacy laws by means of email or in an attachment to email, you must select a more secure alternate means of transmittal that supports your obligations to protect such personal data. If the reader of this message is not the intended recipient and/or you have received this email in error, you must take no action based on the information in this email and you are hereby notified that any dissemination, misuse or copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify Roundarch Isobar immediately by email and delete the original message. |
I managed to dig up some data about the Bluetooth module on Glass (https://plus.google.com/106275500228046396154/posts/2dV6RMf2Rwv). As far as I can tell, everything we want should be supported, but it is up to the Glass software developers to implement/enable the functionality. Of course, there still may be workarounds that do not depend on the android.bluetooth stack. |
This is also being tracked as a WishList item that you can give Kudos for here (https://www.glass-community.com/t5/Wishlist-for-Glass/Bluetooth-Accessory-Pairing-userflow-and-HID-Bindings/idi-p/122662). It's quite a well written post. Here is a promising lead from that post: I'm guessing that this is referring to: https://github.com/thorikawa/GlassBluetoothProtocol |
@Splaktar managed to ask the Glass team about this at I/O this year! "Not a priority" but "Really working hard to bring it back" Now we just wait 🕙 |
Yep, I got to attend a Glass Developers event prior to IO which let me get some good info from some of the team. Then while at IO, I was able to have more useful discussions including the questions in the primary Glass session. There appear to be a number of ugly hacks available atm:
None of these 'hacks' above really do what people want which is make using Bluetooth accessories straightforward. One Googler than I spoke with was using a Bluetooth keyboard/glove and he was intentionally running an old version of Glass so that it would work properly. He said that he had requested this fix, but that it was low priority. He encouraged us to get more people to star the issues in the tracker and talk to more Glass guides requesting the functionality if we want the priority raised. They did admit that they wanted to get this fixed ASAP and that Bluetooth headset support was a highly requested feature. Hopefully bringing this up with the first question in the Glass talk helped to raise the priority! At the Glass Developers event at the Google SF office, I was able to speak with Timothy Jordan and Alain Vongsouvanh about these issues along with the stability and lag problems in recent patches. |
As it's August 14th already is there any update on this? |
Hi, |
I tried option 2 on a Mac. I had a hard time connecting Mac to Glass. |
I'm trying to get a Bluetooth |
I'm just a user like you, so take my suggestion with a grain of salt: I installed glass-remote-0.6.0.jar from https://github.com/thorikawa/GlassRemote and it worked for me on my Mac. Good luck! |
Well looks like there isn't much hope for HID getting fixed now. This was in the last email that Glass sent out: |
Yeah, I haven't heard about the plans for the SDK yet. I know that the Explorer program is over, but I would imagine that they would have the same SDK for the new version of Glass. So there should be no reason for them to kill the SDK. But like we've seen, their focus is not on SDK features needed by developers. I will try to reach out to a few people and see if I can get any kind of update on their plans for the SDK between now and the launch of the next version of Glass. Most likely they will do another push of SDK features and developer engagement right before the launch. |
Pairing does not complete on external keyboard. Glass shows paired, but keyboard still sits in discovery mode. Tried with Favi, Microsoft Bluetooth Keyboard, Celluon Epic Laser keyboard. Glass XE16 and XE16.11
The text was updated successfully, but these errors were encountered: