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.

USB Drivers (virtual com port)?

Other Parts Discussed in Thread: CC2531, CC2540, AM1808

Are there available any cc2540 (cc2531 etc) USB drivers (virtual com port) for other OS beside Windows x32/x64?

Does TI intend to release soon and drivers for any of the other popular OS like Linux,Win CE, iOS, Android?

If not – what resources are available to help me do it myself? Is the source for Windows x32/x64 drivers available anywhere?


  • Not sure how helpful this is, but ...

    The USB dongle presents as a CDC Usb device.

    The usb source for the CC2540 dongle is in:


    Looking into, on any platform, what it takes to code to talk to a CDC device may yield some fruit. It may be -nearly- out-of-the-box, aside from command-parsing, and USB descriptor tweaks.






  • On Linux at least (probably similar on OsX), a "virtual com port" for the device is essentially built-in, by way of the built-in usb-cdc  acm driver.

    Connect the dongle, open a terminal, and run:

    <prompt> dmesg

    and look for something like this in the output: 

    [  739.200167] usb 2-2: new full speed USB device using uhci_hcd and address 3
    [  739.442699] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
    [  739.442793] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
    [  739.445732] usbcore: registered new interface driver cdc_acm
    [  739.445742] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters

    If you see the above, then the device /dev/ttyACM0 can be used to send commands to, and receive data from, the device, just like a COM port.

    Michael Devine

  • Michael is right. On all three OSs, you don't need any custom driver. 

    I've tried the usb dongle on both OSX and Linux (BlueZ) and just works.

  • Thanks everybody. This is still a longshot, but I was wondering how scalable among the OSs will be my application.

    Seems like only WinCE  will need some extra work on the driver side for now.

  • WinCE?  Someone still using that OS???

  • I have the USB dongle working under Linux but what are the steps to get it work under OSX?


  • The CC2540 USB dongle implements the USB CDC (communications device class), so a USB CDC driver would be required to talk to the CC2540. I don't know whether OSX contains a native driver.

  • Hi Michael,

    I don't have the cdc_acm lines when I type dmesg. I am usign ubuntu 10.04.

    Do I need to install any general package/driver to make the CC2540 working on linux?

    after connecting the dongle to the pc when I type $ tail /var/log/syslog, these lines are the only lines I get from the syslo.

    Nov  9 11:22:09 sepehr-desktop kernel: [ 6528.828017] usb 6-1: new full speed USB device using uhci_hcd and address 7
    Nov  9 11:22:09 sepehr-desktop kernel: [ 6528.997312] usb 6-1: configuration #1 chosen from 1 choice

    It clearly doesn't recognize the connected USB ACM device.

    Thanks in advance,



  • Hi Sepehr,

    this is strange since ubuntu 10.04 is quite "new".

    Do you have the HostTestRelease flashed in your USB dongle?

    How about doing:

    modprobe cdc-acm

    before attaching the USB?


  • Thanks a lot,

    I am following your wiki page steps.

    Thanks again for your reply.

    I will let you know about the outcome.


  • Was this your problem?

    If so, it would be nice to know for others who may be suffering the same issue.

  • Hi Kazola,


    I didn't have a chance to try it yet. I'll definitely post the result here.

    Thanks for the follow up.


  • Hi Kazola,


    Which IDE, compiler  you used to compile the python code?  Are you using the IAR IDE? Sorry but I'm pretty new in this field. 

    Many thanks in advance,



  • Python is not compiled, is a script language :)

    Forget about IAR in python!

    See this page to get introduced in a quick way, you are gonna love it :)

    Bye! And do not forget to validate the post in order to keep the forum clean!

  • Hi Kazola,


    You are right! :-) I told you I am very new! ;-) Actually the main reason behind everything was that I had not flashed the hosttestrelease to the usb dongle. After flashing the image, now I have a serial port ttyacm0 in my /dev directory and I think every thing is working fine. With your great help of course. Thanks alot.

    But if you don't mind I want to ask you another question. I have an AM1808 zoom development kit with linux 2.6.33-rc4 running on it. The whole point of all these questions was to make the cc2540 working with my development kit not with my linux on pc. cc2540 working with my linux pc was my first step, as a preparation! ;-) Thanks to your helps, it's now working. but when I connect the cc2540 to my development kit the shell environment shows something like this:

    root@am180x-evm:/dev# usb 2-1: new full speed USB device using ohci and address4
    usb 2-1: string descriptor 0 malformed (err = -61), defaulting to 0x0409


    I am pretty sure that installed linux on this develompent kit doesn't have cdc-acm module. And probably for this reason it doesn't recognize the device as a ttyacm0. here is the result of modprobe:

    root@am180x-evm:/dev# modprobe cdc-acm
    FATAL: Module cdc_acm not found.

    Now my question is by any chance do you now how can I add the module to the os? do I need to rebuild some part again?

    Thanks for all your helps again.



  • Well,

    I used to work with an ARM, NSLU2 machine, also known as SLUG. If I do not remember wrong, this one did not have the module activated either. So you should ask to your technical support to rebuild your system by including it.

    I hope you know what does means. The old "make menuconfig" and these kind of things. I suppose you are in a embedded platform since most of the current desktop linux distributions include this module.

    On the other hand, if it is a too much specific TI board, try in other forum, since they will have another one devoted to it :)

    Finally, I don't know if this will be useful to you. I do not know even if it is absurd. But you can check this, inside USB section.

  • Hi Kazola,

    First I wanted to thank you for your help. Your wiki page works perfect. Right now I am using the cc2540 on my linux pc. I also added the C (partially c++) code I am using to work with the usb dongle on linux. It simply reads the data and print it on the screen. I just added this in the case someone needed the C code for cc2450 on linux. I also managed to to build the linux kernel from the scratch for am1808 development board, but with cdc-acm module built in! :-)

    thanks again,



    #include <iostream>
    #include <fcntl.h>
    #include <termios.h>
    #include <stdio.h>
    int main()
    struct termios options;
    int fd, error;
    char test;
    fd = open("/dev/ttyACM0", O_RDWR);
    if (fd == -1)
        printf("\nUnable to open /dev/ttyACM0");
      cfsetispeed(&options, B57600);
      cfsetospeed(&options, B57600);
      options.c_cflag |= (CLOCAL | CREAD);
      options.c_cflag &= ~PARENB;
      options.c_cflag &= ~CSTOPB;
      options.c_cflag &= ~CSIZE;
      options.c_cflag |= CS8;
      options.c_lflag &= ~ECHO;
      options.c_lflag &= ~ECHOE;
      options.c_lflag &= ~ICANON;
      options.c_lflag &= ~ISIG;
      options.c_oflag &= ~OPOST;
      options.c_iflag &= ~INLCR;
      options.c_iflag &= ~ICRNL;
      options.c_iflag &= ~IXON; 
      options.c_cc[VTIME]    = 0;  
      options.c_cc[VMIN]     = 1;
      tcsetattr(fd, TCSANOW, &options);
    tcflush(fd, TCIOFLUSH);
        error = read(fd, &test, 1);
        if (error == 1)
            printf("\n%x", test);
    return 0;

  • Wow!

    This is perfect! Just being curious... can you post a video of the BLE running on that board? :)

    In fact I'm already using this code to manage other similar devices :) Thanks Sepehr, and do not forget to verify this post to keep the forum clean. We can hold future conversations in new threads! :)

  • Hi,

    I am trying to use CC2540 into a BeagleBoard with Angstrom and that doesn't recognize it out of the box.

    Do you mean that I have to compile and run somehow the code provided in here:


    into the Angstrom?

    Isn't a package already available by any chance? Or shouldn't this rather be part of the kernel?



  • Probably, it does not apper as /dev/ttyACMx when you do:


    in the shell.


    It's 6:54 AM in Catalonia... zzzzzzzzz..... what about if you:

    opkg install kernel-module-cdc-acm

    does it appear then when plugging and doing dmesg? 


  • Yes, it does!

    Thanks for this!


    PS: I can't see how to verify your post... is it because the thread has already been marked as answered?


  • Jeje, I'm glad it works.

    I do not know about the "verify" question. Perhaps it is at the post title or at the end of the webpage but it does not matter as long as we do not continue this thread :)

  • Hey,

    Can you guide me on how to get the cc2540 usb dongle working in linux?

  • HI kishen,

    Did u came to know how to make work the cc2540 with linux..