Linux beaglebone 4.1.1-bone9 kernel and set serial

HI all.
Has anyone made setserial working on BBB?

root@beaglebone:~# setserial -g /dev/ttyO[124]
/dev/ttyO1, UART: undefined, Port: 0x0000, IRQ: 156
/dev/ttyO2, UART: undefined, Port: 0x0000, IRQ: 157
/dev/ttyO4, UART: undefined, Port: 0x0000, IRQ: 158

Why UART type is undefined? Why port is 0x0000?
Why any setserial command fail?

root@beaglebone:~# setserial /dev/ttyO4 baud_base 115200
Cannot set serial info: Invalid argument

I have got SIMCOM908 modem connected to UART4.
UART is unresponsive once per 5-8 mins when downloading 100mb zip file.
I thought it is because the serial port is not set up properly.
xon/xof are switched in ppp and in modem.

Kind Regards

Hi Jan,

HI all.
Has anyone made setserial working on BBB?

root@beaglebone:~# setserial -g /dev/ttyO[124]
/dev/ttyO1, UART: undefined, Port: 0x0000, IRQ: 156
/dev/ttyO2, UART: undefined, Port: 0x0000, IRQ: 157
/dev/ttyO4, UART: undefined, Port: 0x0000, IRQ: 158

Why UART type is undefined? Why port is 0x0000?

setserial has not been updated in a long time and so does not understand newer
port types. If you look at the man page for the 'uart' parameter, you'll
see the known values are quite limited compared to the current known
port types in <linux/serial_core.h>

Nor does it understand memory-mapped port addresses.

Why any setserial command fail?

root@beaglebone:~# setserial /dev/ttyO4 baud_base 115200
Cannot set serial info: Invalid argument

The omap_serial driver does not allow port information to be changed
via setserial.

Note that the 8250_omap driver new to Linux 3.19+ does.

I have got SIMCOM908 modem connected to UART4.
UART is unresponsive once per 5-8 mins when downloading 100mb zip file.
I thought it is because the serial port is not set up properly.
xon/xof are switched in ppp and in modem.

You can set the tty baud rate with stty, like so:

$ stty -F /dev/ttyO4 115200

Regards,
Peter Hurley

Hi Peter.
I have got proper communication.
I can start download, but something like that happens regulary:

–2015-07-13 06:57:36-- (try: 2) http://download.thinkbroadband.com/100MB.zip
Connecting to download.thinkbroadband.com (download.thinkbroadband.com)|80.249.9 9.148|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 104857600 (100M), 102175455 (97M) remaining [application/zip]
Saving to: ‘100MB.zip.1’

100MB.zip.1 5%[> ] 5.04M 5.58KB/s in 7m 2s

2015-07-13 07:04:24 (6.04 KB/s) - Connection closed at byte 5289637. Retrying.

–2015-07-13 07:04:26-- (try: 3) http://download.thinkbroadband.com/100MB.zip
Connecting to download.thinkbroadband.com (download.thinkbroadband.com)|80.249.9 9.148|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 104857600 (100M), 99567963 (95M) remaining [application/zip]
Saving to: ‘100MB.zip.1’

100MB.zip.1 7%[+ ] 7.55M 6.58KB/s in 6m 46s

2015-07-13 07:11:14 (6.32 KB/s) - Connection closed at byte 7915442. Retrying.

–2015-07-13 07:11:17-- (try: 4) http://download.thinkbroadband.com/100MB.zip
Connecting to download.thinkbroadband.com (download.thinkbroadband.com)|80.249.9 9.148|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 104857600 (100M), 96942158 (92M) remaining [application/zip]
Saving to: ‘100MB.zip.1’

100MB.zip.1 10%[+> ] 10.18M 6.49KB/s in 7m 11s

2015-07-13 07:18:30 (6.25 KB/s) - Connection closed at byte 10676027. Retrying.

–2015-07-13 07:18:34-- (try: 5) http://download.thinkbroadband.com/100MB.zip
Connecting to download.thinkbroadband.com (download.thinkbroadband.com)|80.249.9 9.148|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 104857600 (100M), 94181573 (90M) remaining [application/zip]
Saving to: ‘100MB.zip.1’

100MB.zip.1 12%[++++> ] 12.89M 6.26KB/s in 7m 32s

2015-07-13 07:26:06 (6.14 KB/s) - Connection closed at byte 13520551. Retrying.

–2015-07-13 07:26:11-- (try: 6) http://download.thinkbroadband.com/100MB.zip
Connecting to download.thinkbroadband.com (download.thinkbroadband.com)|80.249.99.148|:80… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 104857600 (100M), 91337049 (87M) remaining [application/zip]

I am using pure xon xoff flow control. Modem doesn’t have RTS CTS connected.
I have applied your http://www.spinics.net/lists/linux-omap/msg119478.html
but I am not sure if it is relevant.
I am just trying and trying to make it work.

I am using pure xon xoff flow control. Modem doesn't have RTS CTS connected.
I have applied your http://www.spinics.net/lists/linux-omap/msg119478.html
but I am not sure if it is relevant.
I am just trying and trying to make it work.

The errors below seem like carrier loss.
That patch is for a different driver, and I can't see how it would apply
to this situation anyway.

What baud rate are you trying to run s/w flow control at?
Why not connect up RTS/CTS?
Can you monitor the DCD output from the modem?

Regards,
Peter Hurley

Hi Peter.
It is not carrier. I am pinging in the same time and there is no packets lost.
Also ppp doesn’t report anything and works as if connected.

It is also not a website problem.
I can’t use CTS and RTS of any UARTS because I am using those pins.

115200
I don’t know what DCD means, but I will find out and answer your question.

At least it works, wget can finish after n tries.
Before the 8250 patch BBB was constantly crashing,
Thanks

Hi Peter.
It is not carrier. I am pinging in the same time and there is no packets lost.
Also ppp doesn't report anything and works as if connected.

It is also not a website problem.

Because you're mimicking the setup on a non-BBB and it works fine?

I can't use CTS and RTS of any UARTS because I am using those pins.

115200

This may be too fast for XON/XOFF flow control; what happens if you run 38400?

I don't know what DCD means, but I will find out and answer your question.

DCD is the carrier pin from the modem.

At least it works, wget can finish after n tries.
Before the 8250 patch BBB was constantly crashing,

That's very odd because you're not using the serial driver that patch was for.

ttyO<n> are device nodes created by the omap-serial driver; my patch is for
the 8250_omap driver which creates ttyS<n> device nodes.

Hi Peter.
Thank you very much for your answer.
Yes, the website I do download test from is up online all the time.
I am running 4.1.2-bone12 kernel so I am using ttyS4, but that is good point, it behaves the same when I use the 4.0.4-bone4 kernel which has got ttyO4.

So this behavior is not related to the serial driver being in use.
I will test 38400
Kind Regards

Hi Peter.
The modem/bbb behaves the same at 38400.
I am using the newest 4.2.0-rc4-bone2 kernel.
Hmm, at least it works. In previous version of kernel downloading big file was crashing the system.
Kind Regards