moonbasechina
Posts: 2
Joined: Wed Dec 12, 2012 7:41 pm

3G Help Needed (Huawei E3231)

Fri Dec 14, 2012 1:04 am

Hey all. I'm having some trouble setting up a 3G dongle. Can anyone point me in the right direction?
I'm trying to get a Huawei E3231 (not to be confused with E3131) working. It's on the 3 network in the UK, PAYG. All tested and working in Windows.
http://store.three.co.uk/Mobile_Broadba ... ard_Dongle

I'm using the latest Wheezy (fully updated)
Converted ATX PSU for Pi's and Peripherals
Installed ppp

Tried the sakis3g method- http://shkspr.mobi/blog/2012/07/3g-inte ... i-success/
Kept getting 'Failed to connect'

So I've been trying with this method- http://www.raspberrypi.org/phpBB3/viewt ... 6&p=210958

Code: Select all

[email protected] ~ $ lsusb
Bus 
001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 006: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 001 Device 011: ID 12d1:1f01 Huawei Technologies Co., Ltd. 

[email protected] ~ $ ls /dev
autofs           full   loop-control        pts    ram6     stdout  tty19  tty30  tty42  tty54  tty9        vc-mem  vcsa4
block            fuse   MAKEDEV             ram0   ram7     tty     tty2   tty31  tty43  tty55  ttyAMA0     vcs     vcsa5
btrfs-control    input  mapper              ram1   ram8     tty0    tty20  tty32  tty44  tty56  ttyprintk   vcs1    vcsa6
bus              kmsg   mem                 ram10  ram9     tty1    tty21  tty33  tty45  tty57  uinput      vcs2    vcsa7
cachefiles       log    mmcblk0             ram11  random   tty10   tty22  tty34  tty46  tty58  urandom     vcs3    xconsole
cdrom            loop0  mmcblk0p1           ram12  raw      tty11   tty23  tty35  tty47  tty59  usbdev1.1   vcs4    zero
cdrom1           loop1  mmcblk0p2           ram13  root     tty12   tty24  tty36  tty48  tty6   usbdev1.11  vcs5
char             loop2  net                 ram14  shm      tty13   tty25  tty37  tty49  tty60  usbdev1.2   vcs6
console          loop3  network_latency     ram15  snd      tty14   tty26  tty38  tty5   tty61  usbdev1.3   vcs7
cpu_dma_latency  loop4  network_throughput  ram2   sndstat  tty15   tty27  tty39  tty50  tty62  usbdev1.4   vcsa
disk             loop5  null                ram3   sr0      tty16   tty28  tty4   tty51  tty63  usbdev1.5   vcsa1
fb0              loop6  ppp                 ram4   stderr   tty17   tty29  tty40  tty52  tty7   usbdev1.6   vcsa2
fd               loop7  ptmx                ram5   stdin    tty18   tty3   tty41  tty53  tty8   vchiq       vcsa3
When connected, the devices ID is 12d1:1f01, which from what I can tell means its in CD Rom mode (for drivers/software etc).
By listing the devices and comparing, I can see that it has been assigned to-
cdrom
cdrom1
sr0
usbdev1.11

Now I run the sg_raw command-

Code: Select all

[email protected] ~ $ sudo /usr/bin/sg_raw /dev/sr0 11 06 20 00 00 00 00 00 01 00
SCSI Status: Good 

Sense Information:
sense buffer empty

[email protected] ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 04d9:1603 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 006: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 001 Device 012: ID 12d1:14db Huawei Technologies Co., Ltd. 

[email protected] ~ $ ls /dev
autofs           kmsg          mmcblk0             ram12   root     tty13  tty26  tty39  tty51  tty7        vchiq   vcsa4
block            log           mmcblk0p1           ram13   shm      tty14  tty27  tty4   tty52  tty8        vc-mem  vcsa5
btrfs-control    loop0         mmcblk0p2           ram14   snd      tty15  tty28  tty40  tty53  tty9        vcs     vcsa6
bus              loop1         net                 ram15   sndstat  tty16  tty29  tty41  tty54  ttyAMA0     vcs1    vcsa7
cachefiles       loop2         network_latency     ram2    sr0      tty17  tty3   tty42  tty55  ttyprintk   vcs2    xconsole
char             loop3         network_throughput  ram3    stderr   tty18  tty30  tty43  tty56  uinput      vcs3    zero
console          loop4         null                ram4    stdin    tty19  tty31  tty44  tty57  urandom     vcs4
cpu_dma_latency  loop5         ppp                 ram5    stdout   tty2   tty32  tty45  tty58  usbdev1.1   vcs5
disk             loop6         ptmx                ram6    tty      tty20  tty33  tty46  tty59  usbdev1.12  vcs6
fb0              loop7         pts                 ram7    tty0     tty21  tty34  tty47  tty6   usbdev1.2   vcs7
fd               loop-control  ram0                ram8    tty1     tty22  tty35  tty48  tty60  usbdev1.3   vcsa
full             MAKEDEV       ram1                ram9    tty10    tty23  tty36  tty49  tty61  usbdev1.4   vcsa1
fuse             mapper        ram10               random  tty11    tty24  tty37  tty5   tty62  usbdev1.5   vcsa2
input            mem           ram11               raw     tty12    tty25  tty38  tty50  tty63  usbdev1.6   vcsa3

[email protected] ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:13:c0:ed  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1187 errors:0 dropped:0 overruns:0 frame:0
          TX packets:933 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:856598 (836.5 KiB)  TX bytes:116841 (114.1 KiB)

eth1      Link encap:Ethernet  HWaddr 58:2c:80:13:92:63  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18 errors:0 dropped:4 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6588 (6.4 KiB)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7148 (6.9 KiB)  TX bytes:7148 (6.9 KiB)

This seems to switch the device and loads it as eth1.
By listing devices now, it states its-
sr0
usbdev1.12

I've got to admit, I get what sg_raw is doing but I've got no idea if the SCSI command is correct.

Code: Select all

[email protected] ~ $ sudo ifconfig eth1 192.168.1.100

[email protected] ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:13:c0:ed  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1187 errors:0 dropped:0 overruns:0 frame:0
          TX packets:933 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:856598 (836.5 KiB)  TX bytes:116841 (114.1 KiB)

eth1      Link encap:Ethernet  HWaddr 58:2c:80:13:92:63  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:67 errors:0 dropped:4 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28554 (27.8 KiB)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7148 (6.9 KiB)  TX bytes:7148 (6.9 KiB)

[email protected] ~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=2.35 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=1.03 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=1.00 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=1.10 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=1.11 ms
64 bytes from 192.168.1.1: icmp_req=6 ttl=64 time=1.35 ms
64 bytes from 192.168.1.1: icmp_req=7 ttl=64 time=1.14 ms
64 bytes from 192.168.1.1: icmp_req=8 ttl=64 time=1.08 ms
64 bytes from 192.168.1.1: icmp_req=9 ttl=64 time=1.08 ms
64 bytes from 192.168.1.1: icmp_req=10 ttl=64 time=1.12 ms
^C
--- 192.168.1.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9013ms
rtt min/avg/max/mdev = 1.009/1.239/2.352/0.383 ms
I assigned IP 192.168.1.100 as its the default, assigned IP in Windows.

If I start Lynx, I get nothing. If I 'startx' and load up Midori, I can't access the web but I can access the dashboard for the device.
If the device's connection setting is set to 'Auto' (the default setting), then I get nothing to say its connected.
If I change this to 'Manual', then I can navigate to the main page of the dashboard and click 'Connect'. This reports back that the device is connected and the LED indicator displays solid blue (3G connected).
However, when I try to connect to any external host I get a connection error from the browser.

Preferably, I would like to have the device connect automatically. I'd like to avoid starting X and using the dashboard to connect the device.
I really have got no idea what to try next. Any suggestions?

maprrl
Posts: 1
Joined: Fri Jan 18, 2013 9:29 am

Re: 3G Help Needed (Huawei E3231)

Sat Jan 19, 2013 12:56 pm

Have you tried adding a default route:

Code: Select all

route add default gw 192.168.1.1
Then adding to /etc/resolv.conf:

Code: Select all

nameserver 192.168.1.1

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: 3G Help Needed (Huawei E3231)

Sat Jan 19, 2013 4:01 pm

There is software called Sakis3g which I have found works without a lot of messing around:

http://www.raspberrypi.org/phpBB3/viewt ... 07#p264307
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

Return to “Networking and servers”