OpenWrt Forum Archive

Topic: 3G / HSPA Router with SIM CARD slot

The content of this topic has been archived between 6 Apr 2018 and 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I tried changing GPIO states, i got 2 LED lighting up but i can't turn them off afterwards.

I look for documentation on GTM661 and on the Option website download section there is a Linux driver : http://www.option.com/support/986/downloads

I'll try to build it, will see.

I look for the card chip and found the documentation for another card : http://anydatatw.com/workAdmin/UpLoad/R … 153704.pdf

Would the pinout be the same on the GTM661 ? I should be able to talk the card through its UART port ?

How could i get more information ? Option Support Helpdesk ?

By Toggling GPIO 4 and 5, 3 or 5 times, the LEDs light up one after the other and after the red and before the blue i get :

[  135.592000] usb 1-1.1: new high-speed USB device number 3 using ehci-platform

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:2412 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0af0:9000 Option 

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0af0 ProdID=9000 Rev= 0.00
S:  Manufacturer=Option N.V.
S:  Product=Globetrotter HSUPA Modem

Dialogue with the modem is good

root@OpenWrt:~# comgt -d /dev/ttyHS1
SIM ready
Waiting for Registration..(120 sec max)
Registered on Home network: "Orange F",2
Signal Quality: 2,99

root@OpenWrt:~# comgt -d /dev/ttyHS1 info
##### Wireless WAN Modem Configuration #####
Product text:
====

Manufacturer: Option N.V.
Model: GTM661
Revision: 1.8.4.6 (Date: Jan 29 2013, Time: 15:18:57)
OK
====
Manufacturer:           Option N.V.
IMEI and Serial Number: #######################
Manufacturer's Revision: 
1.8.4.6 (Date: Jan 29 2013, Time: 15:18:5
Hardware Revision:      3.1
Network Locked:         0
Customisation:          

Band settings:          (
)
APN:                    1,"IP","orange","0.0.0.0",0,0
##### END #####

I configured /etc/config/network with

#### WWAN Configuration
config interface wwan
        option ifname  ppp0
        option proto   3g
        option service umts
        option device  /dev/ttyHS1
        option apn     orange
        option pincode ####

The device /dev/ttyHS1 work better than /dev/ttyHS2 which return an ALARM before Failing

Oct 22 20:48:19 OpenWrt daemon.notice netifd: wwan (7990): SIM ready
Oct 22 20:48:19 OpenWrt daemon.notice netifd: wwan (7990): PIN set successfully
Oct 22 20:48:19 OpenWrt daemon.notice netifd: wwan (7990): Trying to set mode
Oct 22 20:48:20 OpenWrt daemon.notice pppd[8002]: pppd 2.4.5 started by root, uid 0
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: abort on (BUSY)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: abort on (NO CARRIER)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: abort on (ERROR)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: report (CONNECT)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: timeout set to 10 seconds
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: send (AT&F^M)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: expect (OK)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: AT&F^M^M
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: OK
Oct 22 20:48:28 OpenWrt local2.info chat[8055]:  -- got it
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: send (ATE1^M)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: expect (OK)
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: ^M
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: ATE1^M^M
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: OK
Oct 22 20:48:28 OpenWrt local2.info chat[8055]:  -- got it
Oct 22 20:48:28 OpenWrt local2.info chat[8055]: send (AT+CGDCONT=1,"IP","orange"^M)
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: timeout set to 30 seconds
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: expect (OK)
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: ^M
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: AT+CGDCONT=1,"IP","orange"^M^M
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: OK
Oct 22 20:48:29 OpenWrt local2.info chat[8055]:  -- got it
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: send (ATD*99***1#^M)
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: expect (CONNECT)
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: ^M
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: ATD*99***1#^M^M
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: ERROR
Oct 22 20:48:29 OpenWrt local2.info chat[8055]:  -- failed
Oct 22 20:48:29 OpenWrt local2.info chat[8055]: Failed (ERROR)

I need to try some option to get it to work

I used the orange APN orange.fr with user and password orange, no better result.

With option device '/dev/ttyHS2'

OpenWrt local2.info chat[2206]: send (ATD*99***1#^M)
OpenWrt local2.info chat[2206]: expect (CONNECT)
OpenWrt local2.info chat[2206]: ^M
OpenWrt local2.info chat[2206]: alarm
OpenWrt local2.info chat[2206]: Failed

Trying again with '/dev/ttyHS2' gives the folowing status on interface

"up": false,
"pending": true,
"available": true,
"autostart": false,
"proto": "3g",
"data": {
 },
"errors": [
  {
        "subsystem": "3g",
        "code": "PIN_FAILED"
   }
]

Same for '/dev/ttyHS0'


With option device '/dev/ttyHS3'

OpenWrt local2.info chat[2951]: send (ATD*99***1#^M)
OpenWrt local2.info chat[2951]: expect (CONNECT)
OpenWrt local2.info chat[2951]: ^M
OpenWrt local2.info chat[2951]: ATD*99***1#^M^M
OpenWrt local2.info chat[2951]: NO CARRIER
OpenWrt local2.info chat[2951]:  -- failed
OpenWrt local2.info chat[2951]: Failed (NO CARRIER)

But on this tty i'm getting a kernel warning  usb 1-1.1: hso received invalid serial state notification


With option device '/dev/ttyHS1'

OpenWrt local2.info chat[2432]: send (ATD*99***1#^M)
OpenWrt local2.info chat[2432]: expect (CONNECT)
OpenWrt local2.info chat[2432]: ^M
OpenWrt local2.info chat[2432]: ATD*99***1#^M^M
OpenWrt local2.info chat[2432]: ERROR

I found a description on debian with a 3G Dongle connecting to orange. I'll try to do it manually.

The ^M character is ctrl m and send a return to validate the command ( part of VT100 terminal emulation ). I wrote the same commands with minicom to the tty and getting same fail or error result.

(Last edited by Kyklas on 24 Oct 2013, 08:42)

Alright, 3G working with 336 ms ping to google.fr.

OpenWrt local2.info chat[1354]: AT+CGDCONT=1,"IP","websfr"^M^M
OpenWrt local2.info chat[1354]: OK
OpenWrt local2.info chat[1354]:  -- got it
OpenWrt local2.info chat[1354]: send (ATD*99***1#^M)
OpenWrt local2.info chat[1354]: expect (CONNECT)
OpenWrt local2.info chat[1354]: ^M
OpenWrt local2.info chat[1354]: ATD*99***1#^M^M
OpenWrt local2.info chat[1354]: CONNECT

I switched to the SFR 3G SIM that will be used with the router. I think my cell phone SIM card doesn't allow internet connection in the same way as the 3G SIM.

The /dev/ttyHS1 is not meant to connect.

OpenWrt local2.info chat[3039]: ATD*99***1#^M^M
OpenWrt local2.info chat[3039]: ERROR

The /dev/ttyHS2 fails. And HS0 give PIN_FAILED.


I have the warning with HS3 : hso received invalid serial state notification, perhaps look at Option Linux Driver.

When testing ttyHSx, the modem return NO CARRIER when turning up interface. After a reboot, up & down works. Perhaps try again with my Orange SIM.

I'll try making a lighter OpenWRT Image for the router.

Adding the init script for GTM661

root@OpenWrt:~# cat /etc/init.d/gtm661
#!/bin/sh /etc/rc.common

START=11

cd /sys/class/gpio

echo 4 > export
echo 5 > export

cd

echo out >  /sys/devices/virtual/gpio/gpio4/direction
echo 1 > /sys/devices/virtual/gpio/gpio4/value

echo out >  /sys/devices/virtual/gpio/gpio5/direction
echo 1 > /sys/devices/virtual/gpio/gpio5/value

echo out >  /sys/devices/virtual/gpio/gpio4/direction
echo 1 > /sys/devices/virtual/gpio/gpio4/value

echo out >  /sys/devices/virtual/gpio/gpio5/direction
echo 1 > /sys/devices/virtual/gpio/gpio5/value

echo out >  /sys/devices/virtual/gpio/gpio4/direction
echo 1 > /sys/devices/virtual/gpio/gpio4/value

echo out >  /sys/devices/virtual/gpio/gpio5/direction
echo 1 > /sys/devices/virtual/gpio/gpio5/value

echo out >  /sys/devices/virtual/gpio/gpio4/direction
echo 1 > /sys/devices/virtual/gpio/gpio4/value

echo out >  /sys/devices/virtual/gpio/gpio5/direction
echo 1 > /sys/devices/virtual/gpio/gpio5/value

2 LED lights up, toggling one more time lights up the 3rd but from there to use the LED i don't know.

(Last edited by Kyklas on 24 Oct 2013, 18:32)

I test download with OpenWRT and got a 2MB/s download which compare to my 512KB/s home connection is great.

I'll test with GS when i get another device.

To create a OpenWRT image, when i clone git repository, i'm looking for the trunk directory but can't find it. Or is the git directory the trunk, i'm looking for and the build directory ?

I'll try the patch you gave me and the Linux driver for GTM661W from Option.

Hi,

I downloaded the Attitude Adjustment trunk and build it.
I got binaries for brcm47xx default device.

How can I create a image openwrt-#MyDeviceName#_squashfs.bin ?
I compared the default image with the on i got from pcekspert.com and i'm missing the firmware header which may cause CFE Boot Failure.

How can i specified the device i want to build an image for and the correct firmware header ?

The patch given on pcekspert.com has firmware header information but i'm not sur how to apply it and if it will add a new platform to menuconfig.

(Last edited by Kyklas on 26 Oct 2013, 16:06)

Hi,

I compile and flash successfully a custom image. The header need to be manually created so CFE will boot on it.
I'll make a light image available for folks.

Is there a way to have openwrt build root create the header for us ?

While testing 3G connection speeds, i notice the device rebooting on it's own, no information on serial link.

I'm wondering how to solve this, probably a driver issue. Kernel warning with invalid serial state. I tested with my image, the image I got from internet same result.
The device is stable is original firmware.

Did someone tested a device with the GTM382 modem ? Is the device stable ?

The driver available on the option site are up to kernel 3.2, so i try doing something with backfire but a default backfire image is not booting on the device. No much is shown on serial. I look if the same file are present to apply the patch but patch 025 is not in the patch directory.

I don't have a another device with a suitable PCIE port but even then the SIM would be missing.

Any tips on how to improve the driver with the option patches. Would there be a big difference between kernel 3.2 and 3.3 ?


Adding console at reboot :

root@OpenWrt:/#
root@OpenWrt:/# Decompressing...............done

CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
root@OpenWrt:/# Nov  4 18:52:04 OpenWrt daemon.info dnsmasq-dhcp[935]: DHCPINFORM(br-lan) 192.168.1                           .156 48:5b:39:e7:e6:f8
Nov  4 18:52:04 OpenWrt daemon.info dnsmasq-dhcp[935]: DHCPACK(br-lan) 192.168.1.156 48:5b:39:e7:e6                           :f8 STANAS2
Decompressing...............done

CFE version 1.0.37 for BCM947XX (32bit,SP,LE)

(Last edited by Kyklas on 4 Nov 2013, 22:55)

anarchy99,

Do you have a patch to add comgt hso support in AA ? The patch on the dev ticket does not correspond with the makefile.

Some file are no longer used, probaly combine i suppose, and some directories have changed.


For the reboot problem, the cause is not identified but probably related to the modem/3g connection. I used the hso driver from Option website, there is a v3.3 version. The reboot took place twice when requesting a Luci page, I didn't manage to reboot the device another time this way. The device seems stable othewise, 1h 45m without reboot ( but 3g is not on ).

I did more testing, the device still reboots unexpectedly with the Openwrt HSO driver or the Option HSO driver. Multiple connection seems to be a problem. I need to confirm it.

I looked at the HSO patch for comgt but hso proto doesn't seem to be found. Furthermore the scipts don't use ppp so how encapsulation is handled or is it because that scripts uses the application tty from the 3G card ?

I'm a little lost with the different modem mode and scripts, could anyone give me a lead on this ?

Are you using the hso patch for comgt ? What is your configuration ?

I bought the GTM382 and i have connectivity with it but same issue of reboot.
Could you test if you have the instability problem that makes the device reboot. I described the way to test in https://forum.openwrt.org/viewtopic.php?id=47750 But if you don't have connectivity the test is not the same.

How come you don't have connectivity ? No ping ?

Dec  9 21:07:53 OpenWrt kern.warn kernel: [  285.884000] usb 1-1.1: hso received invalid serial state notification
Dec  9 21:07:56 OpenWrt daemon.notice netifd: wwan (1382): SIM ready
Dec  9 21:07:56 OpenWrt daemon.notice netifd: wwan (1382): PIN set successfully
Dec  9 21:07:57 OpenWrt daemon.notice netifd: wwan (1382): Trying to set mode
Dec  9 21:07:57 OpenWrt daemon.notice pppd[1398]: pppd 2.4.5 started by root, uid 0
Dec  9 21:07:57 OpenWrt kern.warn kernel: [  290.096000] usb 1-1.1: hso received invalid serial state notification
Dec  9 21:07:58 OpenWrt kern.warn kernel: [  291.096000] usb 1-1.1: hso received invalid serial state notification
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: abort on (BUSY)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: abort on (NO CARRIER)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: abort on (ERROR)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: report (CONNECT)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: timeout set to 10 seconds
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: send (AT&F^M)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: expect (OK)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: AT&F^M^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: OK
Dec  9 21:07:59 OpenWrt local2.info chat[1402]:  -- got it
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: send (ATE1^M)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: expect (OK)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: ^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: ATE1^M^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: OK
Dec  9 21:07:59 OpenWrt local2.info chat[1402]:  -- got it
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: send (AT+CGDCONT=1,"IP","websfr"^M)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: timeout set to 30 seconds
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: expect (OK)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: ^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: AT+CGDCONT=1,"IP","websfr"^M^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: OK
Dec  9 21:07:59 OpenWrt local2.info chat[1402]:  -- got it
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: send (ATD*99***1#^M)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: expect (CONNECT)
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: ^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: ATD*99***1#^M^M
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: CONNECT
Dec  9 21:07:59 OpenWrt local2.info chat[1402]:  -- got it
Dec  9 21:07:59 OpenWrt local2.info chat[1402]: send ( ^M)
Dec  9 21:07:59 OpenWrt daemon.debug pppd[1398]: Script USE_APN=websfr /usr/sbin/chat -t5 -v -E -f /etc/chatscripts/3g.chat finished (pid 1401), status = 0x0
Dec  9 21:07:59 OpenWrt daemon.info pppd[1398]: Serial connection established.
Dec  9 21:07:59 OpenWrt daemon.debug pppd[1398]: using channel 2
Dec  9 21:07:59 OpenWrt kern.debug kernel: [  291.712000] device: 'ppp0': device_add
Dec  9 21:07:59 OpenWrt kern.warn kernel: [  291.716000] usb 1-1.1: hso received invalid serial state notification
Dec  9 21:07:59 OpenWrt kern.debug kernel: [  291.736000] device: 'ppp0': device_rename: renaming to '3g-wwan'
Dec  9 21:07:59 OpenWrt daemon.info pppd[1398]: Using interface 3g-wwan
Dec  9 21:07:59 OpenWrt daemon.notice pppd[1398]: Connect: 3g-wwan <--> /dev/ttyHS0
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x409144c2>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: rcvd [LCP ConfReq id=0x3 <asyncmap 0x0> <auth chap MD5> <magic 0x19d793f> <pcomp> <accomp>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: No auth is possible
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: sent [LCP ConfRej id=0x3 <auth chap MD5> <pcomp> <accomp>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x409144c2>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <magic 0x19d793f>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: sent [LCP ConfAck id=0x4 <asyncmap 0x0> <magic 0x19d793f>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: sent [LCP EchoReq id=0x0 magic=0x409144c2]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: rcvd [LCP DiscReq id=0x5 magic=0x19d793f]
Dec  9 21:08:00 OpenWrt daemon.debug pppd[1398]: rcvd [LCP EchoRep id=0x0 magic=0x19d793f 40 91 44 c2]
Dec  9 21:08:01 OpenWrt daemon.debug pppd[1398]: sent [LCP EchoReq id=0x1 magic=0x409144c2]
Dec  9 21:08:01 OpenWrt daemon.debug pppd[1398]: rcvd [LCP EchoRep id=0x1 magic=0x19d793f 40 91 44 c2]
Dec  9 21:08:01 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:01 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:02 OpenWrt daemon.debug pppd[1398]: sent [LCP EchoReq id=0x2 magic=0x409144c2]
Dec  9 21:08:02 OpenWrt daemon.debug pppd[1398]: rcvd [LCP EchoRep id=0x2 magic=0x19d793f 40 91 44 c2]
Dec  9 21:08:02 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:02 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:03 OpenWrt daemon.debug pppd[1398]: sent [LCP EchoReq id=0x3 magic=0x409144c2]
Dec  9 21:08:03 OpenWrt daemon.debug pppd[1398]: rcvd [LCP EchoRep id=0x3 magic=0x19d793f 40 91 44 c2]
Dec  9 21:08:03 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:03 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:04 OpenWrt daemon.debug pppd[1398]: sent [LCP EchoReq id=0x4 magic=0x409144c2]
Dec  9 21:08:04 OpenWrt daemon.debug pppd[1398]: rcvd [LCP EchoRep id=0x4 magic=0x19d793f 40 91 44 c2]
Dec  9 21:08:04 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:04 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfReq id=0x2]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfRej id=0x5 <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x6 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfReq id=0x3]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfAck id=0x3]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfNak id=0x6 <addr 100.112.136.234> <ms-dns1 172.20.2.10> <ms-dns2 172.20.2.39>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: sent [IPCP ConfReq id=0x7 <addr 100.112.136.234> <ms-dns1 172.20.2.10> <ms-dns2 172.20.2.39>]
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: rcvd [IPCP ConfAck id=0x7 <addr 100.112.136.234> <ms-dns1 172.20.2.10> <ms-dns2 172.20.2.39>]
Dec  9 21:08:05 OpenWrt daemon.warn pppd[1398]: Could not determine remote IP address: defaulting to 10.64.64.64
Dec  9 21:08:05 OpenWrt daemon.notice pppd[1398]: local  IP address 100.112.136.234
Dec  9 21:08:05 OpenWrt daemon.notice pppd[1398]: remote IP address 10.64.64.64
Dec  9 21:08:05 OpenWrt daemon.notice pppd[1398]: primary   DNS address 172.20.2.10
Dec  9 21:08:05 OpenWrt daemon.notice pppd[1398]: secondary DNS address 172.20.2.39
Dec  9 21:08:05 OpenWrt daemon.debug pppd[1398]: Script /lib/netifd/ppp-up started (pid 1418)
Dec  9 21:08:05 OpenWrt daemon.notice netifd: Interface 'wwan' is now up

Can you ping the DNS servers, should be a local ping withing the provider network ? I can't locate mine but i can for yours.

(Last edited by Kyklas on 9 Dec 2013, 22:49)

Hi,

Since the port from neryba on the topic https://forum.openwrt.org/viewtopic.php?id=47750 . I looked at AT commands of the modem and it's usb interfaces. I realized that i focused on the ttyHSx interfaced form the modem but missed interface 1.3 or interface descriptor 4. With the kernel debug enabled, I noticed that interface was linked to a network interface hso0. Once i noticed that i looked back at the hso patch form comgt and work to port it for AA. Using the network interface has advantages, the router runs better, no ppp deamon running and my issue of the device rebooting with lsusb is no longer there. I flashed an old image with Luci on it. I got the device to reboot with the old configuration ( using the modem tty interface) but no bug with the hso0 network interface so far.

I'll make a comgt patch file for AA. I made a little utility that makes the image header for me and adds a image description after the 20 bytes of header, useful to track images. I'll post the patch file to use on firmware-mod-kit.

Hopefully now i'll manage to use that device !

The patch for firmware-mod-kit

diff --git a/src/crcalc/Makefile b/src/crcalc/Makefile
index 0670388..7e567c8 100644
--- a/src/crcalc/Makefile
+++ b/src/crcalc/Makefile
@@ -2,11 +2,14 @@ CC=gcc
 CFLAGS=-Wall
 TARGET=crcalc
 
-all: $(TARGET) crc32
+all: $(TARGET) crc32 cfeheader
 
 $(TARGET): common.o patch.o
     $(CC) $(CFLAGS) $(LDFLAGS) $(TARGET).c *.o -o $(TARGET)
 
+cfeheader:
+    $(CC) $(CFLAGS) $(LDFLAGS) cfeheader.c *.o -o cfeheader
+
 crc32: crc.o
     $(CC) $(CFLAGS) $(LDFLAGS) crc32.c crc.o -o crc32 
 
diff --git a/src/crcalc/cfeheader.c b/src/crcalc/cfeheader.c
new file mode 100644
index 0000000..e4995e0
--- /dev/null
+++ b/src/crcalc/cfeheader.c
@@ -0,0 +1,151 @@
+/*
+ * Utility for calculating and patching checksums in various files.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include "common.h"
+#include "cfeheader.h"
+#include "patch.h"
+
+#define CFE_HEADER_SIZE        148
+
+int main(int argc, char *argv[])
+{
+    int retval = EXIT_FAILURE, ok = 0, fail = 1,index = 0,cks = 0;
+    char *buf = NULL, *fname = NULL, *desc = NULL, *oname = NULL, *output = NULL, header[CFE_HEADER_SIZE];
+    size_t size = 0;
+
+    /* Check usage */
+    if(argc < 3 || argv[1][0] == '-')
+    {
+        fprintf(stderr, USAGE, argv[0]);
+        goto end;
+    }
+    else
+    {
+        fname = argv[1];
+        oname = argv[2];
+        if(argc == 4)
+            desc = argv[3];
+    }
+    /* Creating header space 148 octets space */
+
+    /* Read in target file */
+    buf = file_read(fname, &size);
+    /*  Finding the first DEADC0DE */
+    for(; (index<(size-4) && *((int*)(buf+index)) != 0xDEC0ADDE);index++);
+    fprintf(stderr,"First DEADC0DE @ 0x%08X\n", index);
+    if(index>CFE_HEADER_SIZE && index<(size-4))
+    {
+        /* Saving data before first DEADC0DE */
+        memcpy(header,(buf+index-CFE_HEADER_SIZE),CFE_HEADER_SIZE);    
+    }
+    else
+        goto end;
+    
+    /* Moving data at the end */
+    memcpy((buf+index-CFE_HEADER_SIZE),(buf+index),CFE_HEADER_SIZE);
+    /* Copying the data back at the end */
+    memcpy((buf+size-CFE_HEADER_SIZE),header,CFE_HEADER_SIZE);
+
+    /* Computing Image CRC */
+    
+    if(buf && size > MIN_FILE_SIZE)
+    {
+        ok = 0;
+
+        fprintf(stderr, "Processing header...");
+
+        /* Identify and patch the header at each offset */
+        switch(identify_header(buf))
+        {
+            case TRX:
+                ok = patch_trx(buf, size);
+                break;
+            case UIMAGE:
+                ok = patch_uimage(buf, size);
+                break;
+            case DLOB:
+                ok = patch_dlob(buf, size);
+                break;
+            default:
+                fprintf(stderr, "sorry, this file type is not supported.\n");
+                break;
+        }
+
+        if(ok)
+        {
+            fail = 0;
+            fprintf(stderr, "CRC updated OK.\n");
+        }
+        else
+        {
+            fprintf(stderr, "CRC update failed!\n");
+            goto end;
+        }
+    
+    }
+
+    /* Creating Header */
+
+    output = malloc(size+CFE_HEADER_SIZE);
+    if(!output)
+    {
+        perror("malloc");
+        goto end;
+    }
+
+    memset(output,0,size+CFE_HEADER_SIZE);
+
+    cks=0xBEBAEDFE;
+    memcpy(output,&cks,4);
+
+    cks = ((size>>24)&0xff) | // move byte 3 to byte 0
+                    ((size<<8)&0xff0000) | // move byte 1 to byte 2
+                    ((size>>8)&0xff00) | // move byte 2 to byte 1
+                    ((size<<24)&0xff000000); // byte 0 to byte 3    
+
+    memcpy(output+4,&cks,4);
+    memcpy(output+CFE_HEADER_SIZE,buf,size);
+    if(desc)
+        memcpy(output+20,desc,(strlen(desc)>(CFE_HEADER_SIZE-20))?CFE_HEADER_SIZE-20:strlen(desc));
+    cks=0;
+    for(index=0;index<size+CFE_HEADER_SIZE;index++)
+    {
+        cks+=(unsigned char)output[index];
+    }
+
+    fprintf(stderr,"Checksum 32 : 0x%08X\n", cks);
+
+    index = ((cks>>24)&0xff) | // move byte 3 to byte 0
+            ((cks<<8)&0xff0000) | // move byte 1 to byte 2
+            ((cks>>8)&0xff00) | // move byte 2 to byte 1
+            ((cks<<24)&0xff000000); // byte 0 to byte 3
+    memcpy(output+8,&index,4);
+
+
+    if(!fail)
+    {
+        if(!file_write(oname, output, size+CFE_HEADER_SIZE))
+        {
+            fprintf(stderr, "Failed to save data to file '%s'\n", oname);
+        }
+        else
+        {
+            fprintf(stderr, "%s successfully created.\n",oname);
+            retval = EXIT_SUCCESS;
+        }
+    }
+
+end:
+    if(buf) free(buf);
+    if(output) free(output);    
+    return retval;
+}
+
diff --git a/src/crcalc/cfeheader.h b/src/crcalc/cfeheader.h
new file mode 100644
index 0000000..4e48533
--- /dev/null
+++ b/src/crcalc/cfeheader.h
@@ -0,0 +1,12 @@
+#ifndef _CFEHEAEDER_H_
+#define _CFEHEADER_H_
+
+#define USAGE "\n\
+CFE Header \r\n\
+Create CFE Header for the firmware file ( GlobeSurfer3/3+ ). \n\
+Re-calculates firmware header checksusm and CRC.\n\
+\n\
+Usage: %s <firmware image> <CFE firmware image> [Description]\n\
+\n"
+
+#endif

I'll write a mail to firmware-mod-kit owners to see if they are interested to add this to their kit ( and correct what i did if necessary )

(Last edited by Kyklas on 12 Dec 2013, 19:25)

Image for GlobeSurfer3/3+ with option.c update, hso-dkms hso driver, hso proto support, gtm661 (default), gtm382 detect script.

http://www41.zippyshare.com/v/54275862/file.html

Tell me how it works for you !

I wanted to compare how GlobeSurfer is handling the modem with OpenWRT.

GlobeSurfer is using hso driver.

/proc/hso/devices # lsmod
Module                  Size  Used by
hso                    36784   1

/proc/hso # cat options
Version: 1.3
debug: 0x00
procfs: 0x01
tty_major: 0x00
disable_net: 0x00

/proc/hso/devices # ls
eth1    ttyHS0  ttyHS1  ttyHS2  ttyHS3

Using hso driver and hso protocol on OpenWRT is the same way as GlobeSurfer.

For the high-speed usb, it's probably because i don't have kmod-usb2, I think.

Your right about the modem init script, GS3 script lights up 2 leds on GS3+ and a extra toggle of GPIO 4 & 5 is missing to enable the modem on GS3+.

About the modem network interface, there the conf i use :

config interface 'wwan'
    option ifname 'hso0'
    option proto 'hso'
    option apn '<your apn>'
    option pincode '<your pin>'
    option device '/dev/ttyHS2'

The /dev/ttyHS2 is the modem application interface serial : cat /sys/class/tty/ttyHSx/hsotype

and then you can use my patch for AA to have hso protocol support ( user identification not tested )
https://dev.openwrt.org/ticket/6995

Thanks for the feedback

I have been working on other projects some of which kind a link back to this topic.

I looked for a similar device to GlobeSurfer 3+ and i bought a RouterBoard 411uahr. http://routerboard.com/RB411UAHR

I customized it with a additional Wifi card ( RouterBaord R52n-M ) and a GTM382 3G card that i bought for testing).
http://s25.postimage.org/70o1mpdsb/IMG_0010.jpg
I attached 9dbi antenna the result is pretty insane ( 2 antenna for the additional WiFi card, 1 antenna for the integrated card and 2 quad band gsm antenna).
http://s25.postimage.org/45ayfu9sb/09032014032.jpg

the RB411 has a lot more power than the GS3+ as well as more memory. The specs say 64 mb of flash and ram but my board boot loader say 64 mb of ram and 128 mb of flash which is pretty nice.

The GTM382 card run nicely with hso driver and patch for AA.
The RS232 port is nice for communicating with the device.

The only draw back from my point of view is the only ethernet port and the unpowered usb port. The solution is an power converter inside (DC step down to 5v) and an external usb to ethernet adapter.

The original os is nice but i'm not familiar to it. It has support for hso driver but from there to get the 3G connection i didn't look to do it.

One interesting thing about Option 3G card is their GPS support. I enable GPS on the GTM382 and got a fix. I use the device in the car and was able to have a record of my driving.

I'm planning to do a luci configuration interface for the hso driver.

Hi Guys,
with interest I red your work with adding openwrt support on the Globesurfer.

I have a GS III, but still with stock firmware.
After a wrong firewall rule, I bricked mine, I think.
Do you have tips how to proceed....?

It says 'Initializing'. So it looks like the reset procedure to go to factory defaults doesn't work yet, because reset only works after the box is fully loaded?

Strange enough the box doesn't support a reset-when-powering-up?
Well, all tips are welcome.

Hi,

I have a LuCI configuration interface to HSO along with new connection scripts.
I have worked with the GPS interface of the GTM382. I have A-GPS working. The new connection script support A-GPS, UMTS/GPS mode selection.

I'm testing this on a WR710n :

TP-Link TL-WR710N v1
OpenWrt Chaos Calmer r42165 / LuCI Trunk (svn-r10520)

I'm facing an issue with the modem connection with this new 3.10.49 kernel.
For some unknown reason I am not able to use the connection created on hso0.

It seems that OpenWrt has modified some package and dependencies. kmod-rfkill now depends on input-core. rfkill is not enable by default on wr710n configuration. The modinfo output is short compared to other system.

WR710n output :

module:         /lib/modules/3.10.49/hso.ko
license:        GPL
depends:        usbcore,rfkill

Raspberry PI output :

filename:       /lib/modules/3.12.20+/kernel/drivers/net/usb/hso.ko
license:        GPL
description:    USB High Speed Option driver
author:         Option Wireless
srcversion:     92514817C60828D0122B334
alias:          usb:v0AF0pC100d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD058d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD357d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD257d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD157d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD057d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD255d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD155d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD055d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD035d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p9000d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8900d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8800d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8600d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8400d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8304d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8302d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8300d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8201d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p8200d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7A05d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7A01d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7901d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7801d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7706d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7701d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7601d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7501d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7401d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7381d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7361d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7301d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD033d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD031d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pD013d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0pC031d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7311d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7271d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7251d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7211d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7111d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7071d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7051d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7031d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p7011d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6971d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6951d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6911d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6811d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6791d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6771d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6751d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6731d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0AF0p6711d*dc*dsc*dp*ic*isc*ip*in*
depends:        rfkill
intree:         Y
vermagic:       3.12.20+ preempt mod_unload modversions ARMv6
parm:           debug:Level of debug [0x01 | 0x02 | 0x04 | 0x08 | 0x10] (int)
parm:           tty_major:Set the major tty number (int)
parm:           disable_net:Disable the network interface (int)

The modem and GPS works on Raspberry PI with kernel 3.12.20 so it should also work on 3.10.49.

Edit :

WR710n :

root@OpenWrt:~# ifconfig hso0
hso0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:33.191.46.170  P-t-P:33.191.46.170  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1486  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

R-Pi

pi@raspberrypi:~/GPS$ ifconfig hso0
hso0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:33.190.228.244  P-t-P:33.190.228.244  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1486  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:6340 (6.1 KiB)  TX bytes:5527 (5.3 KiB)

It seems that data is not being sent or received. Despite the 176 packet sent the TX bytes is null and nothing is received.

The modem works on the BealgeBone Black with kernel 3.8.13.

Is any one having that kind of issue ?
Does anyone know what modification kmod-input-core implies ?

(Last edited by Kyklas on 31 Aug 2014, 03:38)

After having googled for 5 days I think this is the only place where someone can help me.

my mistake: I have a globesurfer III+ (GS0361) . It had some problems (probably firewall part). I tried to reinstall the firmware (the latest). I succeded with the reinstallation but it did not fix the problem. I decided to install an old firmware I found somewhere (big mistake) on internet. The firmware downgrade worked but now it does not connect any more to internet. I can still access the globesurfer with the web interface and with the telnet. It responds to the telnet commands like "flash" "layout" "load". Now, If I try to upgrade the firmware (with telnet and with web-interface) it reboots immedialely (probably I installed a firmware that locks the globesurfer to a specific carrier).
Now the globesurfer is totally useless and I am stuck.

I am very new to this environment.
Is there a way I can try to flash my globesurfer III+ with something (a bin file or something like that) in order It can come back to life?

I tried already the following command:

flash load -u tftp://192.168.1.1/FW_GS3_R1N89.rmt -r 0x00040000

but it said something like "rmt" file are not accepted.



Please advice . I am in your hands.
Thanks in advance to whom answer.

Thanks for the advice. I will try to run from telnet : system restore_factory_settings.
I have already tried the reset with the button but nothing changed.

1) Do you know where I could find a backed-up bin image from a globesurfer iii+ which is running openwrt ?
2) would it be enough to have it runnig openwrt?
3) is the syntax correct? (  flash load -u tftp://192.168.1.1/FW_GS3_R1N89.rmt -r 0x00040000 )

thanks again

bad news... I have been fighting with my globesurfer for 3 hour. I tried what you suggested but unfortunately was not enough.

I tried:
restore_factory_settings
restore_factory_settings <all possible flags>

but still no news: the web interface works, telnet works but globesurfer does not connect to internet, everytime I try to update the firmware ( using the web interface or the telnet firmware_update ) globesurfer reboots and does not update.

now it is totally useless. I can still connect to globesurf (web or telnet) do you have any other trick?  thank

paolo

(Last edited by paolo.ulm on 2 Oct 2014, 20:16)