Tool/software:
SDK version : 8.40.00.64
CCS version : 12.7.0.00007
Project : basic_ble_LP_EM_CC2340R5_freertos_ticlang
When I tested CC2340 as a peripheral device, after running it for a while, I found that I could scan the Bluetooth broadcast using the nRF APP on iPhone, but I couldn't scan it using the nRF APP on Android phones. Moreover, although the iPhone could scan the broadcast, it couldn't connect and would always be in the connecting state. However, from the broadcast data, it seemed that it was not frozen, because when I was testing, a number was broadcasted, and this number was +1 every minute, which seemed normal.
I would like to ask under what circumstances would this happen?
Or is it possible that some parameters of the Bluetooth were modified?
Hello,
Thanks for reaching out! Could you please provide the Connection Update Request Params of the CC2340, and possibly a packet sniffer log? I suspect this issue lies in the difference between the connection parameters in iPhone devices vs android devices.
Best Regards,
Tarek
I guess it is because the IOS system remembers certain parameters, such as MAC, so it can be scanned. Maybe some parameters of CC2340 have actually been changed, so the Android system cannot scan CC2340, because although the IOS system can scan it, it cannot connect, and it will return to normal after restarting.
I have added GATT_bm_free at the end of BLEAppUtil_convertGATTEvents, but this should not affect GAP.
The following are the settings for the connection parameters. I'm sorry I don't have a sniffer so I can't provide the logs.
Hello Ryan,
Thank you for your reply! I have a couple questions regarding this:
Does the default basic_ble project result in the same behavior?
What changes have been made to the initial project?
To make sure the IOS device doesn't remember the parameters, make sure to "forget device" in the Bluetooth list on the IOS device. It's also worth mentioning that Androids typically have smaller connection intervals, possibly justifying why you can scan the device on the IOS device but not the android device.
Best Regards,
Tarek
Hi Tarek,
(1) I have not used the default basic_ble project for a long time.
(2) As mentioned in the comments above, I added GATT_bm_free in BLEAppUtil_convertGATTEvents, and changed the broadcast content every minute.
(3)I guess that BLEAppUtil_convertGATTEvents may have added GATT_bm_free, because as a peripheral device, when connected by a central device or a mobile phone, BLEAppUtil_convertGATTEvents seems to trigger method = 0x7F, which seems to be an event for updating connection parameters. If the connection is interrupted due to interference from other Bluetooth devices, GATT_bm_free will also be executed, which may cause abnormal Bluetooth connection parameters?
(4)The third point mentioned is because when I let the CC2340 that was unable to connect continue to broadcast and connect after a day, it seems to be able to connect normally again.
Hello Ryan,
The reason I asked about the default basic_ble project is to see if the default parameters work, as that would help me in pinpointing the problem. I do have a few questions:
How are you changing the broadcast content?
Are you ever able to see the device advertise on the android side?
Are you ever able to connect to the iPhone, even if for a brief period?
Could you elaborate on what you mean in point 4. What do you mean by connect normally after a day? And is that to both devices?
Please also make sure you have "forget device" in the bluetooth list on the phone.
Best Regards,
Tarek