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.

Need to build Serial Port Bridge application for CC2540

Other Parts Discussed in Thread: CC2540, CC2560, CC2540EMK-USB

I'm looking to build a Serial Port Bridge application that uses the CC2540 in order to connect together 2 PC's with a Terminal Emulation application (like HyperTerm.)

This was done for the CC2560 and is documented in the Wiki article - http://processors.wiki.ti.com/index.php/CC256x_MT_UART_BRIDGE 

Can anyone tell me which BLE stack might be the best choice for something like this?  Is the recently released TI BLE stack 1.2 capable of this?

Even better, is there already an application like this built to use the TI BLE stack?

  • Maybe this is easier than I thought.

    The CC2540 BLE USB stick that comes in the CC2540-Mini Developer's kit, can it be connected together with a second CC2540 BLE USB stick?

    Is this the same stick as the CC2540EMK-USB??

  • Hey,

    it is possible to do what you want in TI BLE stack 1.2. The USB stick is just a shape around the cc2540, just as the EM or the keyfob :)

    Regarding the last question, yes, it is the same stick in CC2540EMK-USB than the one in CC2540DK.

    I really do not understand why this has to be done employing the USB and a PC. The key feature of cc2540 is the low power consumption, if you employ the USB, as far as I know, the chip is always active and, on the other hand and additionally, you have to take into account the USB interface current consumption ;)

    If you accept suggestions, this could be done in 5 minutes by employing a pair of simple Xbee, and perhaps up to 1km range ;)

    Bye!

  • Sure. This is just a proof of concept for a Serial cable replacement. The end customer has his reasons for wanting BLE, and it IS a battery operated "end point" solution.

    In the end, he doesn't want to use the USB that's on the stick. Just an easy way to interface a UART port and verify that it's working.

  • It can be done :)

  • Gerry,

    did you ever implement this? I too am looking for a serial port bridge solution using BLE. I am however running into the 20 bytes maximum data length limitation and would be interested to see examples how others have solved this.

  • Rene Limberger said:

    did you ever implement this? I too am looking for a serial port bridge solution using BLE. I am however running into the 20 bytes maximum data length limitation and would be interested to see examples how others have solved this.

    Rene,

    The only solution is to send early and often. Lower the latency and you'll get around 4kB/s if there is no interference.

  • Thanks for the quick reply but I'm not even concerned about bandwidth (yet). I'm just trying to find some higher level examples on how to fragment and defragment variable size data to send in 20b chunks over the BLE pipe. My hope is that this can be as transparent as possible with some minimal firmware on a CC2540.

  • Rene,

    Implement an attribute of size 20.  When you want to send data from peripheral to the master, use Notify or Indicate.  When you want to send the data from the master to the peripheral, use Write or WriteNoRsp.

  • There is example code for using the CC2540 UART as an HCI interface. The TI Btool software provides an interface to this. I have had limited experience with the HCI side of things so maybe someone else can elaborate. http://processors.wiki.ti.com/index.php/Category:BluetoothLE.

    two serial port conntectting for terminal emulation application, you also use visual serial port software to do that.

    hope it help.

    -----

    Albert Field  Com Port Monitor