Achraf Oukheir
Published

Modem LTE/3g /2g with raspberry pi 3/4 A+/B+...

Solution to make any modem eithe its alcatel or huawei to get connected via USB to Raspberry pi. avoiding many issues and some OS panic

BeginnerProtip1 hour4,548
Modem LTE/3g /2g with raspberry pi 3/4 A+/B+...

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
Alcatel ik40
×1
HUAWEI Developers huawei modem 4g/3g
×1

Software apps and online services

Raspbian
Raspberry Pi Raspbian

Story

Read more

Schematics

Modems and USb connection

two type of modems Huawei and Alcatel

Code

/etc/usb_modeswitch.d/1bbb:f000

Powershell
create the file "/etc/usb_modeswitch.d/1bbb:f000" (use the quotes, since there's a : in the file name)
put into the file this content:
TargetVendor=0x1bbb
TargetProductList="0000,0017,00b7,011e,0191,0195"
StandardEject=1

sudo nano /etc/wvdial.conf

Powershell
The default config of wvdial is fine for me. If you need to edit it, the config file is here:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = *99#
Password = internet
Username = internet
Stupid Mode = on

sudo nano /etc/systemd/system/wvdial.service

Powershell
Create the service
I need the USB modem can auto dial-up, I created a wvdial.service file.
[Unit]
Description=wvdial

[Service]
ExecStart=/usr/bin/wvdial
Restart=on-failure
RestartSec=5

$ sudo pico /etc/udev/rules.d/99-com.rules

Powershell
Add the code to the 99-com.rules file. It will call the wvdial.service when the USB modem loaded.
SUBSYSTEM=="tty", KERNEL=="ttyUSB0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="wvdial.service"

Credits

Achraf Oukheir

Achraf Oukheir

8 projects • 14 followers

Comments