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 use CC2540 as a router? Central and peripheral, Client and server at the same time

Other Parts Discussed in Thread: CC2540

Hi all:
Recently I use CC2540 and BLE4.0 stack to communicate with Iphone4s. What's more, I want use one CC2540 as the sensor, one CC2540 as the router. The router can directly communicate with the Iphone4s, and the sensor can not communicate with Iphone4S. I have some questions about this scenario.

1. Is possible that the cc2540 device(router) to have both central and peripheral roles at the same time? If it is not, can I
switch the router roles between central and peripheral in software rather than having to re-flash the device?


2. If the above function can not be realized, do you think the only way is to set the sensor(CC2540) and the Iphone4s in
peripheral mode and the router(CC2450) in central mode? Is there anyother way?

3. In the software user guide for the BLE stack it indicates that "the GATT roles of Client and Server are completely
independent from the GAP peripheral and central roles. A slave can be either a GATT Client or a GATT Server, and a master can be either a GATT client or a GATT Server." Is BLE stack of CC2540 support that one device(such as the router) be Client to the
sensor and Server to the Iphone4S at the same time??

Thanks you all in advance

  • 1. No, you can't do this.

    2. Yes, the alternative is the sensor(CC2540) and the Iphone4s in peripheral mode and the router(CC2450) in central mode. 

  • Hi, YiKai Chen:

         Thanks a lot!

          What's about the 3rd question? Is  BLE stack of CC2540  support that one device(such as the router) be Client to the sensor and Server to the Iphone4S at the same time??

         If BLE stack can not support, I want to set the sensor as Server, the router as Client, the Iphone4S as Server. Is there any problem with it? Is there other modes?

       Best Regards! thank you!