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!
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?
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?
>>"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.
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:
Still, there are com port interfaces that show hex natively. I'd have to dig to find one. And they may not be free. :-(
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.
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