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.

CC2531 USB dongle and Embedded Linux board

Other Parts Discussed in Thread: CC2531, Z-STACK, CC2530, CC2538, CC2531EMK, TIDC-ZNP-HOST-SW3

I have bought a couple of CC2531 USB dongles and I have an Embedded Linux board which is not a BBB. Apparently Z-Stack Linux Gateway is compiled for BBB only. And apparently there are no sources for free so I could compile them for my own target. 

For a HA project I have created a network of CC2530 devices and I was wondering how can I use my board and a CC2531 dongle to communicate with that network. Suppose I want to make CC2531 dongle a coordinator so user could send commands to other devices (ZR or ZED) through a GUI which is running on my Linux board. 

What options do I have?  How can I connect the USB dongle to my board and start it as a coordinator and everything? 

My board already recognizes CC2531 as "CC2531 USB Dongle" but that's all. Do I have to compile sources so I can communicate with dongle directly or is it better if I programmed CC2531 with a hex file so it appears as a serial device and communicate with it with serial commands? (if this is the case then which hex file should I use?

  • You can sign SLA with TI to get full source code of Z-Stack Home Linux GW and build it for your own Linux board.
  • Thank you.
    Where should I start? I mean I've never done something like that before!

    Plus what if I couldn't do that? Is there an alternative way like what I said about CC2531 being a serial device and not going thorough all cross compiling and stuff? Maybe it's easier to do that instead of cross compiling. I don't know.
  • The alternative is to use Portable ZigBee Plug-In Software Framework for any OS. You can refer to www.ti.com/.../TIDC-ZNP-HOST-SW3.
  • Well that is CC2538 I think. What about CC2531?
    Is there something like that for CC2531 ?

  • It can work on CC2531 too.
  • Hi YiKai.
    I was just looking in "C:\Texas Instruments\Z-Stack Home 1.2.2.42930\Projects\zstack\ZNP\CC253x" and there is a znp.eww project with a couple of workspaces for CC2530 and CC2531 like :

    CC2531 - Debug

    CC2531 - TestHex

    CC2531 - ProdSBL

    CC2531 - ProdHex

    Which I'm not sure what those are. (If you know please explain)

    To sum it up, is there a project or firmware in which CC2531 dongle can work as a ZNP through it's USB port in Embedded Linux platform?

    I believe the dongle must somehow be recognized as a TTY device to Embedded Linux OS so one can work with it like a simple serial device. That's what I had in mind.
  • You can use prebuild ZNP hex image CC2531ZNP-Pro-Secure_LinkKeyJoin.hex under C:\Texas Instruments\Z-Stack Home 1.2.2.42930\Projects\zstack\ZAP\ZNP-HexFiles\CC2531. You don't have to build ZNP by yourself.
  • Unfortunately I broke my CC Debugger so I wasn't able to program the dongle until today.
    Today I Programmed CC2531ZNP-Pro.hex file in that directory you mentioned (just for test) and for driver in windows I used C:\Program Files (x86)\Texas Instruments\SmartRF Tools\Drivers\vcp . Now it shows up "TI CC2531 USB CDC Serial Port" as a COMx port in device manager just as expected.
    But what am I supposed to do now? I mean can I run Hyperterminal or something to test and check things in windows?
    I mean is there like a AT command set to say form a network and all? (just to test firmware or ...)
    What about baud rate and serial port settings?


    Plus I connected the dongle to my linux board and it recognizes it as "TI CC2531 USB CDC" but I don't see any new device added to /dev/tty* devices. I figured it would add a device like /dev/ttyACM or something.
    Why is that? Did I programmed a wrong firmware?

    Thanks for your help.
  • Baudrate of CC2531EMK is 115200.
  • Thank you
    What about that linux problem?
    In dmesg it says "TI CC2531 USB CDC" but I don't know what device has been added to /dev directory. Actually I don't think a device has been added at all.
    You have any idea?
  • In my BeagleBone, CC2531 USB dongle would be add as /dev/ttyACM0.

  • @YiKai . Ok I finally managed to get the USB module to be recognized by the Linux as /dev/ttyACM0 by reconfiguring the kernel and adding some modules to it. Besides I was having problem with Z-Tool being able to connect to the module but I make it work somehow and it turns out CC2531 as CDC uses 38400 not 115200 that you mentioned. 

    Now after opening the port in my program what should I do to create a new network and let other nodes to join to this network or even using EZ-Mode to bound this module to other nodes in the area?

    Which document should I read to make this work?

    Does this module uses AT Commands? (cause AFAIK most of /dev/ttyACMx devices are supposed to support some sort of AT Commands)

    Could you provide me a sample program if you already know one? 

    Sorry it's just at this point I'm a little confused. 

  • If you intend to write your own application, you should read Z-Stack ZNP Interface Specification.pdf in Z-Stack document folder.
  • And what if I wanted to use something ready? 

    Is there some ready application that could interface to CC2531 USB Module ?

    (I assume there is only one for beaglebone and I'm using another platform)

  • If you have BeagleBone, you can use Z-Stack Linux Home Gateway (www.ti.com/.../CC2531EM-IOT-HOME-GATEWAY-RD).
  • No I'm using another more powerful platform. I guess I have to get the source code of Z-Stack Linux Home Gateway, right?
    It's just I couldn't get it yet. We don't have a local TI distributor here. Is there another way to get it?
    It's supposed to be open source.
    Thank you anyway.
  • Yes, you have to sign SLA with TI to get Z-Stack Linux Home Gateway to rebuild it on your platform. The alternative is to use www.ti.com/.../TIDC-ZNP-HOST-SW3.
  • But in TIDC-ZNP-HOST-SW3 in bin folder there are two hex files which by the name it looks like they are for CC2538 board and there are no hex files for CC2531.
    I programmed my CC2531 USB Module with CC2531ZNP-Pro.hex file in Z-Stack Home 1.2.2.42930 .
    Does TIDC-ZNP-HOST-SW3 project also work with CC2531 as well?
  • Yes, it also works with CC2531. You can use prebuilt CC2531 ZNP image.