• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!
Rickta59

Linux Serial Communication working w/modified cdc-acm module

14 posts in this topic

So I finally tried out the replacement cdc_acm module from the e2e forums. I'm using the file 7028.msp430_patch.zip mentioned in this post http://e2e.ti.com/support/low_power_rf/f/156/p/53610/697952.aspx#697952. I'm using Ubuntu 11.04 with a 2.6.38 kernel. Installing this patch solved my problems with /dev/ttyACM0 and linux.

 

I tried the unmodified Energia ASCII Table example. The code in that sample doesn't wait before sending data, however with this patched module it just works. With the old cdc-acm my whole UI would freeze for multiple 10s of seconds.

 

There are some things that are different from an Arduino. The main one being the launchpad doesn't reset the msp430g2553 chip when it receives a DTR line signal down the /dev/ttyACM0. What does that mean? Opening and closing the serial console doesn't restart the msp430. When you open the window you must press the reset button on the launchpad to have it restart like an Arduino would. However, with this patch, the UI doesn't lock up any more or stall when you first run it. You also don't have to be worried about printing data when the serial console isn't open.

 

Two other people have also tried this patch with similar good results. One system was Ubuntu 10.04/2.6.something kernel and arch linux with a 3.something kernel.

 

I think this goes a long way to addressing stability for the linux version of Energia. Yay Gerald Stanje the kernel hacker author. +1

 

-rick

energia, gordon, pine and 4 others like this

Share this post


Link to post
Share on other sites

Is there an easier way to get the cdcacm drivers working? I'm at my wits end here. I am not a coder so unless the instructions followed to the letter work I cannot get this going. I followed the instructions, copied the 3.0 version of the cdcacm-0.1 files to /usr/src/ and tried to run the install script. No matter what I tried it failed to run with various errors depending on how I tried to run it... sudo, or su'd as root changed the permissions to allow it to be executable etc.

 

I finally tried to just run the commands by hand from the script. 

 

I get these errors when I run th ebuild command:

 

 

 

 

Dallas cdcacm-0.1 # sudo dkms build -m cdcacm -v 0.1
 
Kernel preparation unnecessary for this kernel.  Skipping...
 
Building module:
cleaning build area....(bad exit status: 2)
....(bad exit status: 2)-12-generic all KVERSION=3.0.0-12-generic
Error! Bad return status for module build on kernel: 3.0.0-12-generic (x86_64)
Consult /var/lib/dkms/cdcacm/0.1/build/make.log for more information.

 

And of course the error log just says 'error 2'

 

I've beat my head on the desk enough for tonight....

Share this post


Link to post
Share on other sites

do you have the linux source? build essentials? and the kernel headers?

from what I can tell its failing at clean up, probably unable to find a file or directory.

 

Also your error log only says error 2? no file names or actions of where it failed?

 

I personally dont use DKMS I usually add the code to the kernel source tree and rebuild the modules  

Share this post


Link to post
Share on other sites

I don't think I have the source or kernel headers installed. I know build essentials is installed. Off I go to install some software...

Share this post


Link to post
Share on other sites

Just checked, I do have the kernel headers installed for the current kernel version.

 

Now as to source files... Do you mean *all* of the source files for this distro? Or something more specific?

 

Thank you.

Share this post


Link to post
Share on other sites

Ok the above link seems to have made some progress. Now I can load a sketch to the board. Once. Then I get the following output in the serial monitor when I try to load a different sketch:

 

 

 

Binary sketch size: 479 bytes (of a 16,384 byte maximum)
rf2500: warning: can't detach kernel driver: No data available
Trying to open interface 1 on 005
Device: MSP430G2553
Erasing...
Programming...

 

 
 

Share this post


Link to post
Share on other sites

When you get that cannot detach kernel, usally means to reset or reconnect launch pad, or just do a full reboot...

 

But first Try an disconnect launchpad, wait ~15-~30 seconds reconnect, send new sketch 

Share this post


Link to post
Share on other sites

I just tried that. The LaunchPad had been disconnected from the computer for 20 minutes or so.

 

Now I get this in the serial monitor but no blinking light (Blinky sketch):

 

 

 

 

Binary sketch size: 946 bytes (of a 16,384 byte maximum)
Trying to open interface 1 on 011
Device: MSP430G2553
Erasing...
Programming...

Share this post


Link to post
Share on other sites

can you disconnect and reconnect the launchpad, and paste your demsg output to here.

 

Another thing to try is 'mspdebug rf2500' and see if you get the same thing.

 

we may have to wait till nergia support chimes in, since I am at a loss for what to try next.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now