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.

HostTestApp on CC2540EB -- invalid Profile Role??

Other Parts Discussed in Thread: CC2540

I have The CC2540EB configuration of HostTestApp running on the CC2540 key fob that comes with the TI mini dev kit. I have a PIC24 MCU providing UART HCI to the key fob, and I am trying to send the three GAP commands to make the device discoverable by the USB dongle, using BTool during a "Scan". To do this requires Gap_Init(), GAP_UpdateAdvertisingData(), and GAP_MakeDiscoverable()

I am getting a response of "Success" (0x00) as part of the return Rx Dump *only* when my profile role code corresponds to Broadcaster (0x01), Observer (0x02), and a hybrid of Broadcaster/Observer (0x03). When I try to initialize it in Peripheral mode, or any profile role code above (0x03), the Rx dump return parameter in response to GAP_Init() is 0x02--corresponding to "INVALID PARAMETER".

Furthermore, following a successful GAP_Init() putting the keyfob in "Broadcast" profile mode, my GAP_UpdateAdvertisingData() elicits an Rx dump with a return code of "invalid profile role" when I send the following HCI TX dump over UART:

01 07 FE 05 01 03 02 01 06,

even though when BTool sends the same HCI  command to the USB dongle after initializing the USB dongle in the same "Broadcast" profile mode, the return parameter is "Success" (0x00)!! My PIC UART code emulates exactly what I see in my BTool TX dump when I use the "Adv. Commands" tab to make the device discoverable by making it a peripheral, updating advertising data, and then making it discoverable. I am confused why:

1) I only seem to be able to use profile roles of 0x01, 0x02, 0x03 on the key fob over UART, but every profile can be initialized using BTool in conjunction with the USB Dongle
2) USB dongle receives TX dump from BTool successfully, but the exact same code over my UART with my key fob returns failure/invalid parameter/invalid profile role error codes.

Any help is greatly appreciated! This is Day 6 of nothing but HCI troubleshooting--I'm learning a lot and I'm so close, but I'm stuck with this confusion right here. Maybe it has to do with the CC2540EB software build of HostTestApp vs. the CC2540USB build?