# \[WP7605\]\[Kernel\] How to make ioctl() exe program to check 8-wire UART in CN600 of mangOH Green

**URL:** <https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [September 29, 2020, 4:26pm UTC](https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429 "2020-09-29T16:26:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)\
**Post date:** [September 29, 2020, 4:26pm UTC](https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429/1 "2020-09-29T16:26:52Z")

</div>

Back Ground:

> [@UART flow control with WP7608](https://forum.legato.io/t/uart-flow-control-with-wp7608/4597/20):
>
> Let’s focus on setting DTR pin in mangOH green board (CN600 connector pin 11) first with my yocto image. Here I have tried the following: root@swi-mdm9x28-wp:~# cm info Device: WP7609 IMEI: 359782080100373 IMEISV: 6 FSN: WA803370311610 Firmware Version: SWI9X07Y\_02.25.02.01 000000 jenkins 2019/01/30 08:13:05 Bootloader Version: SWI9X07Y\_02.25.02.01 000000 jenkins 2019…

Regarding to the above topic, we would like to check this 8-wire UART function by using CN600 in mangOH GREEN board.  
First of all, we’re not sure how to create exe program to check 8-wire UART operation via CN600.

Question:  
Could you please provide any advise how to check 8-wire UART operation via CN600 in mangOH GREEN?  
If we should create new source code that executed ioctl(), we would like to know the detail of C source and Adef code.

Best Regards,

— Hiroki

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 29, 2020, 4:31pm UTC](https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429/2 "2020-09-29T16:31:09Z")

</div>

You can control the DTR/DCD/DSR like the following:

* * *

//DTR  
echo 101 \> /sys/class/gpio/export  
echo out \> /sys/class/gpio/gpio101/direction  
echo 1 \> /sys/class/gpio/gpio101/value

//DCD  
echo 102 \> /sys/class/gpio/export  
echo out \> /sys/class/gpio/gpio102/direction  
echo 1 \> /sys/class/gpio/gpio102/value

//DSR  
echo 103 \> /sys/class/gpio/export  
echo out \> /sys/class/gpio/gpio103/direction  
echo 1 \> /sys/class/gpio/gpio103/value

//setting DTR/DCD/DSR to low  
echo 0 \> /sys/class/gpio/gpio101/value  
echo 0 \> /sys/class/gpio/gpio102/value  
echo 0 \> /sys/class/gpio/gpio103/value

* * *

You can use multimeter to verify on cn600.

---

<div class="post-metadata">

**Author:** ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)\
**Post date:** [September 29, 2020, 11:57pm UTC](https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429/3 "2020-09-29T23:57:18Z")

</div>

Hi, jyijyi

Thank you for the answering, I confirmed it about GPIO control.

Next, I would like to check whether 8-wire UART1 can be worked by ioctl(), instead of GPIO control.  
So could you please advise the way to test ioctl()?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 30, 2020, 12:00am UTC](https://forum.legato.io/t/wp7605-kernel-how-to-make-ioctl-exe-program-to-check-8-wire-uart-in-cn600-of-mangoh-green/5429/4 "2020-09-30T00:00:36Z")

</div>

Please contact FAE for the test build with fix of ioctl().
