This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
We built a custom board for the CC2540 and I just received the boards today. They program fine, and I can see them advertising, both with BTool and iPhone app called Light Blue. But the name of the device is now "Peripheral" rather than the actual product name. And I can't seem to connect to it (pair). If I program my KeyFob demo board with the same firmware, I can see the correct product name and I can also connect to it just fine. I'm including the BTool outputs below. Any ideas? Thanks for any help!
When I use BTool to establish a connection with the device, this is what I get:
[1] : <Tx> - 09:40:20.344
-Type : 0x01 (Command)
-Opcode : 0xFE09 (GAP_EstablishLinkRequest)
-Data Length : 0x09 (9) byte(s)
HighDutyCycle : 0x00 (Disable)
WhiteList : 0x00 (Disable)
AddrTypePeer : 0x00 (Public)
PeerAddr : 14:D9:49:29:6A:BC
Dump(Tx):
01 09 FE 09 00 00 00 14 D9 49 29 6A BC
------------------------------------------------------------------------------------------------------------------------
[2] : <Rx> - 09:40:20.364
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
Status : 0x00 (Success)
OpCode : 0xFE09 (GAP_EstablishLinkRequest)
DataLength : 0x00 (0)
Dump(Rx):
04 FF 06 7F 06 00 09 FE 00
------------------------------------------------------------------------------------------------------------------------
[3] : <Info> - 09:40:20.514
Device Connected
Handle = 0x0000
Addr Type = 0x00 (Public)
BDAddr = BC:6A:29:49:D9:14
------------------------------------------------------------------------------------------------------------------------
[4] : <Rx> - 09:40:20.514
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x13 (19) bytes(s)
Event : 0x0605 (GAP_EstablishLink)
Status : 0x00 (Success)
DevAddrType : 0x00 (Public)
DevAddr : BC:6A:29:49:D9:14
ConnHandle : 0x0000 (0)
ConnInterval : 0x0050 (80)
ConnLatency : 0x0000 (0)
ConnTimeout : 0x07D0 (2000)
ClockAccuracy : 0x00 (0)
Dump(Rx):
04 FF 13 05 06 00 00 14 D9 49 29 6A BC 00 00 50
00 00 00 D0 07 00
------------------------------------------------------------------------------------------------------------------------
[5] : <Info> - 09:40:21.084
Device Disconnected
Handle = 0x0000
Addr Type = 0x00 (Public)
BDAddr = BC:6A:29:49:D9:14
------------------------------------------------------------------------------------------------------------------------
[6] : <Rx> - 09:40:21.084
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x0606 (GAP_TerminateLink)
Status : 0x00 (Success)
ConnHandle : 0x0000 (0)
Reason : 0x3E (Failed To Establish)
Dump(Rx):
04 FF 06 06 06 00 00 00 3E
------------------------------------------------------------------------------------------------------------------------
At other times I'm able to connect, but then I get disconnected about 10 seconds later. That transcript looks like this:
[1] : <Tx> - 09:41:53.315
-Type : 0x01 (Command)
-Opcode : 0xFE09 (GAP_EstablishLinkRequest)
-Data Length : 0x09 (9) byte(s)
HighDutyCycle : 0x00 (Disable)
WhiteList : 0x00 (Disable)
AddrTypePeer : 0x00 (Public)
PeerAddr : 14:D9:49:29:6A:BC
Dump(Tx):
01 09 FE 09 00 00 00 14 D9 49 29 6A BC
------------------------------------------------------------------------------------------------------------------------
[2] : <Rx> - 09:41:53.335
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
Status : 0x00 (Success)
OpCode : 0xFE09 (GAP_EstablishLinkRequest)
DataLength : 0x00 (0)
Dump(Rx):
04 FF 06 7F 06 00 09 FE 00
------------------------------------------------------------------------------------------------------------------------
[3] : <Info> - 09:41:53.465
Device Connected
Handle = 0x0000
Addr Type = 0x00 (Public)
BDAddr = BC:6A:29:49:D9:14
------------------------------------------------------------------------------------------------------------------------
[4] : <Rx> - 09:41:53.465
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x13 (19) bytes(s)
Event : 0x0605 (GAP_EstablishLink)
Status : 0x00 (Success)
DevAddrType : 0x00 (Public)
DevAddr : BC:6A:29:49:D9:14
ConnHandle : 0x0000 (0)
ConnInterval : 0x0050 (80)
ConnLatency : 0x0000 (0)
ConnTimeout : 0x07D0 (2000)
ClockAccuracy : 0x00 (0)
Dump(Rx):
04 FF 13 05 06 00 00 14 D9 49 29 6A BC 00 00 50
00 00 00 D0 07 00
------------------------------------------------------------------------------------------------------------------------
[5] : <Info> - 09:42:13.479
Device Disconnected
Handle = 0x0000
Addr Type = 0x00 (Public)
BDAddr = BC:6A:29:49:D9:14
------------------------------------------------------------------------------------------------------------------------
[6] : <Rx> - 09:42:13.479
-Type : 0x04 (Event)
-EventCode : 0xFF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x0606 (GAP_TerminateLink)
Status : 0x00 (Success)
ConnHandle : 0x0000 (0)
Reason : 0x08 (Supervisor Timeout)
Dump(Rx):
04 FF 06 06 06 00 00 00 08
------------------------------------------------------------------------------------------------------------------------
Hello. Can you try loading simpleBLEperipheral onto your custom board and trying to connect with BTool?
From the sniffer captures, it looks like your device is getting out of synch with the central device. If this continues with the simpleBLEperipheral project I would imagine there is some hardware issue. If you're willing to provide schematics / layout, we can review these for you.
Regards,
Tim
Hi Tim,
I just tried simpleBLEperipheral. Same issue. But then I tried an experiment where I disabled the power saving (by deleting define POWER_SAVING). Everything seems fine now. What do you think the issue is? I've checked the 32kHz oscillator with a scope, it looks okay to me (I can see a 32kHz sine wave). Any suggestion? Anyways, I'm happy it doesn't seem to be a layout or RF issue.
Thanks for your help. I can send you an e-mail with the schematic/layout. Just let me know what your e-mail address is. Thanks.
Erik
Hi Erik,
It could also be something wrong with the 32MHz. Maybe you have wrong load caps or someting like this. It could be that it takes too long time to start up. The reason I say this is that 32kHz is always on, but 32MHz will be turned off and on with POWER_SAVING.
You can try to modify a define called HAL_SLEEP_ADJ_TICKS in hal_sleep.c and increase this to see if it's more stable.
BR,
Aslak
I haven't measured the load caps, but they should be 12pF in value. Is this correct? I saw some other schematic reference using 15pF. Here is the part number for the oscillator: ABS25-32.000KHz T
I will try your suggestion and let you know.
Erik
I increase the HAL_SLEEP_ADJ_TICKS from 35 to 70. Didn't notice any difference (same issue).
Sorry, I misunderstood. I think you are referring to the 32MHz oscillator load caps. Those are also 12pF. Part number for 32MHz is: ECS-320-13-42-CKM-TR
I verified that the 32Mhz load caps are correct, 12pF. I tried reducing to 8pF and no change in behavior.
Hi, Have you found solution? Same issue here. I use custom board with chinese cc2540 mini board on it.