2

3G modem works only after Windows first successful negotiation, after if I unplug device and plug it again to Linux it works fine, even after reboots and poweroffs. But, if I change SIM card and try again it doesn't work, why? Every time I change SIM card I need to plug device to Windows, initiate connection, disconnect and then plug it to Linux machine.

Anyone heard something about this? Clearly I'm missing something.

Huawei E173, Raspbian GNU/Linux 7 (wheezy), command line initiation with pppd version 2.4.5

pppd debug user $PPPUSER password $PPPPASS linkname $NAME lock crtscts modem $PPPDEV 921600 $PPPUDNS $PPPPERSIST novj defaultroute noipdefault noauth connect "chat -t15 '' '$PPPPIN' '' 'ATH0' 'OK' 'AT\^SYSCFG=14,2,3fffffff,1,1' 'OK' 'AT+CGDCONT=1,IP,$PPPAPN' 'OK' 'ATDT$PPPDIAL' 'CONNECT' ''"

Syslogs of modem hangup and working one.

~ $ uname -a
~ $ Linux RaspberryPi 4.4.11+ #888 Mon May 23 20:02:58 BST 2016 armv6l GNU/Linux`
~ $ lsusb |grep Hua
~ $ Bus 001 Device 011: ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Paul B
  • 121
  • 2
  • This sort of thing is unfortunately all too common: there's a feature of the Windows driver that the Linux driver lacks, and the manufacturer is usually uncooperative. Try a more recent kernel (wheezy is pretty old!). – Gilles 'SO- stop being evil' May 25 '16 at 23:23
  • Thanks for suggestion but my kernel version is 4.4.11. – Paul B May 26 '16 at 08:58

1 Answers1

1

I also once had to setup such modem. The point is that they boot into "usb memory stick mode", and they have to be switched to modem mode.

At the time I only setup /etc/usb_modeswitch.conf, which was more than enough for me, as it was a permanent setup for sending SMS alerts. Which in your specific model is:

apt-get install usb-modeswitch

and the file /etc/usb_modeswitch.conf:

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

TargetVendor= 0x12d1
TargetProduct= 0x1c07

CheckSuccess=20
MessageEndpoint= 0x0f

MessageContent= "55534243123456780000000000000011062000000100000000000000000000"

For a more elaborate setup detecting insertions, and issuing the 3G connection, I will direct you to How To automatically start a USB 3G Key

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
  • 1
    You suggesting usb modeswitch while modem is already passing successful PAP authentication with peer. Modeswitch is not a problem in my case, it's already configured. – Paul B May 26 '16 at 09:22