12-08-2016, 11:12 PM
(This post was last modified: 12-08-2016, 11:28 PM by MarkHaysHarris777.)
(12-08-2016, 10:08 PM)psychedup Wrote: >$ screen /dev/ttyS2 115200
If you're using a USB UART adapter make sure it's set up to run on 3.3 volts.
I will add :
uart2: /dev/ttyS2
uart3: /dev/ttyS3
uart4: /dev/ttyS4
You will probably want to do one of the following:
sudo chmod 0777 /dev/ttyS2
or
sudo usermod -aG dialout username
The pl2303 cable from ada fruit is pre-set to 3v3. Other cables like the cp2102 based TTL usb serial bridge are switch or jumper selectable 3v3 or 5v; make sure yours is set to 3v3. This is VERY important.
screen works well, as well minicom, and cu is another option; although cu does not work well with all TTL serial bridge cables ( my CH340G does not work with cu ).
uart3 and uart4 are on the euler bus. uart1 is on the wifi bus , and uart2 is on the pi bus.
Note: a neat trick is to do a loop-back , or sometimes referred to a wrap-plug; that is on uart2 you jumper across Rx--Tx.
First start screen:
sudo screen /dev/ttyS2 115200 (connect nothing to uart2 leave Rx and Tx open)
... then type in the screen... it will appear as though nothing is happening... characters are going out Tx and into oblivion.
... now, jumper across Rx -- Tx. Again, type on the keyboard in screen... this time the characters that you type will appear in your window; the characters are going out Tx and then right back into Rx; wrap, or loopback.
You can use this trick to test your uartx ports, test your comm package, and make sure things are working before you try to connect the uart2 in a project where other factors will complicate debugging.
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )