# RS232/RS485

## {{@264#bkmrk-open-iot-and-iiot-ga}}


Link to repositories:

- [C](https://github.com/Redisage/STM32_Open_IoT_and_IIoT_Gateways_examples/tree/main/RS_Example)

This script tests internal communication between serial ports with the possible lowest (2400) and highest (115200) baudrate.

For this example, connect each port's transceiver with the receiver:

[![image.png](https://doc.redisage.com/uploads/images/gallery/2025-02/scaled-1680-/image.png)](https://doc.redisage.com/uploads/images/gallery/2025-02/image.png)[![image.png](https://doc.redisage.com/uploads/images/gallery/2025-02/scaled-1680-/jkIimage.png)](https://doc.redisage.com/uploads/images/gallery/2025-02/jkIimage.png)

Default settings:

- baud rate: 115200
- data bits: 8
- parity bits: 0
- stop bits: 1
- receiver timeout: 3s

If the connection is right, you should see the messages shown below for each U(S)ART:

[![image.png](https://doc.redisage.com/uploads/images/gallery/2025-01/scaled-1680-/sktimage.png)](https://doc.redisage.com/uploads/images/gallery/2025-01/sktimage.png)

If something goes wrong with the connection, you will see the message for a specific port like below:

[![image.png](https://doc.redisage.com/uploads/images/gallery/2025-01/scaled-1680-/c10image.png)](https://doc.redisage.com/uploads/images/gallery/2025-01/c10image.png)