Pages: [1]   Go Down
Author Topic: Serial port doesn't work if move to another pc  (Read 822 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello guys,

I recently met a serious problem.
The situation is like this:
Serial communication is the main thing i'm focusing on. I use a computer to burn the firmware and then move to other computer to run. Serial port works fine if i run it after burning directly without moving. But not so lucky if i unplug the usb cable and replug into other computers. What even strange is, when i took the board back to the burning computer to run, it keeps dead. However, after reburning the firmware,  it works again, and this way always works.

I kind of figured out that it is a problem about the serial port is messed up, so i use "minicom" command to fix it, but only works for some of the computers, for the rest of them, i really have no idea. But one thing i sure is, the problem caused by serial port.

Does anyone have the same problem? and Why? Why? Why?

I'm using arduino-0017 on a linux computer and all the other computer using linux too. I use IDE to burn the firmware.
« Last Edit: January 19, 2010, 07:38:33 pm by zhijia » Logged

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not sure how it works on Linux, but on MacOS I think the serial port id is assigned dynamically when you plug in the cable, especially if it goes through a USB hub.

So after you unplug it, the next time you plug it in, a new id is assigned and the one your old configuration "remembered" is no longer valid.

.andy
Logged

.andy

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But the computer i plugged in is "another" computer, there should no be "new" and "old".
Logged

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you say "burn the firmware," do you mean upload a sketch to the Arduino board?

I may have misunderstood what you are trying to do. You are trying to have an Arduino program read/write data from/to the serial port, using Serial.* functions?
Logged

.andy

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes, exactly. Burning firmware means upload sketch to arduino, and read and write to serial port by Serial.* functions. Sorry about my English, describing situation precisely is not so easy smiley

After struggling for a whole day, i think i find how to solve it. First, make sure the baud rate is one of the standard ones, second, reset ft232rl chip every time it's replugged by some way. I tried two ways to do the reset job, one is using a python script with a function setDTR(), another one is by uploading sketch with IDE.

But i'm still not 100% persent sure, any advice?
Logged

Seattle, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 248
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I don't have any suggestions.

But it is certainly important to make sure that the software that is on the other end of the USB serial cable from the Arduino is also set to the same baud rate that you use in Serial.begin().

Beyond that, I don't know what parameters the Serial library expects for the port. Someone else would have to advise you, but I have seen threads on this in the forum, so I know the experts are out there.

Good luck.
Logged

.andy

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 70
http://sc-fa.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, can you post some of your code regarding how you are selecting the serial device?  That may help figure out if there's a problem.
Logged

Pages: [1]   Go Up
Jump to: