Sl8082, and PPP for uart connections

Hi,

I have SL8082 and Android RIL 2.0.3 which I try to use in Android. The modem is connected by UART1 on socket board (4 - wire option), uart is remapped from USB.

At the beginning I configured modem for GPRS and started using it by pppd withouut RIL. It works but pppd has connection problems (uart baudrate 115200), it retries several times before it manages to connect - in such case pppd returns 8 - so it looks like some problems with serial port. I wonder, is it possible to use RIL daemon for connection to modem without pppd or with cooperation with pppd. When pppd is alone it configures connection manually using chat scripts etc. what is very painful.

Ril is started with:
/system/bin/rild -l /system/lib/libsierraat-ril.so – -d /dev/ttyO1

and

I/RIL ( 2380): Entering RIL_Init…
I/RIL ( 2380): Opening tty device /dev/ttyO1
I/RIL ( 2380): Network interface was not supplied, falling back on usb0!
E/RILC ( 2380): RIL_register: upgrade RIL to version 4 current version=3
I/RIL ( 2380): queueRunner starting!
I/RIL ( 2380): swiril_cache_set: clearing cache for REGISTRATION_STATE
I/RIL ( 2380): swiril_cache_set: clearing cache for GPRS_REGISTRATION_STATE
I/RIL ( 2380): swiril_cache_set: clearing cache for SIGNAL_STRENGTH
I/RIL ( 2380): swiril_cache_set: clearing cache for OPERATOR
I/RIL ( 2380): swiril_cache_set: clearing cache for QUERY_NETWORK_SELECTION_MODE
I/RIL ( 2380): swiril_cache_set: clearing cache for GET_IMSI
I/RIL ( 2380): swiril_cache_set: clearing cache for DEVICE_IDENTITY
I/RIL ( 2380): swiril_cache_set: clearing cache for GET_IMEI
I/RIL ( 2380): swiril_cache_set: clearing cache for GET_IMEISV
I/RIL ( 2380): swiril_cache_set: clearing cache for BASEBAND_VERSION
I/AT ( 2380): Initialized new AT Context!
I/AT ( 2380): AT(14)> ATE0Q0V1
E/AT ( 2380): In readerloop!!
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
I/AT ( 2380): AT(14)> ATE0Q0V1
E/RIL ( 2380): FAILED to initialize channel!

so RIL tries to communicate to modem but fails.

Thanks in advance.
Carl

Hi Carl,

Seems like both PPPD and RIL failed on your platform.
PPPD -> return 8 (Port cannot be opened)
RIL -> failed to communicate.

Are you using only 1 UART interface to connect SL8082 and your host? And seems like you are expecting RIL + data connection works on 1 UART port? (I am afraid this is not possible…)

Btw, as both RIL and PPPD failed to communicate with module, to solve this pb, have you tried to verify if UART port connection is working (e.g. by sending AT cmd over the UART port) before running RIL or PPPD?
How do you map UART port? Can you share return of “AT!MAPUART?” and “AT+WHCNF?” of your SL8082 module?

Thanks.
L

Hi,

You are right. I need only data connection and when It is connected via usb I have iface given by usb driver and dhcpcd did the job done. At the moment I do not need RIL.

On ttyUSB3 I did not observe such behaviour, connection is clear.

I checked this but chat program alone fails when answer is checked e. g.
chat ‘’ ‘AT’ ‘OK’ > /dev/… but simple writing (echo) to dev causes that the modem
answers (usually). Modem answers but it is not clear i.e. sometimes I have to send few AT to start obtaining answers.

AT+WHCNF?
+WHCNF: 0,0
+WHCNF: 1,0,0
+WHCNF: 2,0
+WHCNF: 3,0,0
+WHCNF: 4,0,0
+WHCNF: 5,0,0
+WHCNF: 6,1,0,0,0,0,0,0

AT!MAPUART?
!MAPUART: 1

My problem is that I can connect to modem using uart but it is unstable.
Sometimes It retries many times and modem reset helps.

chat used in pppd log:
timeout set to 5 seconds
abort on (\nBUSY\r)
abort on (\nERROR\r)
abort on (\nNO ANSWER\r)
abort on (\nNO CARRIER\r)
abort on (\nNO DIALTONE\r)
abort on (\nRINGING\r\n\r\nRINGING\r)
send (AAT^M)
send (AAT^M)
timeout set to 12 seconds
expect (OK)
alarm
Failed

Lotam,

It is only a hunch but when power management is enabled the modem goes low power mode after several seconds. Is it possible to lose several character in AT command (or even commands) . Now I send several dummy ‘AAAAT’ before real connection and it seems to keep the modem awake before chat script enter that part where answers are checked. It is strange but I have to send some “AAAAT” not only one.

I’m testing this now.

Hi Carl,

Yes, I have same guess.
As you do not use DTR and set to 0 (enable) in +WHCNF.
So that UART sleep every 4sec of inactivity, e.g. first “AT” wake module (no OK return) and module sleep again before next AT at timeout of 5 sec.

Try to set below in chat:

  1. add “TIMEOUT 3”

  2. during modem initialization (make it send two “AT” without care the 1st return):

‘’ AT
‘’ AT
OK ATZ

Hope it helps.
L

Hi,

I observe the same behaviour after I changed baudrate from 115200 to 230400 but sending multiple unchecked AT commands do not help - It seems that only modem reset helps.

Regards,
Carl

Hi Carl,

Can you share the pppd log?

Here is my log, using SL8082 on 4 wires UART with below configuration on desktop linux:
!MAPUART:1
+WHCNF: 6,1,0,0,0,0,0,0

First dialup without extra AT and failed as expected,

Jun 25 15:04:46 ltm-laptop pppd[1494]: pppd 2.4.5 started by ltm, uid 0
Jun 25 15:04:47 ltm-laptop chat[1499]: timeout set to 3 seconds
Jun 25 15:04:47 ltm-laptop chat[1499]: abort on (NO DIAL TONE)
Jun 25 15:04:47 ltm-laptop chat[1499]: abort on (NO ANSWER)
Jun 25 15:04:47 ltm-laptop chat[1499]: abort on (NO CARRIER)
Jun 25 15:04:47 ltm-laptop chat[1499]: abort on (DELAYED)
Jun 25 15:04:47 ltm-laptop chat[1499]: send (AT^M)
Jun 25 15:04:47 ltm-laptop chat[1499]: expect (OK)
Jun 25 15:04:50 ltm-laptop chat[1499]: alarm
Jun 25 15:04:50 ltm-laptop chat[1499]: Failed
Jun 25 15:04:51 ltm-laptop pppd[1494]: Exit.

2nd dial with extra “AT” and success with timeout set 3 sec.

Jun 25 15:05:43 ltm-laptop pppd[1510]: pppd 2.4.5 started by ltm, uid 0
Jun 25 15:05:44 ltm-laptop chat[1512]: timeout set to 3 seconds
Jun 25 15:05:44 ltm-laptop chat[1512]: abort on (NO DIAL TONE)
Jun 25 15:05:44 ltm-laptop chat[1512]: abort on (NO ANSWER)
Jun 25 15:05:44 ltm-laptop chat[1512]: abort on (NO CARRIER)
Jun 25 15:05:44 ltm-laptop chat[1512]: abort on (DELAYED)
Jun 25 15:05:44 ltm-laptop chat[1512]: send (AT^M)
Jun 25 15:05:44 ltm-laptop chat[1512]: send (AT^M)
Jun 25 15:05:44 ltm-laptop chat[1512]: expect (OK)
Jun 25 15:05:44 ltm-laptop chat[1512]: AT^M^M
Jun 25 15:05:44 ltm-laptop chat[1512]: OK
Jun 25 15:05:44 ltm-laptop chat[1512]:  -- got it
Jun 25 15:05:44 ltm-laptop chat[1512]: send (ATZ^M)
Jun 25 15:05:44 ltm-laptop chat[1512]: expect (OK)
Jun 25 15:05:44 ltm-laptop chat[1512]: ^M
Jun 25 15:05:44 ltm-laptop chat[1512]: ATZ^M^M
Jun 25 15:05:44 ltm-laptop chat[1512]: OK
Jun 25 15:05:44 ltm-laptop chat[1512]:  -- got it
Jun 25 15:05:44 ltm-laptop chat[1512]: send (AT+CGDCONT=1,"IP","internet"^M)
Jun 25 15:05:45 ltm-laptop chat[1512]: expect (OK)
Jun 25 15:05:45 ltm-laptop chat[1512]: ^M
Jun 25 15:05:45 ltm-laptop chat[1512]: AT+CGDCONT=1,"IP","internet"^M^M
Jun 25 15:05:45 ltm-laptop chat[1512]: OK
Jun 25 15:05:45 ltm-laptop chat[1512]:  -- got it
Jun 25 15:05:45 ltm-laptop chat[1512]: send (ATD*99***1#^M)
Jun 25 15:05:45 ltm-laptop chat[1512]: expect (CONNECT)
Jun 25 15:05:45 ltm-laptop chat[1512]: ^M
Jun 25 15:05:45 ltm-laptop chat[1512]: ATD*99***1#^M^M
Jun 25 15:05:45 ltm-laptop chat[1512]: CONNECT
Jun 25 15:05:45 ltm-laptop chat[1512]:  -- got it
Jun 25 15:05:45 ltm-laptop chat[1512]: send (^M)
Jun 25 15:05:45 ltm-laptop pppd[1510]: Serial connection established.
Jun 25 15:05:45 ltm-laptop pppd[1510]: Using interface ppp0
Jun 25 15:05:45 ltm-laptop pppd[1510]: Connect: ppp0 <--> /dev/ttyUSB0
Jun 25 15:05:46 ltm-laptop pppd[1510]: PAP authentication succeeded
Jun 25 15:05:46 ltm-laptop kernel: [  537.434545] PPP BSD Compression module registered
Jun 25 15:05:46 ltm-laptop kernel: [  537.463775] PPP Deflate Compression module registered
Jun 25 15:05:49 ltm-laptop pppd[1510]: Could not determine remote IP address: defaulting to 10.64.64.64
Jun 25 15:05:49 ltm-laptop pppd[1510]: local  IP address 121.202.38.175
Jun 25 15:05:49 ltm-laptop pppd[1510]: remote IP address 10.64.64.64
Jun 25 15:05:49 ltm-laptop pppd[1510]: primary   DNS address 203.78.32.242
Jun 25 15:05:49 ltm-laptop pppd[1510]: secondary DNS address 203.78.32.243

Hi,
Thanks for your reply.

I will check it again.

Do you use some kind FTDI device to connect to 4-wire uart? There is ppp0 <–> /dev/ttyUSB0 in your log.

Haha, you are so smart.

Sorry for not mentioning, my test is based on USB-to-Serial cable as none of my machines come with physical UART… :angry: And I have a converter to make it physically 4-wires.

Thanks.

Ohhh… stop, please.

relax.

BTW, does it work on your platform now?
Just wondering…

Generally it works - sometimes there was a problem with connecting to modem. Even several AAAT- didn’t help and sometimes modem restart was needed (after SL80xx reset it must be ok - modem isn’t sleeping jet) but it can be some linux and pppd issues. Actually I connect my modem via USB with autoidle enabled and I stopped to play with uart.

Thanks,
Karol

Hi to all,

I’m having the same exact problem, the only way to get out is AAT (one extra ‘A’ at the beginning of the sequence). is there any way to disable the low power mode, it is not necessary in my application and I’m sure it is annoying in many others too. I’m a newcomer with this kind of modem, is there any way I can choose which network to use (GPRS or 3G) before connecting? Plus… is there any way I can ask for RSSI during an active PPP connection? I guess not but it’s allways good to ask. I only have a serial 4 wire connection, no USB.
Thanks in advance to all of you.
Mario.

Hi Guys,
Solved it, the low power mode on the serial port can be disabled in the following way:

AT+WHCNF=6,1,0,0,0,0,1

now you can type anything at any time and the serial port won’t annoy you anymore with its powerdown mode. I still have a ppp connection problem: but i’m not sure it actually is, the fact is that ppp doesn’t detect the other sides communication. If I connect to a provider using any other GSM modem (example fastrack from wavecom) once I dial ATD99**1# i get CONNECT 115200 and then a series of chars which make no sense to me but does to the system (example:~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#&´~~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#&´~~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#&´~~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#&´~~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#&´~~{FF}}#À!}!}!} }6}!}$}%Ü}"}&} } } } }’}"}(}"}#}$À#). This should be the provider trying to establish communication. If I do the same with my SL8082, after reading CONNECT 115200 I only get a blank screen. Has anybody run into this problem?
Thanks in advance,
Best Regards,
Mario.

Hello Mario,
I am having exactly the same problem (a year later). Did anyone reply? Were you able to to get it going?

We are using the 8080, 8082 and 8084 modems. The Cinterion modems begin the PPP session straight after the “CONNECT 115200” but the Sierra Wireless modem is silent.

Regards

Colin Moloney

MTData Pty Ltd.

Hi Colin,
Maybe better to start a new thread so your question can get better exposure, you can link to this old thread for history.

However, according to below,

I believe your observation is vendor/product specific behavior, for SL809x/SL808x (non-T), after we sent ATD*99 to modem, it will respond with “CONNECT” and wait for PPP frame from host.

In most popular dialup tool, e.g. windows dialup, linux PPP, both behavior will works.
Are you working on your proprietary dialer? can you start the PPP session by sending PPP frame on receiving “Connect” from module?

Thx
L