Friday, August 7, 2015

[UPDATED] ALCATEL X215S 3G DONGLE on OPENWRT with TIM SIM

Here's the challenge :
- you have an old Omnima MiniEMBWifi (aka Edimax NS-1500) ;
- you have a 3G USB Dongle, in my case a TIM branded (but not locked) Alcatel X215S ;
- you want to share the internet connection ;



The thing is, nobody uses such an exotic RT3050F based router with 8MB Flash and 32MB Ram, 1 Ethernet port, 1 USB 2.0 Port and 1x1 (150Mbit) 802.11n wireless functionality.


First thing to do is to follow the guideline for 3G USB dongle installation on the openwrt.org wiki .

I first tried this on the stable release of Barrier Breaker, but in the end I switched to Chaos Calmer RC3. The usb-modeswitch functionality was much smoother and less kernel panics when disconnecting the 3G modem.

Good to know is that the X215S is very well supported and the modeswitch works like a breeze.

There's only one issue with the X215S : it's not working on ttyUSB0 but ports 3 and 4 are actually the modem ports !

I first tried ttyUSB3 but it wouldn't let me dial in minicom. ttyUSB4 worked just fine. So I decided to set my router up using /dev/ttyUSB4.

I modified the /lib/netifd/proto/3g.sh file and bumped the baudrate to 460800. Replace 115200 by 460800 in the script (almost at the very end of the file).

The /etc/config/network file is pretty standard (just follow the standard wan configuration) :
- username / password = */* ;
  • option username '*'
  • option password '*'
- no pincode set (because my SIM hasn't one) ;
  • # option pincode 'xxxx' or just delete this line
- apn = ibox.tim.it ;
  • option apn 'ibox.tim.it'

If you re-use the wan interface, you won't need to review the firewall settings. It's all explained in the guideline on the wiki page.

I use the /dev/ttyUSB3 in order to get RSSI indication by issuing following command :
- gcom -d /dev/ttyUSB3

 One both files are modified, you only need to reboot the router, insert the USB dongle and that's it !

What I still need to figure out, are the connection parameters for my Vodafone SIM. The connection stalls after the authorisation part. Not sure if I need to tweak the pppd-parameters. This is work in progress ... At least I now have my (not so speedy) TIM connection shared to my other devices.

[UPDATE]
Figured out the parameters in my pppd script to connect to Vodafone Italy using a data-SIM.
Add following parameters in the /lib/netifd/proto/3g.sh file or add pppd_options in the /etc/config/network :
  • noccp noipdefault persist
 Don't forget to set the correct APN for the new provider.

Have fun !