# BPI-M1 UART interface

BPI-M1 have 4 UART port on board.

**How to use serial port with minicom.**

1 use ssh connect to BPI-M1 and install minicom

```
sudo apt-get install minicom
```

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-L0HwDbM3UWZCA8%2Fuart.jpg?generation=1584080158417868\&alt=media)

2 choose serial port

```
minicom -s
```

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-L2MJBnUtqfXbR_%2Fuart%201.png?generation=1584080158434016\&alt=media)

Uart port for BPI-M1

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-L4yDRwqxBh_3ic%2Fuart%20en.png?generation=1584080156859316\&alt=media)

now , we test UART2 ,setting as below:

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-L69UtBcAq4NZA4%2Fuart%202.jpg?generation=1584080158338780\&alt=media)

save:

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-L8nKjBtTlKmSp-%2Fuart%203.png?generation=1584080158262235\&alt=media)

exit, minicom runing:

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-LAB3uNBz2GOLgz%2Fuart%204.jpg?generation=1584080158962812\&alt=media)

check Uart number:

```
dmesg | grep ttyS*
```

so you can see UART0 is ttyS1

3 you can use windows hyperterminal or putty on you PC，and setting the right Uart number.

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-LCeb2DXQVG8gW8%2Fuart%205.jpg?generation=1584080159548036\&alt=media)

4,test function:

BPI-M1 send "hello, pc"

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-LEXeyWYdcmQUYB%2Fuart%207.jpg?generation=1584080158269617\&alt=media)

BPI-M1 receive " hello Ok"

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-LGwjnNEFKRG6tf%2Fuart%206.jpg?generation=1584080156946052\&alt=media)

5 you can use the same way to test UART3(ttyS2)、UART7(ttyS3).so all is working fine.

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX-LIQTrvTQ8jyV8u%2Fuart%208.jpg?generation=1584080158869772\&alt=media)
