Problems getting 4g Dongle to work

Please check the Knowledge Base articles before posting here
Rassiloth
Posts: 20
Joined: Thu Feb 07, 2019 4:35 pm

Problems getting 4g Dongle to work

Post by Rassiloth » Thu Feb 07, 2019 4:53 pm

To date I have now got an SM ISO download, installed and synchronised.

GPS is now working well using an external board but when I try to change from using the house WiFI to a 4g dongle it all fails.

The dongle is a HiLink type (Huawei E3372) with a Three Mobile Broadband data sim
The status light indicates its try to establish a link to an LTE cell
When used with a PC it works fine straight off

The SM $G setting screen seems to indicate this is trying to use /dev/ttyUSB0 but this is the port for the GPS

The SIM Card used requires no user or password and links straight to the provider (Three in this case).

Just wondering whether I am missing something simple somewhere ;-)

Drivers etc?

penny
Posts: 84
Joined: Mon Oct 10, 2016 2:02 pm

Re: Problems getting 4g Dongle to work

Post by penny » Fri Feb 08, 2019 2:36 pm

Hi

Firstly a few simple/obvious things.

1) Control / Control Panel - ensure 3G/4G is enabled and Wireless disabled
2) Try Broadband / Check Broadband Connection

Your Huawei is one of those which displays itself as a network device. Therefore the only details you should need to enter are User Name and Password on the screen which has Device / Modem details. This type is really easy to use - it should just work when you plug it in.

So if 1 and 2 don't help then check that your dongle has been recognised. To do this you will need to go to the command line. I imagine if you are setting this up from the ISO you are familiar with Linux. But if not you can use Execute Commands from the System menu.

The command you will need is ifconfig - as root. Here is an example of a working dongle which has been assigned eth0 and the HWaddr is the MAC address of your dongle which may be printed on it.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@skipclient:~# ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:af:6e:7e
inet6 addr: fe80::b642:53f7:9273:cf9f/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Please let us know what you find so we can help further if necessary.

Penny

Rassiloth
Posts: 20
Joined: Thu Feb 07, 2019 4:35 pm

Re: Problems getting 4g Dongle to work

Post by Rassiloth » Fri Feb 08, 2019 6:45 pm

Its odd.

The only Ethernet interface is the ETH0 assigned to the RPi's own onboard interface.

I have checked the MAC address and its not showing the one belonging to the dongle.

Checking the 4g Modem settings shows a setting of /dev/ttyUSB0 (which is the dev used by the USP GPS board)

Username and Password are blank but according to three the connection does not require them, although I can force the dongle to require them to access it (if I reconfigure it with a PC).

Any thoughts?

I'd rather not fall back to wireless as it means more kit, more power and means that the system is not self sufficient in an outage (as I intend to build a UPS onto the RPi later on).

Ian

crb
Site Admin
Posts: 52
Joined: Mon Oct 10, 2016 1:08 pm

Re: Problems getting 4g Dongle to work

Post by crb » Sun Feb 10, 2019 1:49 pm

I'm assuming that you've tried the ifconfig command? If so and you can't see the device but can see it as a tty device then I would guess that the dongle is being seen as a storage device. If this is the case thn the usb_modeswitch command may be your friend.

So far as I can see your dongle should be compatible with Linux and indeed Raspbian. Which operating system are you using on the p.c. which recognises the device?

Colin

Rassiloth
Posts: 20
Joined: Thu Feb 07, 2019 4:35 pm

Re: Problems getting 4g Dongle to work

Post by Rassiloth » Mon Feb 11, 2019 10:07 am

Colin,

A closer look shows it is 'mas storage mode' that is causing all the problems.

I've started to dig into usb_modeswitch so we'll see where that rabbit hole goes ;-)

The OS the dongle works fine on is a standard Windows 10 build.

So far I can see lsusb shows the device to be ID 12d1:1f01 which I would guess is the ID for the Mass Storage mode (/dev/ gets some additional cdrom entries when its connected) but I have no idea what the ID for the modem mode should be.

Ian

crb
Site Admin
Posts: 52
Joined: Mon Oct 10, 2016 1:08 pm

Re: Problems getting 4g Dongle to work

Post by crb » Mon Feb 11, 2019 4:12 pm

Ian,

It all becomes a little clearer - it is showing as mass storage on win 10 because it contains it's own driver for the windows family, not required under Linux.
Can't help you with the id. required for usb_modeswitch as I'm not familiar with this dongle but I'm sure the answer is somewhere out there on the googleverse. Might be worth asking for info on one of the Raspberry forums.
Good luck

Colin

Rassiloth
Posts: 20
Joined: Thu Feb 07, 2019 4:35 pm

Re: Problems getting 4g Dongle to work

Post by Rassiloth » Tue Feb 12, 2019 12:05 pm

Colin,

Managed to find some detail spread over quite a few different places.

Putting them together this was added to the /etc/usb_modeswitch.conf file

# ===================================

# Huawei E3372 LTE

DefaultVendor = 0x12d1
DefaultTarget = 0 x 1f01

TargetVendor = 0x12d1
TargetTarget = 0x14dc

HuaweiNewMode=1
NoDriverLoad=1

# ===================================

Although a reboot didn't change anything running the following command did:

sudo usb_modeswitch -v 12d1 -p 1f01 -c /etc/usb_modeswitch.conf

There is now an eth1 interface and the box can reach the internet. The SM web interface also give an 'OK' result when test broadband connection with 4G active.

However...

PCs on the Skippermate wireless AP cannot access the internet and although a tunnel appears to have been created (there in one shown in ifconfig) remote access does not appear to work.

Amy thoughts?


Regards

Ian

crb
Site Admin
Posts: 52
Joined: Mon Oct 10, 2016 1:08 pm

Re: Problems getting 4g Dongle to work

Post by crb » Wed Feb 13, 2019 3:54 pm

Hi,
Glad you now have a working dongle.
Failing to access rhe web sounds a bit like a DNS resolution problem. Can you 'ping' your dongle? Can you ping 8.8.8.8 (google's dns server). Can you ping bbc.co.uk? It would be useful if you could post details of 'traceroute bbc.co.uk' (Not sure what the windows equivalent is). Are you trying to access the outside world with a windows machine and, if so, could you try with something running android or linux.
Colin

Rassiloth
Posts: 20
Joined: Thu Feb 07, 2019 4:35 pm

Re: Problems getting 4g Dongle to work

Post by Rassiloth » Thu Feb 14, 2019 5:57 pm

Colin,

No change regardless of OS.

Did some checks though.

From a separate Raspberry Pi acting as a desktop client.

When connected via WiFi to my main house network:
From a web browser connect to SM web interface = OK
From the SM portal 'Check broadband connection' = OK
Ping BCS internal wireless address = OK
Ping BCS external wireless address = OK
Ping BCS external default address = OK
Ping Google DNS IP = OK
Ping www.bbc.com = OK

When connected via 4G (Three UK):
From a web browser connect to SM web interface = OK
From the SM portal 'Check broadband connection' = OK
Ping BCS internal wireless address = OK
Ping BCS external wireless address = OK
Ping BCS external default address = NO RESPONSE
Ping Google DNS IP = NO RESPONSE
Ping www.bbc.com = DOES NOT RESOLVE

NOTE:
All ping tests work in both cases when performed from the BCS itself.

It appears that there is possibly a fault with the IP forwarding when using the 4G dongle.

All thoughts welcome ;-)


Ian

crb
Site Admin
Posts: 52
Joined: Mon Oct 10, 2016 1:08 pm

Re: Problems getting 4g Dongle to work

Post by crb » Fri Feb 15, 2019 3:45 pm

Do I understand that you can reach the SM website but nowhere else? Any chance of traceroute results - we need to see where it stops.

Post Reply