Jump to content
Forum sending old emails Read more... ×
Sign in to follow this  
valerybriz

Hardware UART not working in Linux

Recommended Posts

Hi all

well I got a problem with my Serial comunication, when I conect my launchpad with the jumpers in the default (software uart position) parallel like:

 

|| || || ||

 

almost everything works ok, i can programm my launchpad with energia I can see the Serial port is right But when i try to test the serial comunication with de serial monitor it can not send anything or recieve.

 

then I desconect and change the jumpers for a Hardware UART like:

 

= || || ||

 

then i conect my launchpad and i can not see my serialport name on energia and can not open the serial monitor.

 

Im working on UBUNTU 12.04

 

Any Ideas?

 

thanks.

 

Valery

Share this post


Link to post
Share on other sites

How do you have your pins configured ?  

 

You are using P1.1, and P1.2 right ?

 

Have you setup udev rules accordingly ?

 

Showing us the code you're working with would help greatly.

Share this post


Link to post
Share on other sites

 

well yes i already tried those two, doesnt works...

 

 

How do you have your pins configured ?  

 

You are using P1.1, and P1.2 right ?

 

Have you setup udev rules accordingly ?

 

Showing us the code you're working with would help greatly.

 

I'm not using directly from pins P1.1 and P1.2 im doing it just conecting the launchpad by USB to the computer.

 

 

Well... it works on Windows perfectly I just conect it and serial port starts to send and recieve data i have tried with many codes but this is one that works on windows:

 

 

 

void setup() {
  Serial.begin(9600);
  Serial.print("\n\n\n*** Serial test starts \n"); 
  Serial.print("PUSH2 to end\n"); 
  pinMode(PUSH2, INPUT_PULLUP);     
}
 
 
void loop() {
 
  if (Serial.available())   {
    Serial.print(char(Serial.read()));
  } 
  else {  
    Serial.print(".");
    delay(500);
  }
  
  if (digitalRead(PUSH2)==LOW) {
    Serial.print("\n\n*** Serial test ends. \n"); 
    Serial.end();
    while(true); // endless loop
  }
}
 
/////////////////////////////////////////
 
Just to be really clear, I do can programm my launchpad on UBUNTU it recognize it and everything works fine but when i want to send or recieve something by UART (on software UART)  it just doesnt send or recieve it, and when I change the pins to HARDWARE UART I conect the launchpad but energia doesnt recognize my launchpad so I can not use de Serial Monitor Utility... 
 
THANKS FOR YOUR REPLYS :)

Share this post


Link to post
Share on other sites

On my ubuntu 11.04 setup, I cannot use the cdc_acm driver that ships with the system. When I plug in the launchpad it just locks up the system while it tries to enumerate. If the firmware you load on your launchpad prints before ubuntu has enumerated then it just fails. Basically, the stock cdc_acm doesn't like the way the usb serial port firmware works on the launchpad.

 

So, have you tried using the modified linux cdc driver mentioned in the wiki?

 

You do have a version 1.5 launchpad board yes? Rotating the jumper pins on a 1.4 board will damage your board.

Share this post


Link to post
Share on other sites

Have you looked at your dmesg output?

Unplug your launchpad, wait, wait ... open a command window and tail your syslog.

# tail -f /var/log/syslog


... plug in your device...

 

look for output that looks something like this:

Jan 24 14:44:56 ubuntu kernel: [688267.722444] usb 1-1.1.1: USB disconnect, address 38
Jan 24 14:45:01 ubuntu kernel: [688273.056218] usb 1-1.1.1: new full speed USB device using ehci_hcd and address 39
Jan 24 14:45:01 ubuntu kernel: [688273.193294] cdc_acm 1-1.1.1:1.0: This device cannot do calls on its own. It is not a modem.
Jan 24 14:45:01 ubuntu kernel: [688273.193303] cdc_acm 1-1.1.1:1.0: No union descriptor, testing for castrated device
Jan 24 14:45:01 ubuntu kernel: [688273.193339] cdc_acm 1-1.1.1:1.0: ttyACM0: USB ACM device

 

If you see the ttyACM0 then your system is recognizing the launchpad.

 

Do you have a modem manager installed?  is it trying to use your launchpad as a modem? If so then disable the modem manager.

 

 

 

Share this post


Link to post
Share on other sites

Other people running ubuntu 12.04 who have used the launchpad with  it.

 

http://forum.43oh.com/topic/2296-linux-serial-communication-working-wmodified-cdc-acm-module/

 

You also need to create a udev entry so that non-root users can access /dev/ttyACM0.  Thinking about

it ... that is probably your problem.  Sorry I didn't mention it earlier.

 

$ cat /etc/udev/rules.d/61-tilaunchpad.rules
# This file allows access to TI launchpad
# See udev(7) for syntax.
#
SUBSYSTEM=="usb",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="f432",MODE="0666"

 

search 43oh.com for 'udev rules' for more info.

rules.zip

Share this post


Link to post
Share on other sites

Other people running ubuntu 12.04 who have used the launchpad with  it.

 

http://forum.43oh.com/topic/2296-linux-serial-communication-working-wmodified-cdc-acm-module/

 

You also need to create a udev entry so that non-root users can access /dev/ttyACM0.  Thinking about

it ... that is probably your problem.  Sorry I didn't mention it earlier.

 

$ cat /etc/udev/rules.d/61-tilaunchpad.rules
# This file allows access to TI launchpad
# See udev(7) for syntax.
#
SUBSYSTEM=="usb",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="f432",MODE="0666"

 

search 43oh.com for 'udev rules' for more info.

 

Thanks I'm going to try it :)

Share this post


Link to post
Share on other sites

You also need to create a udev entry so that non-root users can access /dev/ttyACM0.  Thinking about

it ... that is probably your problem.  Sorry I didn't mention it earlier.

I did, but was not sure since I do not use ubuntu. I have read many comments on the web about having to setup udev rules for various USB / embedded development environments  though. android, launchpad, etc. Kind of makes sense  considering it works on windows, and not ubuntu.

Share this post


Link to post
Share on other sites

ok so this is what i got when i try this, and no i dont have a modem manager installed :)

 

 

Jan 26 20:46:32 AOA150 kernel: [22173.352171] usb 2-1: USB disconnect, device number 2
Jan 26 20:46:44 AOA150 kernel: [22185.304124] usb 2-1: new full-speed USB device number 3 using uhci_hcd
Jan 26 20:46:44 AOA150 kernel: [22185.518482] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
Jan 26 20:46:44 AOA150 kernel: [22185.518510] cdc_acm 2-1:1.0: No union descriptor, testing for castrated device
Jan 26 20:46:44 AOA150 kernel: [22185.518615] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
Jan 26 20:46:44 AOA150 mtp-probe: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1"
Jan 26 20:46:54 AOA150 kernel: [22195.586156] generic-usb 0003:0451:F432.0002: usb_submit_urb(ctrl) failed
Jan 26 20:46:54 AOA150 kernel: [22195.586212] generic-usb 0003:0451:F432.0002: timeout initializing reports
Jan 26 20:46:54 AOA150 kernel: [22195.587061] generic-usb 0003:0451:F432.0002: hiddev0,hidraw0: USB HID v1.01 Device [Texas Instruments Texas Instruments MSP-FET430UIF] on usb-0000:00:1d.0-1/input1
Jan 26 20:46:55 AOA150 mtp-probe: bus: 2, device: 3 was not an MTP device
 

Share this post


Link to post
Share on other sites

Other people running ubuntu 12.04 who have used the launchpad with  it.

 

http://forum.43oh.com/topic/2296-linux-serial-communication-working-wmodified-cdc-acm-module/

 

You also need to create a udev entry so that non-root users can access /dev/ttyACM0.  Thinking about

it ... that is probably your problem.  Sorry I didn't mention it earlier.

 

$ cat /etc/udev/rules.d/61-tilaunchpad.rules
# This file allows access to TI launchpad
# See udev(7) for syntax.
#
SUBSYSTEM=="usb",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="f432",MODE="0666"

 

search 43oh.com for 'udev rules' for more info.

 

ok I added the rule to udev but still doesnt working... :(

 

something weird is that when i use the jumpers rotated and run energia, when i select TOOLS from the menu it crash a bit and then it shows the TOOLS menu but serial port is disable...

 

I dont know what is happening... 

 

Thanks for the replies :)

Share this post


Link to post
Share on other sites

I am not sure the problem I have is the same as yours, but worth a try a trick that is to disconnect the LP after programming, wait a while, keep the LP RESET button pressed, and then reconnect the LP (still keep the RESET button pressed). After Ubuntu recognize the LP, release the RESET button. Using this on Ubuntu 12.04 LTS on a beagleboard. And yes have to do this everytime and the goal is to disallow anything got send first from the LP side until the basic USB connetion is established.

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
Sign in to follow this  

×