Linux Serial Communication working w/modified cdc-acm module
Posted 06 July 2012 - 03:20 AM
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
- bluehash, gordon, pine and 4 others like this
Posted 30 July 2012 - 05:06 AM
- Rickta59 and energia like this
Posted 09 December 2012 - 06:25 AM
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.1Kernel 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-genericError! 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....
Posted 10 December 2012 - 02:34 AM
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
Posted 10 December 2012 - 02:40 AM
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...
Posted 10 December 2012 - 02:45 AM
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?
Posted 10 December 2012 - 04:52 AM
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 availableTrying to open interface 1 on 005Device: MSP430G2553Erasing...Programming...
Posted 10 December 2012 - 05:26 AM
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
Posted 10 December 2012 - 05:44 AM
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 011Device: MSP430G2553Erasing...Programming...
Posted 10 December 2012 - 06:21 AM
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.
Posted 10 December 2012 - 06:25 AM
I've shut down my lab for the night. I'll get back tomorrow evening.
Thank you for your help thus far.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users