# Setting serial port mode RS232/RS485 in c program

**URL:** <https://www.wago.community/t/setting-serial-port-mode-rs232-rs485-in-c-program/742>\
**Category:** Hardware and Linux\
**Tags:** pfc200, linux\
**Created:** [January 12, 2024, 10:11am UTC](https://www.wago.community/t/setting-serial-port-mode-rs232-rs485-in-c-program/742 "2024-01-12T10:11:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdeVee](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EdeVee](https://www.wago.community/u/EdeVee)\
**Post date:** [January 12, 2024, 10:11am UTC](https://www.wago.community/t/setting-serial-port-mode-rs232-rs485-in-c-program/742/1 "2024-01-12T10:11:33Z")

</div>

Hello,  
We have a WAGO 750-8214 and i’m programming a serial port application. I have not yet been able to find a way to set and get the serial port mode (RS232/RS485) from a c++/c program. Does anybody know where i can find information about this subject?

---

<div class="post-metadata">

**Author:** ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)\
**Post date:** [January 13, 2024, 10:12pm UTC](https://www.wago.community/t/setting-serial-port-mode-rs232-rs485-in-c-program/742/2 "2024-01-13T22:12:12Z")

</div>

Hello,  
You might have a look at this thread. One option is calling the script from your C program.

> [@How To: Using PFC200 Onboard Serial Port with Node-RED](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/2):
>
> To change the serial port mode you can use the command line tool found in /etc/config-tools directory called set\_serial\_mode. cd /etc/config-tools/ To use RS485 (default): ./set\_serial\_mode rs485 To use RS232: ./set\_serial\_mode rs232 [image]

---

<div class="post-metadata">

**Author:** ![EdeVee](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@EdeVee](https://www.wago.community/u/EdeVee)\
**Post date:** [January 15, 2024, 8:00am UTC](https://www.wago.community/t/setting-serial-port-mode-rs232-rs485-in-c-program/742/3 "2024-01-15T08:00:59Z")

</div>

Thank you, that is an option. I will have a look at it… 😃
