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.

Communicate with CC2540 USB dongle on ARM platform

Other Parts Discussed in Thread: CC2541, CC2540

Hi All

I want to use cc2540 USB dongle connected with ARM board ( Raspberry Pi) to communicate with another sensor.( custom made based on cc2541).

I have written a simple application using C, which does some very basic operations like opening the device node (/dev/ttyACM0), setting up the proper communication characteristics such as baudrate etc. Then it starts sending commands like GAP_DeviceInit followed by GAP_DeviceDiscovery and all to scan and connect to devices. 

This application works perfectly fine on my Linux laptop running Ubuntu. I am able to send commands and get the expected events back from the device.

Now, I want to use the same dongle with the same application ( cross compiled for ARM target) connected to a Raspberry Pi board ( ARM Based). In that nothing seems to be working. All the responses that I receive from the  device does not start with 0x40, which means those responses are not valid events. I am not getting a single correct event from the sensor. 

I have played around by changing the baud rates and the flow control bits etc but without any success. Does anyone have any idea why the same application which works on my laptop completely fail to work on a board?

Any help would be greatly appreciated.

Thanks

Biswa

  • I just realized that my call to GAP_DeviceInit never returned. I mean the call to GAP_DeviceInit succeeds and I verified the return values of 'write()' and that matches fine. But I never got 'HCI Ext Command Status Event' with status.

    That means the dongle firmware never acknowledged my device init command. Seems very strange to me as the same dongle with the same app works fine in Ubuntu desktop.

    Anyone has any idea why the HCI Ext Command Status Event is not generated?

    Thanks in advance.