- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using Nebula IOT dev kit rev 2.0 and I am trying to test Serial Gatt Service with it.
I am using my own Android application that I wrote and work with different BLE chip. I am trying to connect using my Android Application to SGS and I connect with success.
I have few problems:
1. During SGS startup I have several Unhandled Bluetooth Management Event
Startup Log:
Platform NEB1DX_01 initialised
Started ThreadX v5.8
00:00:00.007000 GKI_create_task func=0x8016a79 id=1 name=BTU stack=0x0 stackSize=4096
00:00:00.016000 GKI_create_task func=0x8018241 id=0 name=HCISU stack=0x0 stackSize=3072
Unhandled Bluetooth Management Event: 0x15
Bluetooth enabled (success)
Local Bluetooth Address: [43:43:A1:12:1F:AC]
gatt register status: 0
gatt db init status: 0
---->>> New ADV state: 3
Waiting for Serial Gatt to connect...
> Unhandled Bluetooth Management Event: 0x21
2. The second problem starts when I send 10 bytes packet from my Android application to SGS and my MTU changed from 10 to 1546 .
I happens in the next line where p = 10 and p_mtu is 1546. ( Line 1227 in serial_gatt_service.c)
STREAM_TO_UINT16(*p_mtu, p); /* Extract MTU field */
Log:
serial_gatt_connection_up id:2
:---->>> New ADV state: 0
Stopping Advertisements0
GATT request conn_id:2 type:2
Unhandled Bluetooth Management Event: 0x1f
Unhandled Bluetooth Management Event: 0x21
MTU handler mtu:23 num transport buffers:23 ccc:0
GATT request conn_id:2 type:2
BSG Active. Reduce Connection Interval
BSG MTU handler mtu:1546
Err: BSG Rx MTU (1546) is bigger than GATT MTU (23)
Unhandled Bluetooth Management Event: 0x1f
Unhandled Bluetooth Management Event: 0x21
BSG Idle. Increase Connection Interval
Unhandled Bluetooth Management Event: 0x1f
Unhandled Bluetooth Management Event: 0x21
Do you have any ideas how to solve it ?
Thanks for you help,
David
Solved! Go to Solution.
- Labels:
-
Wifi+Bluetooth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello David,
1. Unhandled Bluetooth Management Event : Please ignore this. These events are expected, Its not an error. In the switch case of serial_gatt_management_callback , only few of the cases are added . So when those cases are triggered its printing 'Unhandled Bluetooth Management Event ' . You can cross check the wiced_bt_management_evt_e enums in wiced_bt_dev.h file
2. I tested serial_gatt_service project on NEB1DX_01 with the peer app available in WICED SDK ((WICED-Studio-x.x/common/peerapps/hci_serial_gatt_service):) . It worked for me even for data > 10 bytes.
Could you please try with the peer apps along with WICED SDK . If issue is not reproducing then problem is on the app side.
I think the problem is with your android app . Mostly it will be sending a MTU request 1546 while sending 10 bytes of data. Please recheck the app implementation.
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello David,
1. Unhandled Bluetooth Management Event : Please ignore this. These events are expected, Its not an error. In the switch case of serial_gatt_management_callback , only few of the cases are added . So when those cases are triggered its printing 'Unhandled Bluetooth Management Event ' . You can cross check the wiced_bt_management_evt_e enums in wiced_bt_dev.h file
2. I tested serial_gatt_service project on NEB1DX_01 with the peer app available in WICED SDK ((WICED-Studio-x.x/common/peerapps/hci_serial_gatt_service):) . It worked for me even for data > 10 bytes.
Could you please try with the peer apps along with WICED SDK . If issue is not reproducing then problem is on the app side.
I think the problem is with your android app . Mostly it will be sending a MTU request 1546 while sending 10 bytes of data. Please recheck the app implementation.
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for you help!
I will try it and update.
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I found the problem. My android app is not credits based, after minor tweaking it worked! Thanks!
After testing the serial gatt service I realized it only one side communication. I will try to explain my self better , If I send packet using UART it is not moving forward to BT client ( android app ), it seems like it only half duplex...
So, I understand that I need to add interrupt for recieving data ( UART ) , Am I correct ? Is there a better way to do that ?
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
Do you mean you want to send some data from the serial_gatt_service device (input via UART) to your BLE client ?
In that case you may use notification. Add a UART interrupt routine for inputting the data and send it via wiced_bt_gatt_send_notification API
Thanks,
Anjana