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.