Greetings,
I'm having trouble getting the SimpleBLEPeripheral sample working with CC2540 and BLE stack version 1.4.0 with an Android Nexus 5 running Lollipop 5.0.1. It seemed to work fine on KitKat on the same device several months ago.
Here is what I see now: Android device sees the advertisements from SimpleBLEPeripheral and can successfully scan peripheral. Android can also send a CONNECT_REQ and get a CONNECT_RSP from CC2540. PDU exchange begins successfully. However, it seems that the CC2540 never sends an LL_VERSION_IND which (I think) keeps android from continuing on and setting up a GATT connection. Eventually the link gets torn down due to no activity I assume. Here is a wireshark of the failure I see:
No. Time Source Destination Protocol Length Info
1755 136.130110000 Slave Master LE LL 41 ADV_IND
1756 136.211302000 Slave Master LE LL 41 ADV_IND
1757 136.213001000 Slave Master LE LL 43 SCAN_RSP
1758 136.327084000 Slave Master LE LL 41 ADV_IND
1759 136.421327000 Slave Master LE LL 41 ADV_IND
1760 136.565882000 Slave Master LE LL 41 ADV_IND
1761 136.568212000 Slave Master LE LL 60 CONNECT_REQ
1762 136.569743000 Master Slave LE LL 26 Empty PDU
1763 136.570471000 Slave Master LE LL 26 Empty PDU
1764 136.585639000 Master Slave LE LL 32 Control Opcode: LL_VERSION_IND
1765 136.586897000 Slave Master LE LL 26 Empty PDU
1766 136.612821000 Master Slave LE LL 26 Empty PDU
1767 136.662655000 Master Slave LE LL 26 Empty PDU
1768 136.717233000 Master Slave LE LL 26 Empty PDU
1769 136.760649000 Master Slave LE LL 26 Empty PDU
1770 136.808424000 Master Slave LE LL 26 Empty PDU
1771 136.857953000 Master Slave LE LL 26 Empty PDU
1772 136.902928000 Master Slave LE LL 26 Empty PDU
1773 136.954207000 Master Slave LE LL 26 Empty PDU
1774 137.003753000 Master Slave LE LL 26 Empty PDU
1775 137.052782000 Master Slave LE LL 26 Empty PDU
1776 137.128717000 Master Slave LE LL 26 Empty PDU
1777 137.149931000 Master Slave LE LL 26 Empty PDU
1778 137.198706000 Master Slave LE LL 26 Empty PDU
1779 137.247289000 Master Slave LE LL 26 Empty PDU
1780 137.291588000 Master Slave LE LL 26 Empty PDU
1781 137.344381000 Master Slave LE LL 26 Empty PDU
1782 137.393027000 Master Slave LE LL 26 Empty PDU
1783 137.442753000 Master Slave LE LL 26 Empty PDU
1784 137.487138000 Master Slave LE LL 26 Empty PDU
1785 137.540388000 Master Slave LE LL 26 Empty PDU
For comparison, this is the (successful) sequence I see with the same Android app connecting to a different peripheral device (that doesn't use CC2540):
405 41.231667000 Slave Master LE LL 38 SCAN_REQ
406 41.233379000 Slave Master LE LL 32 SCAN_RSP
407 41.235807000 Slave Master LE LL 62 ADV_IND
408 41.237943000 Slave Master LE LL 62 ADV_IND
409 59.318217000 Slave Master LE LL 62 ADV_IND
410 59.320580000 Slave Master LE LL 60 CONNECT_REQ
411 59.321818000 Master Slave LE LL 26 Empty PDU
412 59.322782000 Slave Master LE LL 26 Empty PDU
413 59.323911000 Master Slave LE LL 32 Control Opcode: LL_VERSION_IND
414 59.380642000 Master Slave LE LL 32 Control Opcode: LL_VERSION_IND
415 59.415404000 Master Slave LE LL 26 Empty PDU
416 59.417156000 Slave Master LE LL 32 Control Opcode: LL_VERSION_IND
417 59.463550000 Master Slave LE LL 35 Control Opcode: LL_FEATURE_REQ
418 59.480146000 Slave Master LE LL 26 Empty PDU
419 59.551780000 Master Slave LE LL 26 Empty PDU
420 59.553262000 Slave Master LE LL 35 Control Opcode: LL_FEATURE_RSP
421 59.573541000 Master Slave ATT 37 Rcvd Read By Group Type Request, GATT Primary Service Declaration, Handles: 0x0001..0xffff
I'm pretty confused at this point. Any thoughts / comments would be greatly appreciated.
Jack