Skip to content
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

Open
saishuuheikika opened this issue Apr 25, 2014 · 25 comments
Open

Pairing does not complete on any keyboard #6

saishuuheikika opened this issue Apr 25, 2014 · 25 comments

Comments

@saishuuheikika
Copy link

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

@Splaktar
Copy link
Contributor

Splaktar commented May 2, 2014

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.

@shanewilliams
Copy link

@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.

@Splaktar
Copy link
Contributor

Splaktar commented May 4, 2014

I got the following logcat from Google+, I'd be happy to review yours as well (splaktar @ gmail .com).

E/        ( 1814): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_dm.c line 1259 unhandled search services event (6) ###
W/bt-btif ( 1814): invalid rfc slot id: 14
W/BluetoothMapClientService( 1814): connection failed
W/BluetoothMapClientService( 1814): java.io.IOException: read failed, socket might closed or timeout, read ret: -1
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:521)
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:320)
W/BluetoothMapClientService( 1814): at com.android.bluetooth.map.BluetoothMapClientService.connect(BluetoothMapClientService.java:260)
W/BluetoothMapClientService( 1814): at com.android.bluetooth.map.BluetoothMapClientService$1.connect(BluetoothMapClientService.java:94)
W/BluetoothMapClientService( 1814): at android.bluetooth.IBluetoothMapClient$Stub.onTransact(IBluetoothMapClient.java:60)
W/BluetoothMapClientService( 1814): at android.os.Binder.execTransact(Binder.java:404)
W/BluetoothMapClientService( 1814): at dalvik.system.NativeStart.run(Native Method)
D/BluetoothMapClientService( 1814): disconnecting...
I/GlassMapProfile( 1690): WorkThread state = PENDING
W/ContextImpl( 1690): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1033 android.content.ContextWrapper.startActivity:311 android.content.ContextWrapper.startActivity:311 com.google.glass.bluetooth.pairing.BluetoothPairingReceiver.onReceive:54 android.app.ActivityThread.handleReceiver:2459 
W/BluetoothAdapter( 1690): getBluetoothService() called with no BluetoothManagerCallback
E/bt-btif ( 1814): DISCOVERY_COMP_EVT slot id:16, failed to find channle, status:1, scn:0
W/bt-btif ( 1814): invalid rfc slot id: 16
I/BluetoothBondStateMachine( 1814): bondStateChangeCallback: Status: 9 Address: 54:46:6B:01:AB:80 newState: 0
D/BluetoothAdapterProperties( 1814): Failed to remove device: 54:46:6B:01:AB:80
I/BluetoothBondStateMachine( 1814): Bond State Change Intent:54:46:6B:01:AB:80 OldState: 11 NewState: 10
I/BluetoothBondStateMachine( 1814): StableState(): Entering Off State
I/PairingPolicy/pairingReceiver( 1690): ACTION_BOND_STATE_CHANGED: Bluetooth FAVI @ [54:46:6B:01:AB:80] NONE
E/bt-btm  ( 1814): btm_sec_disconnected - Clearing Pending flag
E/bt-btm  ( 1814): btm_sec_disconnected() sec_req:0x0  State: 0   reason:0x16 bda:54466b01ab80 RName:Bluetooth FAVI
E/bt-btif ( 1814): Do not find the bg connection mask for the remote device
E/StrictMode( 1690): class com.google.glass.bluetooth.pairing.BluetoothPairingConfirmationActivity; instances=2; limit=1
E/StrictMode( 1690): android.os.StrictMode$InstanceCountViolation: class com.google.glass.bluetooth.pairing.BluetoothPairingConfirmationActivity; instances=2; limit=1
E/StrictMode( 1690): at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
D/btif_config_util( 1814): btif_config_save_file(L153): in file name:/data/misc/bluedroid/bt_config.new
W/bt-sdp  ( 1814): SDP - Rcvd conn cnf with error: 0x4  CID 0x48
E/bt-btif ( 1814): DISCOVERY_COMP_EVT slot id:20, failed to find channle,                                       status:1, scn:0
W/bt-bnep ( 1814): BNEP - Rcvd conn cnf with error: 0x4  CID 0x49
W/bt-sdp  ( 1814): SDP - Rcvd conn cnf with error: 0x4  CID 0x4a
D/BluetoothPanServiceJni( 1814): connection_state_callback(L79): state:2, local_role:2, remote_role:1
E/bt-btif ( 1814): property type:3, len:0 is invalid
E/        ( 1814): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_dm.c line 1199 storing remote services failed (1) ###
W/bt-btif ( 1814): property type:3, len:0 
E/BluetoothRemoteDevices( 1814): devicePropertyChangedCallback: bdDevice: AC:FD:EC:63:0C:FC, value is empty for type: 3
D/BluetoothAdapterProperties( 1814): CONNECTION_STATE_CHANGE: AC:FD:EC:63:0C:FC: 1 -> 0
W/SocketClient( 1151): write error (Broken pipe)

@Splaktar
Copy link
Contributor

Splaktar commented May 8, 2014

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:

if (mBtAdapter.isDiscovering()) {
    mBtAdapter.cancelDiscovery();
}

This is unlikely to solve the pairing issue though.

Update: And in fact all calls to cancelDiscovery() already check isDiscovering().

@Splaktar
Copy link
Contributor

Splaktar commented May 8, 2014

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.

@jimrandomh
Copy link

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.

@Splaktar
Copy link
Contributor

Splaktar commented May 9, 2014

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)
Headset Profile (HSP)
Health Device Profile (HDP)
Health Thermometer profile (HTP)
Heart Rate Profile (HRP)
Human Interface Device Profile (HID, InputDevice)
Message Access Profile (MAP)
Personal Area Networking Profile (PAN)
Audio/Video Remote Control Profile (AVRCP)
Generic Attribute (Gatt, HOGP, BTLE): Bluetooth 4.0 required
Generic Attribute Server (Gatt Server, BTLE): Bluetooth 4.0 required

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?

@shanewilliams
Copy link

@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.

@Splaktar
Copy link
Contributor

Splaktar commented May 9, 2014

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).

@Splaktar
Copy link
Contributor

There is an open issue with the GDK submitted by jimrandomh here: https://code.google.com/p/google-glass-api/issues/detail?id=495

@Splaktar
Copy link
Contributor

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.

@Splaktar
Copy link
Contributor

I've looked into the following:

W/bt-btif ( 1814): invalid rfc slot id: 14
W/BluetoothMapClientService( 1814): connection failed
W/BluetoothMapClientService( 1814): java.io.IOException: read failed, socket might closed or timeout, read ret: -1
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:521)
W/BluetoothMapClientService( 1814): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:320)
W/BluetoothMapClientService( 1814): at com.android.bluetooth.map.BluetoothMapClientService.connect(BluetoothMapClientService.java:260)
W/BluetoothMapClientService( 1814): at com.android.bluetooth.map.BluetoothMapClientService$1.connect(BluetoothMapClientService.java:94)
W/BluetoothMapClientService( 1814): at android.bluetooth.IBluetoothMapClient$Stub.onTransact(IBluetoothMapClient.java:60)
W/BluetoothMapClientService( 1814): at android.os.Binder.execTransact(Binder.java:404)
W/BluetoothMapClientService( 1814): at dalvik.system.NativeStart.run(Native Method)
D/BluetoothMapClientService( 1814): disconnecting...
I/GlassMapProfile( 1690): WorkThread state = PENDING

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).

@Splaktar
Copy link
Contributor

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:

05-10 18:12:23.409  19569-19569/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ Canceled BT discovery.
05-10 18:04:05.784  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ Pairing BT device Microsoft Bluetooth Mobile Keyboard 6000...
05-10 18:04:05.791  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ Device Microsoft Bluetooth Mobile Keyboard 6000 paired.
05-10 18:04:05.799  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ Connecting to device Microsoft Bluetooth Mobile Keyboard 6000...
05-10 18:04:05.799  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/ConnectThread﹕ Creating RFCOMM socket with well known UUID 00001101-0000-1000-8000-00805f9b34fb...
05-10 18:04:05.799  19327-19412/com.recursivepenguin.bluetoothmanagerforglass I/ConnectThread﹕ BEGIN mConnectThread
05-10 18:04:05.807  19327-19412/com.recursivepenguin.bluetoothmanagerforglass W/BluetoothAdapter﹕ getBluetoothService() called with no BluetoothManagerCallback
05-10 18:04:05.807  19327-19412/com.recursivepenguin.bluetoothmanagerforglass D/BluetoothSocket﹕ connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[66]}
05-10 18:04:05.815  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/SliderMenuView﹕ Performed action on 0 : true
05-10 18:04:05.815  19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ BT Discovery finished.

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﹕ Connection failed, trying fallback...
    java.io.IOException: read failed, socket might closed or timeout, read ret: -1
            at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
            at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:521)
            at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:320)
            at com.recursivepenguin.bluetoothmanagerforglass.ConnectThread.run(ConnectThread.java:57)
05-10 18:23:52.580  19696-19734/com.recursivepenguin.bluetoothmanagerforglass E/ConnectThread﹕ Connect to fallback socket failed
    java.io.IOException: read failed, socket might closed or timeout, read ret: -1
            at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
            at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:487)
            at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:324)
            at com.recursivepenguin.bluetoothmanagerforglass.ConnectThread.run(ConnectThread.java:72)
05-10 18:23:52.588  19696-19734/com.recursivepenguin.bluetoothmanagerforglass E/ConnectThread﹕ Unable to connect device Microsoft Bluetooth Mobile Keyboard 6000.
05-10 18:23:53.455  19696-19696/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity﹕ Device paired.

Above were logs from the app, here is what Android is logging after pairing:

05-10 19:29:01.510     890-1284/? W/bt-sdp﹕ process_service_search_attr_rsp
05-10 19:29:01.518     890-1284/? E/bt-btif﹕ DISCOVERY_COMP_EVT slot id:1310, failed to find channle,                                       status:1, scn:0
05-10 19:29:01.518     890-1335/? W/bt-btif﹕ invalid rfc slot id: 1310
05-10 19:29:01.791     890-1284/? W/bt-sdp﹕ process_service_search_attr_rsp
05-10 19:29:01.791     890-1284/? W/bt-rfcomm﹕ PORT_StartCnf failed result:2
05-10 19:29:01.791     890-1335/? W/bt-btif﹕ invalid rfc slot id: 1312
05-10 19:29:03.776     890-1284/? W/bt-sdp﹕ process_service_search_attr_rsp
05-10 19:29:06.346      516-821/? W/InputMethodManagerService﹕ Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@210818f0 (uid=1000 pid=702)
05-10 19:29:06.635     890-1284/? W/bt-sdp﹕ SDP - Rcvd conn cnf with error: 0x4  CID 0x42
05-10 19:29:06.635     890-1284/? E/bt-btif﹕ DISCOVERY_COMP_EVT slot id:1311, failed to find channle,                                       status:1, scn:0
05-10 19:29:06.643     890-1335/? W/bt-btif﹕ invalid rfc slot id: 1311
05-10 19:29:07.916     890-1284/? E/bt-btm﹕ btm_sec_disconnected - Clearing Pending flag
05-10 19:29:07.916     890-1284/? E/bt-btm﹕ btm_sec_disconnected() sec_req:0x0  State: 0   reason:0x16 bda:7c1e52a87f0f RName:Microsoft Bluetooth Mobile Keyboard 6000
05-10 19:31:21.823      516-554/? E/ConnectivityService﹕ Exception trying to remove a route: java.lang.IllegalStateException: command '505 interface route remove wlan0 default 192.168.1.0 24 0.0.0.0' failed with '400 505 Failed to remove route from default table (No such process)'
05-10 19:31:21.823      516-554/? E/ConnectivityService﹕ Exception trying to remove a route: java.lang.IllegalStateException: command '506 interface route remove wlan0 default 192.168.1.1 32 0.0.0.0' failed with '400 506 Failed to remove route from default table (No such process)'
05-10 19:31:21.823      516-554/? E/ConnectivityService﹕ Exception trying to remove a route: java.lang.IllegalStateException: command '507 interface route remove wlan0 default 0.0.0.0 0 192.168.1.1' failed with '400 507 Failed to remove route from default table (No such process)'
05-10 19:31:25.143    702-16652/? E/NetworkSocketThread﹕ failed to listen for network client socket connect
    java.net.SocketException: Socket closed
            at libcore.io.Posix.accept(Native Method)
            at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
            at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
            at java.net.ServerSocket.implAccept(ServerSocket.java:203)
            at java.net.ServerSocket.accept(ServerSocket.java:128)
            at com.google.glass.bluetooth.companion.NetworkSocketThread.runServer(NetworkSocketThread.java:167)
            at com.google.glass.bluetooth.companion.NetworkSocketThread.runInternally(NetworkSocketThread.java:232)
            at com.google.glass.bluetooth.companion.CompanionServerThread.run(CompanionServerThread.java:86)

@mdigiovanni-ra
Copy link

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.
05-10 18:04:05.784 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R Pairing BT device Microsoft Bluetooth Mobile Keyboard 6000...
05-10 18:04:05.791 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R Device Microsoft Bluetooth Mobile Keyboard 6000 paired.
05-10 18:04:05.799 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R Connecting to device Microsoft Bluetooth Mobile Keyboard 6000...
05-10 18:04:05.799 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/ConnectThread¡R Creating RFCOMM socket with well known UUID 00001101-0000-1000-8000-00805f9b34fb...
05-10 18:04:05.799 19327-19412/com.recursivepenguin.bluetoothmanagerforglass I/ConnectThread¡R BEGIN mConnectThread
05-10 18:04:05.807 19327-19412/com.recursivepenguin.bluetoothmanagerforglass W/BluetoothAdapter¡R getBluetoothService() called with no BluetoothManagerCallback
05-10 18:04:05.807 19327-19412/com.recursivepenguin.bluetoothmanagerforglass D/BluetoothSocket¡R connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[66]}
05-10 18:04:05.815 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/SliderMenuView¡R Performed action on 0 : true
05-10 18:04:05.815 19327-19327/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R BT Discovery finished.

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...
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:521)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:320)
at com.recursivepenguin.bluetoothmanagerforglass.ConnectThread.run(ConnectThread.java:57)
05-10 18:23:52.580 19696-19734/com.recursivepenguin.bluetoothmanagerforglass E/ConnectThread¡R Connect to fallback socket failed
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:510)
at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:487)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:324)
at com.recursivepenguin.bluetoothmanagerforglass.ConnectThread.run(ConnectThread.java:72)
05-10 18:23:52.588 19696-19734/com.recursivepenguin.bluetoothmanagerforglass E/ConnectThread¡R Unable to connect device Microsoft Bluetooth Mobile Keyboard 6000.
05-10 18:23:53.455 19696-19696/com.recursivepenguin.bluetoothmanagerforglass D/PairDevicesActivity¡R Device paired.

¡X
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-42756397.


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.

@Splaktar
Copy link
Contributor

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.

@Splaktar
Copy link
Contributor

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:
"Takahiro Horikawa's implementation of the GlassInputDevice protocol over RFCOMM still works, but having to relay input through a companion app running on a KitKat phone is a poor solution when an input device could be paired directly. Especially because this precludes the use of the MyGlass app while that relay connection is established."

I'm guessing that this is referring to: https://github.com/thorikawa/GlassBluetoothProtocol
I'll add this to my list of things to investigate...

@DDRBoxman DDRBoxman changed the title Pairing does not complete on any keyboard XE16 & XE16.11 Pairing does not complete on any keyboard Jun 27, 2014
@DDRBoxman
Copy link
Owner

@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"
https://www.youtube.com/watch?v=ssmix_q_BJQ&feature=youtu.be&t=37m15s

Now we just wait 🕙

@Splaktar
Copy link
Contributor

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:

  1. WearScript can enable this somehow
  2. Hijacking the MyGlass connection and using an app on your phone to proxy the Bluetooth HID input to Glass (lots more work and requires killing the MyGlass app after it has connected to Glass).
  3. If you just need to send small amounts of keyboard input and are connected to a PC, you can send key codes via ADB somehow (haven't spent time yet to figure this out).

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.

@saishuuheikika
Copy link
Author

As it's August 14th already is there any update on this?

@MaTriXy
Copy link

MaTriXy commented Aug 18, 2014

Hi,
Anyone tried option 2 and can give tips?
2. Hijacking the MyGlass connection and using an app on your phone to proxy the Bluetooth HID input to Glass (lots more work and requires killing the MyGlass app after it has connected to Glass).

@AlexBravo
Copy link

I tried option 2 on a Mac. I had a hard time connecting Mac to Glass.
Which tips would you like to have?

@MaTriXy
Copy link

MaTriXy commented Aug 19, 2014

I'm trying to get a Bluetooth
module (mouse profile) to work on glass for a poc .
Doesn't seem to pair and also not work with proper
Key assignment.
How do I start option 2, I'm not familiar with the process

@AlexBravo
Copy link

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.
I paired with Glass from Mac. It should show "Connected" in Mac Bluetooth dialog.

Good luck!

@DDRBoxman
Copy link
Owner

Well looks like there isn't much hope for HID getting fixed now. This was in the last email that Glass sent out:
"New feature development on the Explorer Edition will stop while we work on the next version of Glass, but you can still call or email us anytime with questions, thoughts or feedback."

@Splaktar
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants