Jump to content
43oh

Linux Serial Communication working w/modified cdc-acm module


Recommended Posts

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

Link to post
Share on other sites
  • 4 weeks later...
  • 1 month later...
  • 3 months later...

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....

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  

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...

 

 
 
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...
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...