1. Auto load UART
Setting
check crontab
setting is correct or not?
command ->
sudo crontab -e
![](images-2/uart-pi-auto-01.jpg)
example for 4 UART port
0x4C , 0x4D
Auto Load Pi8s when Pi Boot
sudo crontab –e
add 4 line in the end of file
@reboot /usr/bin/./Pi8s –a 0x4C –c 1 –b 38400 –s 1
@reboot /usr/bin/./Pi8s –a 0x4C –c 2 –b 38400 –s 2
@reboot /usr/bin/./Pi8s –a 0x4D –c 1 –b 38400 –s 3
@reboot /usr/bin/./Pi8s –a 0x4D –c 2 –b 38400 –s 4
when load minicom also open port1 (picom1
/dev/pts/x)
minicom –D $(cat /dev/picom1)
(2) Use our Scan.sh check system available UART status
Scan.sh can help you know the
UART port status
![](images-2/uart-pi-auto-scan01.jpg)
![](images-2/uart-pi-auto-scan02.jpg)
(3) in terminal
mode type "top" to check how many UART port in
system
if you have 2 UART
product you should see 2 Pi8s run in system
![](images-2/pi-uart-2port-status-01.jpg)
if you have 4 UART
product you should see 4 Pi8s run in system
![](images-2/pi-uart-4port-status-01.jpg)
(4)
increase
i2c bus speed to prevent data lost
Check your
i2c bus speed setting in /boot/config.txt
add a line in end of file
dtparam=i2c1_baudrate=400000
![](images-2/pi-uart-i2c-bus-speed-status-01.jpg)
suggest use Raspbian Image
raspbian-2017-04-10
old image can download
Here
(5) Command
mode for UART HAT
Also provided is a terminal command mode to activate serial ports through a terminal / ssh.
You can also activate a serial port on boot up with the provided software.
Commands for starting the serial ports via command line;
./Pi8s -a ADDR -c CHANNEL -b BAUD -s DEVPTS
ADDR = Address of Serial Port e.g. 0x48, 0x49, 0x4C, and 0x4D
CHANNEL = Channel of serial Port ( 1 / 2 )
BAUD = Baud Rate for the Serial Port
DEVPTS = PICOM Service Number ( Will direct the filename to /dev/picomX where X = your number )
For example, To start a serial port from 0x49, on channel 2 with 115200 Baud run the following;
./Pi8s -a 0x49 -c 2 -b 115200 -s 1
This will activate the serial port and then set /dev/picom1 to your serial port location /dev/pts/X
![](images-2/4xuart-manual-04.jpg)
![](images-2/4xuart-manual-05.jpg)
1. device ->
/dev/pts/1
2 . Baud rate
à
38400
3. click
Open device
4. input AT command (HC-05 blutetooth module)
5. screen will show Bluetooth module response
(6) PiCOM 1~4 and
/dev/pts/x
Q:
M y Serial software keeps telling me /dev/picom1 isn't a
serial port:
A: /dev/picomX isn't a serial port, its a file
that stores the location
of the serial port as a link. such as
/dev/pts/5
use
Scan.sh can help you know the status PiCOM 1~4 and
/dev/pts/x
![](images-2/4xUART-scan-pts-02-s.jpg)
When you click "Open device" the
message screen display information about
/pts/x
only, can't open
/dev/picom 1~ 4
, the /dev/picom1 ~4
is
not a real com port
(7) PiCOM 1~4 and
/dev/pts/x loop test
Port 2 Tx
to Port 1 Rx
Port 1 Tx
to Port 2 Rx
Port 4 Tx
to Port 3 Rx
Port 3 Tx
to Port 4 Rx
![](images-2/uart-loop-tesr-01-s.jpg)
(8) Pi Raspbian stretch
image install new ver cutecom
new Version Cutecom input /dev/pts/x
login as user pi ,
edit file
/home/pi/.config/Cutecom/Cutecom5.conf
save after edit, then
click "cutocom "
![](images-2/cutecom-set01.jpg)
![](images-2/cutecom-set02.jpg)
|