Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Novice
2,568 Views

How enable UART pins Edison Board

Hello,

I'n new to the Edison world. I'm trying to write a hex value to the serial port and then waiting for the response. However apparently it is necessary to configure those pins first. Found some info on this forum on how to enable the Tx,Rx UART pins in the Edison board by writing shell scripts. I'm using the XDK, how can I do that from the XDK? It's possible? ...or how to do that? It's necessary to do that when using the Edison on the Arduino expansion board?

Thanks in advance!

27 Replies
New Contributor I
24 Views

I'm a bit uncertain what you are witnessing/reporting...

You say "all it receives is:" But what physical device is actually displaying this rhombus for you to see?

It looks to me like what ever it is, it's trying to interpret the hex values as ASCII. A 0x57 is a W in ASCII. So that appears fine.

But, the 0xF4 and 0x00 etc., cannot be rendered generally.

Can you switch the view to "Hex"?

>>"Tested connecting the Edison to a FTDI serial to USB cable back to the laptop and receiving the Edison values with XDK's own serial terminal, using PUTTY and a NodeJS program that wrote to read the serial port, all displaying the same results"

"Same" as in you are seeing the rhombus?

OR "same" as seeing what you are expecting?

Mike

0 Kudos
Valued Contributor II
24 Views

Hi Hungrymind,

I guess it is possible to short Rx and Tx of the serial port with a wire

and check that NodeJS with Serialport library sends and receives the same data.

Have you tried to do this?

BR,

xbolshe

0 Kudos
Novice
24 Views

Hello,

>>"But what physical device is actually displaying this rhombus for you to see?"

 

A Laptop. I'm using the XDK to program the Edison, then wired the UART back to the Laptop via a FTDI serial to USB board, then reading the values with the PUTTY terminal, the XDK itself in the "Terminal tab" or a NodeJS program that wrote to check. All display the rhombus.

My feeling is same as yours. The laptop encodes the USB binary data back to ASCII to render on the screen. The Buffer object does accept encoding. Tried again specifying 'hex', 'utf8' or 'binary' (new Buffer(0xF4,0x57,0x00,0x01,0xB4), 'hex') and the laptop keeps receiving rhombus, W, rhombus which like you said, it's fine. Now all what's required is hook up back into the car PCM and perform some trial and error testing to check if the car responds or read the Edison outgoing UART data with anything else other than the PC and check for the actual binary data being sent (better more efficient approach)..

Thank you! Will come back with results.

Alfredo.

0 Kudos
New Contributor I
24 Views

OK, as long as you understand that issue - it can send folks new to the com port world into the weeds!

It would be good as you proceed to figure out how to see the hex.

I read this elsewhere...In PuTTY:

  • Session | Logging
  • Select All session output, then select save file.
  • After saving the file, use any hex editor to see the result.

Still, there are com port interfaces that show hex natively. I'd have to dig to find one. And they may not be free. :-(

0 Kudos
Novice
24 Views

You're right Mike-SYR. Well a logic analizer with PC capture software is in the mail right now, so I think that will definitely help to see what's going out from that Tx pin!

0 Kudos
New Contributor I
24 Views

Hi CMata_Intel and Mike-SYR,

Am trying to debug my uart communication by doing this "You can also wire the Rx to the Tx of the Edison Module in order to check the output of the Edison". But it seems not to be working out for me. Can please direct me on how to setup a simple code to write and read when the Rx and Tx is connected together?

Thank you in Advance.

Chinedu O

0 Kudos
Community Manager
24 Views

Hi

the communication works by using the newest mraa version, so get the newest image yocto 3.0.

BTW. Using the newest image the communication with the RN2483 works also

Flo1991

0 Kudos
Employee
24 Views

Hi Chinedu,

Did you try with the latest MRAA and image version as Flo1991 suggested?

Regards,

Charlie

0 Kudos