Friday, December 02, 2011

msp430-rf2500 & linux

I bought the msp430-rf2500. A development kit for the msp430 with a wireless 2.4 GHz transceiver. This is an USB programmer with 2 development boards containing an msp430F2274 microcontroller and a CC2500 transceiver. The USB programmer allows to communicate with the UART in the msp430. Under Windows this works fine. Under Linux however, it does not.
After searching high and low, I found a way to successfully connect to the UART without issues. I did this using Debian 6.0.3, kernel version 2.6.32-5-686.
Here's how:

  • disconnect the development board from the USB programmer
  • put the USB programmer (only the programmer!) in the USB port
  • use dmesg to find the device that it registered (/dev/ttyACM0 in my case).
  • now type (replacing ttyACM0 with the device name you found earlier): stty 9600 -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -F /dev/ttyACM0
  • next open the port and start reading from it (for example using minicom, or cat /dev/ttyACM0)
  • and NOW you can put the development board in.

The issue seems to be that the UART is flooding the ACM device, which then decides to disconnect.
Happy hacking!


2 Comments:

At 10 December, 2012 21:32, Blogger Ramiro Matteoda said...

Hi,

I could managed to get the cc2530znp usb coordinator working using your post. Thank you.

My problem now if when the pc is restarted, for example, I need to get it working without me, automatic. could you do that?

I try to run the command with a script but i have read input problem.

regards
Ramiro

 
At 23 March, 2013 17:01, Anonymous Anonymous said...

Hi,

I have found the following to work to connect to the rf2500 under linux (using mandriva 2010). This works even with the target board plugged in.

1. Remove (modprobe -r) all drivers that are trying to talk to the UART.

2. Load the cdc_acm driver (doesn't work, but does something essential)

3. Remove the cdc_acm driver

4. Load the usbserial driver, forcing the vendor and product id to match the proper values.

5. Set the baud rate to 9600. This seems to be optional.

The following script works for me:
#!/bin/bash

sudo modprobe -r cdc_acm
sudo modprobe -r usbserial
sudo modprobe cdc_acm
sudo modprobe -r cdc_acm
sudo modprobe usbserial vendor=0x0451 product=0xf432
sudo stty -F /dev/ttyUSB0 9600

Note that the sudo modprobe usbserial vendor=0x0451 product=0xf432 is all on one line

 

Post a Comment

Links to this post:

Create a Link

<< Home