Add support for 4G Systems XSStick W1208

I own two GL-MT300 mini router and was happy with them. Then I bought two 4G Systems XSStick W1208. Then I was only happy as these stick do not work out-of-the box with version 3.100.

I managed to pimp the usb-mode.json file to get the stick mode-switched with the help of Mrs. Google.
I can provide the File to be added to the default distribution.

There is one command left which is currently neede to be manually executed and therefore I cannot put the device back into the car again :slight_smile:
This is the switched device:

root@GL-MT300N:~# lsusb 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 2fd4:76b5  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@GL-MT300N:~# 

Missing is only:

root@GL-MT300N:~# echo 0x2fd4 0x76b5 > /sys/bus/usb-serial/drivers/option1/new_id

dmesg looks like:

[  836.223624] option 1-1:1.0: GSM modem (1-port) converter detected
[  836.230199] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[  836.237969] option 1-1:1.1: GSM modem (1-port) converter detected
[  836.244561] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[  836.252244] option 1-1:1.2: GSM modem (1-port) converter detected
[  836.258766] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[  836.266444] option 1-1:1.3: GSM modem (1-port) converter detected
[  836.273018] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[  836.280652] option 1-1:1.4: GSM modem (1-port) converter detected
[  836.287631] option 1-1:1.5: GSM modem (1-port) converter detected
root@GL-MT300N:~# 

Then the 3G/4G Modem shows up in the GUI.
What is needed to get the echo done automagically?

Thanks
Chris

Paste this in your router:

cat<<'EOF' > /etc/init.d/fix_w1208
#!/bin/sh /etc/rc.common
boot() {
    echo 0x2fd4 0x76b5 > /sys/bus/usb-serial/drivers/option1/new_id
}

EOF
chmod +x /etc/init.d/fix_w1208
/etc/init.d/fix_w1208 enable

Then see if its enabled with:

/etc/init.d/fix_w1208 enabled && echo on

It should output β€œon”. If yes, then your command will run when the router starts :slight_smile:

:smiley:

2 Likes

Hi Johnex,

after modify the script a bit it works.

#!/bin/sh /etc/rc.common

START=30

boot() {
echo 0x2fd4 0x76b5 > /sys/bus/usb-serial/drivers/option1/new_id
}

Is adding the mode switch data done via GL-Inet or upstream OpenWRT?
I opened an Upstream Bug #2963

Thanks
Chris

1 Like

Yeah i was thinking that maybe it would need to start after some network processes had started.

You can change boot() to start() instead to follow the actual template properly :slight_smile:

If you mean the hardware switch on the MT300 then that is handled by GL, if not, then its upstream :slight_smile: