[android-developers] Re: SPP bluetooth
Hello, I've possibly just experienced success with SPP on the HTC Desire here, and I wondered if it's worth reporting. Bear with me here, but I am very new to phone application and Android development (I only just started this weekend) and even Java is new to me (though I am used to using other languages). This is my very first post to this mailing list. I have got a HTC Desire and I wish to create an application that communicates with a piece of hardware that I have constructed myself, which incorporates a CSR Bluecore-based Bluetooth module. The objective is to create an app that can control the hardware over Bluetooth SPP. I am doing my testing with a Bluetooth module that sits on a development PCB, and I'm communicating with its UART lines via HyperTerminal (the module can be controlled using modem-like AT commands, so I can tell it to make a connection using ATDBT_ADDR, and that kind of thing). So the little goal for this weekend was to exchange characters from Hyperterminal, via the RS232 connection and the Bluetooth module, to my Desire. I set up and ran BluetoothChat (API 7, Android 2.1-update1) from Eclipse using my Desire as the target. I found I could pair BluetoothChat with my module, but attempting to connect would fail whether I tried to initiate the connection from the Desire or from the module itself. I did a quick bit of Googling and my heart plummeted when I read these posts that I found about SPP not working. Anyway, I changed the UUID to the value that DonFrench recommended, so that I now have the line: private static final UUID MY_UUID = UUID.fromString(1101--1000-8000-00805F9B34FB); Now, I'm able to connect, and I'm happily exchanging characters between the Chat application and Hyperterminal. The only issue I have seen so far is that sometimes the connection dies when I go away from it for a few minutes - perhaps this is due to a timeout event; hopefully I'll understand why as I learn more. I only have a limited understanding of UUIDs. I know that SPP is 1101. I also did a project a few years ago that involved making a device that communicated with a vast array of mobile phones; I found that 99.9% of phones wouldn't accept connections to 1101 and I had to make my Bluetooth module specify a UUID of 1103 (DUN, if I remember right). Most phones would accept this, allow me to connect, and let me communicate with the phone (and access its SMS, contacts, etc.) using serial AT commands as normal. Anyway, I digress. The point is that I understand why the 1101 is there in DonFrench's UUID string; I recognise that as SPP. What I don't understand is why the original example code contained a UUID that's nothing like 1101. Perhaps I need to have a good read of RFC4122... Anyway, if there's any comments anyone has about what I've reported here, or if there's any more information I can let you guys know (e.g. any firmware numbers from my phone, etc.) please shout. Last but not least, massive thanks to DonFrench. Trev On May 29, 1:03 am, DonFrench dcfre...@gmail.com wrote: I notice that the UUID you are using differs slightly from the one in the final line of the log, where it says onUuidChanged. Could you be using the wrong UUID? On May 28, 2:10 pm, Robert Armstrong rarmstrong...@googlemail.com wrote: I managed to transfer a file from the host PC to theHTCDesireusing Bluetooth - see Word document supplied here:-http://forum.vodafone.co.uk/topic/58936-htc-desire-unable-to-send-fil... I have also tried the SDK supplied BluetoothChat example App. But with UUI changed to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); // HID class And get a similar failure to last posting. When I click on Menu-Connect a Device, after a short delay, I hit a breakpoint at:- ... mmSocket.connect(); } catch (IOException e) { connectionFailed(); *** breakpoint hit on this line ... The logCat trace shows:- 05-28 21:59:00.750: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.760: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.770: DEBUG/BluetoothChat(1385): onActivityResult -1 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): connect to: 00:1B:FB:CE:61:EF 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: BTS 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_alloc_add: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_dump_list: fd (35:35), bta 0, rc 1, wflags 0x8 05-28 21:59:00.780:
[android-developers] Re: SPP bluetooth
I am not sure how to confirm it without access to another kind of handset and a corresponding development environment. On May 30, 1:34 pm, Robert Armstrong rarmstrong...@googlemail.com wrote: I agree they are not the same. However I can confirm the UUID in my modified BluetoothChat is the HID UUID:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); I am not sure why logcat is indicating UUID 110B--1000-8000-00805F9B34FB (Audio Sink Service class) I tried the serial port class mentioned in posts above and the connect completed successfully. SerialPortServiceClass_UUID: TGUID = '{1101--1000-8000-00805F9B34FB}'; So that suggests to me that either the PC or the handset does not support the HID UUID. Any suggestions on how to confirm this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
I agree they are not the same. However I can confirm the UUID in my modified BluetoothChat is the HID UUID:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); I am not sure why logcat is indicating UUID 110B--1000-8000-00805F9B34FB (Audio Sink Service class) I tried the serial port class mentioned in posts above and the connect completed successfully. SerialPortServiceClass_UUID: TGUID = '{1101--1000-8000-00805F9B34FB}'; So that suggests to me that either the PC or the handset does not support the HID UUID. Any suggestions on how to confirm this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
Thanks for your interest... The source code of the second example I posted is identical to the SDK provided BluetoothChat source(http://developer.android.com/resources/ samples/BluetoothChat/index.html), except for the UUID changed from:- private static final UUID MY_UUID = UUID.fromString(fa87c0d0- afac-11de-8a39-0800200c9a66); to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); The UUID is intended to be the HID UUID. I found this at http://forum.btframework.com/index.php?topic=172.0 The UUID reported near the final line of the logcat (110b--1000-8000-00805f9b34fb) matches:- AudioSinkServiceClass_UUID: TGUID = '{110B--1000-8000-00805F9B34FB}'; I think this may be the original class of the phone being reported on some sort of error tidyup. Could the failure have happened earlier in the log and the device is now returning to the default class on a cleanup? What was significant to me is that the PC recognised that I had set the device to a HID UUID as he PC reported:- Registering a HID device to this system. Please Wait. and then Registration Failed. Confusing... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
1124--1000-8000-00805F9B34FB is not the same as 110B--1000-8000-00805F9B34FB. On May 29, 1:30 am, Robert Armstrong rarmstrong...@googlemail.com wrote: Thanks for your interest... The source code of the second example I posted is identical to the SDK provided BluetoothChat source(http://developer.android.com/resources/ samples/BluetoothChat/index.html), except for the UUID changed from:- private static final UUID MY_UUID = UUID.fromString(fa87c0d0- afac-11de-8a39-0800200c9a66); to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); The UUID is intended to be the HID UUID. I found this athttp://forum.btframework.com/index.php?topic=172.0 The UUID reported near the final line of the logcat (110b--1000-8000-00805f9b34fb) matches:- AudioSinkServiceClass_UUID: TGUID = '{110B--1000-8000-00805F9B34FB}'; I think this may be the original class of the phone being reported on some sort of error tidyup. Could the failure have happened earlier in the log and the device is now returning to the default class on a cleanup? What was significant to me is that the PC recognised that I had set the device to a HID UUID as he PC reported:- Registering a HID device to this system. Please Wait. and then Registration Failed. Confusing... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
I managed to transfer a file from the host PC to the HTC Desire using Bluetooth - see Word document supplied here:- http://forum.vodafone.co.uk/topic/58936-htc-desire-unable-to-send-files-via-bluetooth/ I have also tried the SDK supplied BluetoothChat example App. But with UUI changed to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); // HID class And get a similar failure to last posting. When I click on Menu- Connect a Device, after a short delay, I hit a breakpoint at:- ... mmSocket.connect(); } catch (IOException e) { connectionFailed(); *** breakpoint hit on this line ... The logCat trace shows:- 05-28 21:59:00.750: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.760: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.770: DEBUG/BluetoothChat(1385): onActivityResult -1 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): connect to: 00:1B:FB:CE:61:EF 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: BTS 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_alloc_add: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_dump_list: fd (35:35), bta 0, rc 1, wflags 0x8 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: return 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1) 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/ASOCKWRP(1385): asocket_init 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 3 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 4 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: transparant fcntl 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 3 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 4 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_set_asocket: success (49,52,53) 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): setState() 1 - 2 05-28 21:59:00.780: ERROR/BluetoothChat(1385): + ON RESUME + 05-28 21:59:00.790: INFO/BluetoothChatService(1385): BEGIN mConnectThread 05-28 21:59:00.790: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.790: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.790: DEBUG/DEVICE(295): BLTA - *DiscoverServices 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0035) 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295):bdaddr=00:1B:FB:CE: 61:EF 05-28 21:59:00.790: INFO/DTUN_CLNT(295): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4) 05-28 21:59:00.790: INFO/(259): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354 05-28 21:59:00.790: INFO/(259): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134 05-28 21:59:00.790: ERROR/BTLD(259): search UUID = 1124*** 05-28 21:59:00.790: INFO//system/bin/btld(254): btapp_dm_GetRemoteServiceChannel() 05-28 21:59:00.790: INFO//system/bin/btld(254): # USerial_Ioctl: BT_Wake, 0x8003 05-28 21:59:00.830: INFO/BluetoothChat(1385): MESSAGE_STATE_CHANGE: 2 05-28 21:59:01.350: WARN/BTLD(259): ccb timer ticks: 2147483648 05-28 21:59:01.350: WARN/BTLD(259): info:x0 05-28 21:59:01.350: INFO/BTL-IFS(259): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 10 pbytes (hdl 14) 05-28 21:59:01.350: DEBUG/DTUN_HCID_BZ4(295): dtun_dm_sig_link_up() 05-28 21:59:01.350: INFO/DTUN_HCID_BZ4(295):
[android-developers] Re: SPP bluetooth
Could you post more source code so we could see exactly how you're attempting the communication? On May 28, 4:10 pm, Robert Armstrong rarmstrong...@googlemail.com wrote: I managed to transfer a file from the host PC to the HTC Desire usingBluetooth- see Word document supplied here:-http://forum.vodafone.co.uk/topic/58936-htc-desire-unable-to-send-fil... I have also tried the SDK supplied BluetoothChat example App. But with UUI changed to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); //HIDclass And get a similar failure to last posting. When I click on Menu-Connect a Device, after a short delay, I hit a breakpoint at:- ... mmSocket.connect(); } catch (IOException e) { connectionFailed(); *** breakpoint hit on this line ... The logCat trace shows:- 05-28 21:59:00.750: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.760: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.770: DEBUG/BluetoothChat(1385): onActivityResult -1 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): connect to: 00:1B:FB:CE:61:EF 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: BTS 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_alloc_add: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_dump_list: fd (35:35), bta 0, rc 1, wflags 0x8 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: return 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1) 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/ASOCKWRP(1385): asocket_init 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 3 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 4 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: transparant fcntl 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 3 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 4 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_set_asocket: success (49,52,53) 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): setState() 1 - 2 05-28 21:59:00.780: ERROR/BluetoothChat(1385): + ON RESUME + 05-28 21:59:00.790: INFO/BluetoothChatService(1385): BEGIN mConnectThread 05-28 21:59:00.790: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.790: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.790: DEBUG/DEVICE(295): BLTA - *DiscoverServices 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0035) 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295): bdaddr=00:1B:FB:CE: 61:EF 05-28 21:59:00.790: INFO/DTUN_CLNT(295): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4) 05-28 21:59:00.790: INFO/(259): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354 05-28 21:59:00.790: INFO/(259): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134 05-28 21:59:00.790: ERROR/BTLD(259): search UUID = 1124*** 05-28 21:59:00.790: INFO//system/bin/btld(254): btapp_dm_GetRemoteServiceChannel() 05-28 21:59:00.790: INFO//system/bin/btld(254): # USerial_Ioctl: BT_Wake, 0x8003 05-28 21:59:00.830: INFO/BluetoothChat(1385): MESSAGE_STATE_CHANGE: 2 05-28 21:59:01.350: WARN/BTLD(259): ccb timer ticks: 2147483648 05-28 21:59:01.350:
[android-developers] Re: SPP bluetooth
I notice that the UUID you are using differs slightly from the one in the final line of the log, where it says onUuidChanged. Could you be using the wrong UUID? On May 28, 2:10 pm, Robert Armstrong rarmstrong...@googlemail.com wrote: I managed to transfer a file from the host PC to the HTC Desire using Bluetooth - see Word document supplied here:-http://forum.vodafone.co.uk/topic/58936-htc-desire-unable-to-send-fil... I have also tried the SDK supplied BluetoothChat example App. But with UUI changed to:- private static final UUID MY_UUID = UUID.fromString(1124--1000-8000-00805F9B34FB); // HID class And get a similar failure to last posting. When I click on Menu-Connect a Device, after a short delay, I hit a breakpoint at:- ... mmSocket.connect(); } catch (IOException e) { connectionFailed(); *** breakpoint hit on this line ... The logCat trace shows:- 05-28 21:59:00.750: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.760: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.770: DEBUG/BluetoothChat(1385): onActivityResult -1 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): connect to: 00:1B:FB:CE:61:EF 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: fam 31, type 1, prot BTPROTO_RFCOMM 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: BTS 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_alloc_new_sock: wrp_alloc_new_sock sub 15 05-28 21:59:00.780: DEBUG/BTL_IFC_WRP(1385): wrp_wsock_create: 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_alloc_add: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): btsk_dump_list: fd (35:35), bta 0, rc 1, wflags 0x8 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_socket: return 49 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm lm mode 0x26, (master:0, auth 1, enc 1) 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: configure rfcomm sndbuf len 71680 bytes 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_setsockopt: success 05-28 21:59:00.780: DEBUG/ASOCKWRP(1385): asocket_init 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 3 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 49, cmd 4 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: fd (-1:49), bta -1, rc 0, wflags 0x0 05-28 21:59:00.780: DEBUG/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: transparant fcntl 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 3 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: s 53, cmd 4 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_wrp_fcntl: wsock not found, pass through transparantly 05-28 21:59:00.780: INFO/BLZ20_WRAPPER(1385): blz20_set_asocket: success (49,52,53) 05-28 21:59:00.780: DEBUG/BluetoothChatService(1385): setState() 1 - 2 05-28 21:59:00.780: ERROR/BluetoothChat(1385): + ON RESUME + 05-28 21:59:00.790: INFO/BluetoothChatService(1385): BEGIN mConnectThread 05-28 21:59:00.790: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-28 21:59:00.790: ERROR/BluetoothService.cpp(75): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 05-28 21:59:00.790: DEBUG/DEVICE(295): BLTA - *DiscoverServices 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0035) 05-28 21:59:00.790: INFO/DTUN_HCID_BZ4(295): bdaddr=00:1B:FB:CE: 61:EF 05-28 21:59:00.790: INFO/DTUN_CLNT(295): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4) 05-28 21:59:00.790: INFO/(259): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354 05-28 21:59:00.790: INFO/(259): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134 05-28 21:59:00.790: ERROR/BTLD(259): search UUID = 1124*** 05-28 21:59:00.790: INFO//system/bin/btld(254): btapp_dm_GetRemoteServiceChannel() 05-28 21:59:00.790: INFO//system/bin/btld(254): # USerial_Ioctl: BT_Wake, 0x8003 05-28 21:59:00.830: INFO/BluetoothChat(1385): MESSAGE_STATE_CHANGE: 2 05-28 21:59:01.350:
[android-developers] Re: SPP bluetooth
I am looking to present the device (HTC Desire) to a PC as a Human Interface Device (HID). The idea is to use socket = btserver.accept() to open up a pipe to the PC, and then I implement the HID protocol across the pipe. I have changed the UUID to reflect its a HID (1124--1000-8000-00805F9B34FB) and the PC is recognising it as a HID. Good start. Using a breakpoint I have confirmed the socket = btserver.accept() is being reached. However when I click on Next on the PC (to start Registering a HID device ot this system. Please Wait.) the PC reports Registration Failed. Breakpoints after the socket = btserver.accept() show that the accept does not complete and instead timesout after the 120 seconds. Is this a valid approach, or does the HID need implemented in the Android / Linux operating system? If I am flogging a dead horse, what is the alternative approach? Does it invlove writing some drivers on a PC and opening up some sort of generic pipe between the PC and handset? Here's the relevant logcat trace:- 05-26 22:47:46.000: WARN/ActivityManager(75): Launch timeout has expired, giving up wake lock! 05-26 22:47:46.029: WARN/ActivityManager(75): Activity idle timeout for HistoryRecord{46525e78 com.paad.bluetoothtexting/.BluetoothTexting} 05-26 22:47:49.110: INFO//system/bin/btld(11841): # USerial_Ioctl: BT_Wake, 0x8003 05-26 22:47:49.160: WARN/BTLD(11842): info:x0 05-26 22:47:49.160: INFO/BTL-IFS(11842): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 10 pbytes (hdl 14) 05-26 22:47:49.160: DEBUG/DTUN_HCID_BZ4(11855): dtun_dm_sig_link_up() 05-26 22:47:49.160: INFO/DTUN_HCID_BZ4(11855): dtun_dm_sig_link_up: dummy_handle = 272 05-26 22:47:49.160: DEBUG/ADAPTER(11855): adapter_get_device(00:1B:FB:CE:61:EF) 05-26 22:47:49.160: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-26 22:47:49.160: ERROR/BluetoothEventLoop.cpp(75): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/11855/ hci0/dev_00_1B_FB_CE_61_EF 05-26 22:47:49.210: WARN/BTLD(11842): ccb timer ticks: 2147483648 05-26 22:47:50.640: INFO/BTL-IFS(11842): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 11 pbytes (hdl 14) 05-26 22:47:50.640: DEBUG/DTUN_HCID_BZ4(11855): dtun_dm_sig_link_down() 05-26 22:47:50.640: INFO/DTUN_HCID_BZ4(11855): dtun_dm_sig_link_down device = 0xfbb0 handle = 272 reason = 19 05-26 22:47:50.640: ERROR/BluetoothEventLoop.cpp(75): pollData[0] is revented, check next one 05-26 22:47:50.640: ERROR/BluetoothEventLoop.cpp(75): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/11855/ hci0/dev_00_1B_FB_CE_61_EF 05-26 22:47:50.660: DEBUG/BluetoothA2dpService(75): Received intent Intent { act=android.bluetooth.device.action.ACL_DISCONNECT ED (has extras) } 05-26 22:47:51.217: INFO//system/bin/btld(11841): # USerial_Ioctl: BT_Sleep, 0x8004 Thanks in advance, Rab -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
Not true. HTC phones for example have a different BT implementation than that one of the N1. I havn't pinpointed it yet, but things works differently. They should be the same, cause they're running 2.1 but they're not. Information is hard to come by, but the N1 has the best BT as far as I know. On 5 Apr, 20:31, DonFrench dcfre...@gmail.com wrote: Not sure why you say not Android. Android has supported SPPBluetooth since API level 5 (Android 2.0). Check out the BluetoothChat example. You might need to change the UUID to 1101--1000-8000-00805F9B34FB but otherwise it works fine. On Apr 3, 4:36 am, Holston holsto...@googlemail.com wrote: I have been DYING for a smartphone which officially supportsBluetooth keyboard pairing. To the point of now trolling developer forums to find out which major phone O.S. will officially support this first (not iPhone. not Android. not WebOS. Blackberry Symbian idk). I've been holding off a purchase for over a year because of this. How sad is that? So, um ... Android full and officialBluetoothHID SPP support: 1 more year? 2? 5? ...ever? Please give me some hope here ;-( On Apr 2, 5:01 pm, Bill Michaelson wmmichael...@gmail.com wrote: There is an app called KeyPro which does this, but last I knew, it did not support the ctl key, which is problematic for some apps (like Connectbot). You might contact the developer about latest status. On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote: I would like to use SPPbluetoothkeyboard(not HID profile.) on my android. but android 2.1 is not supported SPPbluetooth. Um Someone communicated the SPP device using android RFCOMM. Is this possible?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SPP bluetooth
Windows Mobile has supported Bluetooth HID pretty much since I've used it. Pity it's dying... Needless to say, I was pretty shocked when I got my first Android phone and found that something as elementary as Bluetooth Keyboard support was missing... what were they thinking? On Apr 3, 1:36 pm, Holston holsto...@googlemail.com wrote: I have been DYING for a smartphone which officially supports Bluetooth keyboard pairing. To the point of now trolling developer forums to find out which major phone O.S. will officially support this first (not iPhone. not Android. not WebOS. Blackberry Symbian idk). I've been holding off a purchase for over a year because of this. How sad is that? So, um ... Android full and official Bluetooth HID SPP support: 1 more year? 2? 5? ...ever? Please give me some hope here ;-( On Apr 2, 5:01 pm, Bill Michaelson wmmichael...@gmail.com wrote: There is an app called KeyPro which does this, but last I knew, it did not support the ctl key, which is problematic for some apps (like Connectbot). You might contact the developer about latest status. On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote: I would like to use SPPbluetoothkeyboard(not HID profile.) on my android. but android 2.1 is not supported SPPbluetooth. Um Someone communicated the SPP device using android RFCOMM. Is this possible?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: SPP bluetooth
Is there any word on when either Bluetooth SPP or HID profiles will be officially and fully supported in Android? On Apr 2, 5:01 pm, Bill Michaelson wmmichael...@gmail.com wrote: There is an app called KeyPro which does this, but last I knew, it did not support the ctl key, which is problematic for some apps (like Connectbot). You might contact the developer about latest status. On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote: I would like to use SPPbluetoothkeyboard(not HID profile.) on my android. but android 2.1 is not supported SPPbluetooth. Um Someone communicated the SPP device using android RFCOMM. Is this possible?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: SPP bluetooth
Not sure why you say not Android. Android has supported SPP Bluetooth since API level 5 (Android 2.0). Check out the BluetoothChat example. You might need to change the UUID to 1101--1000-8000-00805F9B34FB but otherwise it works fine. On Apr 3, 4:36 am, Holston holsto...@googlemail.com wrote: I have been DYING for a smartphone which officially supports Bluetooth keyboard pairing. To the point of now trolling developer forums to find out which major phone O.S. will officially support this first (not iPhone. not Android. not WebOS. Blackberry Symbian idk). I've been holding off a purchase for over a year because of this. How sad is that? So, um ... Android full and official Bluetooth HID SPP support: 1 more year? 2? 5? ...ever? Please give me some hope here ;-( On Apr 2, 5:01 pm, Bill Michaelson wmmichael...@gmail.com wrote: There is an app called KeyPro which does this, but last I knew, it did not support the ctl key, which is problematic for some apps (like Connectbot). You might contact the developer about latest status. On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote: I would like to use SPPbluetoothkeyboard(not HID profile.) on my android. but android 2.1 is not supported SPPbluetooth. Um Someone communicated the SPP device using android RFCOMM. Is this possible?- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.
[android-developers] Re: SPP bluetooth
There is an app called KeyPro which does this, but last I knew, it did not support the ctl key, which is problematic for some apps (like Connectbot). You might contact the developer about latest status. On Apr 2, 1:26 am, brilliant winger stw...@gmail.com wrote: I would like to use SPP bluetooth keyboard(not HID profile.) on my android. but android 2.1 is not supported SPP bluetooth. Um Someone communicated the SPP device using android RFCOMM. Is this possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject.