Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

Serial connection seems to be refused (at least one way)

CChri35
New Contributor II
1,051 Views

Hi!

I'm trying to do a reliable serial connection between a Windows PC and an Edison. On the PC I'm using

the Arduino Serial Terminal with 9600 Baud. I have opened a terminal on the Edison an typed

"cat /dev/ttyGS0". When I send something with the Arduino Terminal only sometimes the Strings

arrive at the Edison (<10%). When I do a "echo "test123" > ttyGS0" on the Edison, the String arrives

at the Arduino Termial with 100%.

How can this be?

Christoph

1 Solution
Diego_V_Intel
Employee
158 Views

Hello Christoph.P,

I had issues sending serial data to the Edison from the Arduino IDE in the past. The Edison wasn't receiving the data. The reason was the way the data was being sent. I used the Serial.write() method but it seems that the Edison needs to receive the carriage return and the newline characters. I used then the Serial.println() method to send data and it worked fine. You might be facing this same issue.

On the other hand, if you are sending data by typing it in the Serial Monitor, you have to upload a sketch initializing the Serial port first. You can initialize the Serial port with the line Serial.begin(9600);. The sketch should have that line at least to configure the Serial port. Then you should be able to send and receive the serial data.

Regards,

Diego.

View solution in original post

3 Replies
Diego_V_Intel
Employee
159 Views

Hello Christoph.P,

I had issues sending serial data to the Edison from the Arduino IDE in the past. The Edison wasn't receiving the data. The reason was the way the data was being sent. I used the Serial.write() method but it seems that the Edison needs to receive the carriage return and the newline characters. I used then the Serial.println() method to send data and it worked fine. You might be facing this same issue.

On the other hand, if you are sending data by typing it in the Serial Monitor, you have to upload a sketch initializing the Serial port first. You can initialize the Serial port with the line Serial.begin(9600);. The sketch should have that line at least to configure the Serial port. Then you should be able to send and receive the serial data.

Regards,

Diego.

CChri35
New Contributor II
158 Views

Ok. When I upload a sketch first with the "Serial.begin(115200)" command I can receive everything fine. But how todo something äquivalent in my eclipse c++ project?

Diego_V_Intel
Employee
158 Views

Hi Christoph.P,

What the Serial.begin() method does is initialize the Serial port. So, if you are using Eclipse or any other environment, you should initialize the Serial port. The MRAA library might be helpful for you to initialize the Serial port. Take a look at this guide; it might be helpful for you: https://software.intel.com/en-us/node/558579 IoT - Updating and selecting update options for the UPM and MRAA libraries | Intel® Developer Zone

Regards,

Diego.

Reply