UART flow control with WP7608

I want to use UART hardware flow control with WP7608.
How can I read RTS, CTS, DSR and DTR pin states.
It means I want to check each pin is high or low.

You can give a try on this one:

Hi, jyijyi.
Thank you for your replying.

I tried to add some new GPIO according to the page.

{“101”,xx,FUNCTION_EMBEDDED_HOST},
{“102”,xx,FUNCTION_EMBEDDED_HOST},
{“103”,xx,FUNCTION_EMBEDDED_HOST},

However,I don’t know what number I write in the first argument and the second one for RS232C’s pins(DTR, DSR, DCD, RI).

Did the conversation on the page stop?

Could you give me some advices or samples?

BR,
Tanoue

There is answer here:

Hi, jyijyi.
Thank you for your rapid answering.

I recognized that the first arguments are these GPIO numbers.

I want to know more information about the second argument “xx”.

And map those xx number to the MDM CHIP UART DCD/DTR/DSR.

Where are “xx” written like Datasheet?

BR,
Tanoue

I think you should modify like this:
//DTR
{“101”,17,FUNCTION_EMBEDDED_HOST},
//DCD
{“102”,24,FUNCTION_EMBEDDED_HOST},
//DSR
{“103”,36,FUNCTION_EMBEDDED_HOST},

after that you can control the pins by :

echo 101 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio101/direction
echo 1 > /sys/class/gpio/gpio101/value
echo 102 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio102/direction
echo 1 > /sys/class/gpio/gpio102/value
echo 103 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio103/direction
echo 1 > /sys/class/gpio/gpio103/value

Hi, jyijyi.

I tried your suggestion.

I could see GPIO pins.

/sys/class/gpio/gpio101/
/sys/class/gpio/gpio102/
/sys/class/gpio/gpio103/

But these pin’s value is changed, each signal state of output is not changed (always high).
I checked each signal state by linemonitor.

echo 1 > /sys/class/gpio/gpio101/value
echo 0 > /sys/class/gpio/gpio101/value

Do you have any idea?

BR,
Tanoue

I don’t see problem on R12 with attached yocto image.
You can have a try.

I tried it again with your yocto image.
However, the result is not changed.

If I use Legato API, will it solve?

Legato is on top of the yocto, if yocto not working, probably legato api will not work.
As i don’t see problem on mangoh green board, have you double check if you are measuring the correct pins?

Hi Iyiyi,

I’m TAK and FAE in Japan.

Thanks for your support.
I think it is better that you provide sample source code including definition files.

Could you share it ?

Thank you.

–TAK

Please see my modification on yocto/kernel/driver/gpio/gpiolib.c.
gpiolib-sysfs.c (36.7 KB)

Hi, Tanoue-san

Could you check it and please let me know your concerned exactly here.

Thank you.

—TAK

BTW, have you ever tried to read those pin status by ioctl() function?

I tried it again with the provided sample.
The result is not changed.

Then, I did not yet try a way by jyijyi.
If you have some sample, could you provide it for early resolution?

are you testing on MangOH green board to measure the DTS/DSR/DCD?

I’m testing WP7608 on my prototype board made by our company.

It looks no connection DTS/DSR/DCD (only TX/RX/CTS/RTS) on MangOH green board.

Do you know how to check to measure the DTS/DSR/DCD on MangOH green board?

from schematic, the pin for (DTR/DCD/DSR) are on CN600 connector pin 11,13,15.

Thank you for new information.

I wrote a program and ran it with our board and MangOH green board
However, both results are that the state of RS232C’s pins(DTR, DSR, DCD, RI) did not change.

When I ran same program with UbuntuPC, these pins changed.

Do you have any idea?

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/01/30 08:13:05
MCU Version:
PRI Part Number (PN): 9908102
PRI Revision: 001.000
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.056_000
SKU: 1103843
Last Reset Cause: Power Down
Resets Count: Expected: 10 Unexpected: 1
root@swi-mdm9x28-wp:~# legato version
18.10.3_0b50331a9f4d0ecc0fd816c2a1300436
root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7609
Revision: SWI9X07Y_02.25.02.01 000000 jenkins 2019/01/30 08:13:05
IMEI: 359782080100373
IMEI SV: 6
FSN: WA803370311610
+GCAP: +CGSM

OK
ati8
Legato Ver: 18.10.3_0b50331a9f4d0ecc0fd816c2a1300436
Yocto Ver: SWI9X07Y_02.25.02.01 2019-08-08_12:54:14
OS Ver: Linux version 3.18.122 (owner@CNHKG-EX-001367) (gcc version 6.2.0 (GCC) ) #2 PREEMPT Thu Aug 8 12:56:18 HKT 2019
LK Ver: SWI9X07Y_02.25.02.01
RootFS Ver: SWI9X07Y_02.25.02.01 2019-08-08_12:54:14
UserFS Ver: unknown
MCU Ver: unknown

OK
root@swi-mdm9x28-wp:~# echo 101 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~# echo out > /sys/class/gpio/gpio101/direction
root@swi-mdm9x28-wp:~# echo 1 > /sys/class/gpio/gpio101/value
root@swi-mdm9x28-wp:~# echo 0 > /sys/class/gpio/gpio101/value


I measure DTR pin in mangOH green board (CN600 connector pin 11), the status will change.
If you cannot make this work, probably there is hardware problem on your side.