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.

How to communicate external MCU with CC2540

Other Parts Discussed in Thread: CC2540

Hello 

Recently, I've tried to make some H/W device that can communicate with phone.

I already make app and prototype device with simple cc2540 module,  arduino, sensor.

Sensor transmit data to Arduino(i2c) and Arduino transmit these data to cc2540 module(UART).

Finally, cc2540 transmit data to my custorm app, and app processing this data and make output.

Throughout this process, I have interested about BLE. Because, This is first time to me to use BLE.

So I bought CC2540 Evaluation Board and tried to simple project.

My first project is setting custom uuid on cc2540 board and communicate it with External MCU.

Finally, this simple device can pairing with my app.

But I'm really confused about 

1. How to setting custom uuid on my cc2540 board

2. How to UART communication between cc2540 board and Arduino(or Other MCU, like msp430 or Atmega128)

Is there any good example code or documents that I can study or refer?

Thanks for reading my question.

  • Hi,

    There are multiple ways to use cc2540 device. Either as a single mcu which controls the application, profiles and stack or as a network processor(which takes instructions from an external MCU).

    In single MCU(device) mode, you can set up the UART to send and transmit specific data to external MCU whenever required.

    In Network processor mode, the BLE application, profile etc run on the external MCU and only BLE stack runs on cc2540 device. You communicate between CC2540 and external MCU by HCI commands/events using either UART/SPI.

    You will find more information on both modes in 2540_User_Guide and HCI_Specific_Vendor_Guide. 

    Regarding your question about changing UUID, you can do that in the profile file(depends upon application) that you uses or gatt_uuid.h

    Regards,

    Arun