Comments on: Mobile broadband USB stick on Linux /2013/03/01/mobile-broadband-usb-stick-on-linux A collection of note-to-self's Sun, 24 Mar 2019 23:04:45 +0000 hourly 1 https://wordpress.org/?v=5.1.1 By: Niobos /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248890 Tue, 07 Apr 2015 06:21:49 +0000 http://blog.dest-unreach.be/?p=2491#comment-248890 Hi Thibaut,

For the TTY-issue: These flip-flop devices just have two configurations, and a few devices (modem, monitorport, CDROM, SD-card, …). You can (re)configure it to set which device is shown in which configuration. It’s perfectly possible that the modem is already visible in “initial” mode, and that no switch is needed. (Google for AT^GETPORTMODE).

Phone number looks good. This is the default phone number. If this doesn’t work, you can try *99***1# as well. All ISPs should provide these, but most don’t… There are lists on the internet to help you out.

Baudrate shoud be as high as your virtual port supports. I use 921600, but I don’t think it matters since the serial port is virtual and doesn’t exist anyway.

]]>
By: Thibaut /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248765 Sat, 04 Apr 2015 09:11:35 +0000 http://blog.dest-unreach.be/?p=2491#comment-248765 Hi Niobos,

After restarting the modem the number 12d1:1506 showed up, which is the Dongle in 3g mode. It first connects to ttyUSB0, then less than a second later it connects to ttyUSB1. So the USB conundrum is solved now.

In order to make the connection with 3g to the internet I use wvdial with the following config-file. I’m sure that things like the APN, Modem, login and password are correct. I’m less sure about the Phone (is it the landcode ??) and the baudrate. I googled for the right settings for this ISP (carrefourdata.be in this case) but as far as I can see the ISP doesn’t provide these settings. I see you found the settings for pppd for your ISP (proximus). Do some ISPs provide these and others not?

[Dialer BASE]

Init1 = ATZ

Init2 = AT+CSQ

Init3 = AT^SYSINFO

Init4 = AT+CGDCONT=1,”IP”,”carrefourdata.be”

Stupid Mode = 1

Modem Type = Analog
Modem
ISDN = 0

Phone = *99#

Modem = /dev/ttyUSB1

Username = carrefour

Password = carrefour

Baud = 460800

]]>
By: Niobos /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248726 Fri, 03 Apr 2015 14:30:38 +0000 http://blog.dest-unreach.be/?p=2491#comment-248726 I believe you have your usb_modeswitch config the wrong way around.

From the logs, I see 12d1:1c20 as being the CD-ROM & mass storage mode. From the man page of usb_modeswitch, these should go in the Default… variables. The Target… variables should contain the USB-IDs that you want to achieve.

You can also try to run usb_modeswitch by hand, optionally in verbose mode.

]]>
By: Thibaut /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248725 Fri, 03 Apr 2015 14:17:37 +0000 http://blog.dest-unreach.be/?p=2491#comment-248725 Hi Niobos,

The log messages (I’ve put a selection of it with attention to the USB devices) are below at the end.
Raspbian recognises a Mass-storage drive in the Huawei Dongle

With or without usb-modeswitch, Raspbian does not make a ttyUSB for it in the /dev folder. Without that I can’t settup the wvdial configuration file.
The targetproduct should be the modem although nor the logs or lsusb make clear which what is.

My setup for the usb_modeswitch.conf file is:
———————————————-
# Configuration for the usb_modeswitch package, a mode switching tool for

# USB devices providing multiple states or modes

#

# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher

#

# To enable an option, set it to “1”, “yes” or “true” (case doesn’t matter)

# Everything else counts as “disable”

# Disable automatic mode switching globally (e.g. to access the original

# install storage)

DisableSwitching=0

# Enable logging (results in a extensive report file in /var/log, named

# “usb_modeswitch_” and probably others

EnableLogging=0

# T-Mobile NL (Huawei E352)

DefaultVendor= 0x12d1

DefaultProduct=0x14fe

TargetVendor= 0x12d1

TargetProduct= 0x1c20

MessageContent=”55534243123456780000000000000011062000000100000000000000000000″

RPi Logs:
———-
[ 2.792963] usb 1-1: New USB device found, idVendor=0424, idProduct=9512

[ 2.802520] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[ 2.813531] hub 1-1:1.0: USB hub found

[ 2.819687] hub 1-1:1.0: 3 ports detected

[ 3.102570] usb 1-1.1: new high-speed USB device number 3 using dwc_otg

[ 3.213096] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00

[ 3.221995] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[ 3.249812] smsc95xx v1.0.4

[ 3.330735] smsc95xx 1-1.1:1.0 eth0: register ‘smsc95xx’ at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:0d:09:65

[ 4.256492] udevd[159]: starting version 175

[ 5.642682] usb 1-1.3: new high-speed USB device number 4 using dwc_otg

[ 5.773500] usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1c20

[ 5.792482] usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0

[ 5.801840] usb 1-1.3: Product: HUAWEI Mobile

[ 5.823284] usb 1-1.3: Manufacturer: HUAWEI

[ 5.844907] usb-storage 1-1.3:1.0: USB Mass Storage device detected

[ 5.872515] scsi host0: usb-storage 1-1.3:1.0

[ 6.873591] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2

[ 7.739479] usbcore: registered new interface driver uas

[ 7.825190] sr 0:0:0:0: [sr0] scsi-1 drive

[ 7.831178] cdrom: Uniform CD-ROM driver Revision: 3.20

[ 7.844063] sr 0:0:0:0: Attached scsi CD-ROM sr0

[ 7.872815] sr 0:0:0:0: Attached scsi generic sg0 type 5

[ 7.986266] random: nonblocking pool is initialized

[ 10.846517] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[ 11.329606] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[ 21.163233] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup

[ 22.863815] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

[ 27.001666] ip_tables: (C) 2000-2006 Netfilter Core Team

[ 27.062641] nf_conntrack version 0.5.0 (6964 buckets, 27856 max)

[ 28.058836] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS

]]>
By: Niobos /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248720 Fri, 03 Apr 2015 11:13:35 +0000 http://blog.dest-unreach.be/?p=2491#comment-248720 Hi Thibaut,

I’m pretty sure it can be done on Raspbian as well.

Can you elaborate what you have already tried and what the result was: Did you get any log messages about usb-modeswitch attempting to switch the device? In what configuration did you get (intermittent) success?

N

]]>
By: Thibaut /2013/03/01/mobile-broadband-usb-stick-on-linux/comment-page-1#comment-248713 Fri, 03 Apr 2015 09:28:58 +0000 http://blog.dest-unreach.be/?p=2491#comment-248713 Can it be done on Raspbian too?
On my Raspberry Pi the switchover seems to happen (sometimes) after unplugging and replugging the modem (E5331s) on a live Raspberry Pi. I have no luck yet with using usb-modeswitch on Raspbian.

]]>