Gambar diatas merupakan modem yang ada pada Router Bolt BL-100. Modem tersebut menggunakan interface m2 seperti PCI-e, tetapi pada implementasinya aslinya menggunakan protokol USB sebagai sistem komunikasi data antara cpu dan modem. Modem ini mensupport band B40 dengan frekuensi 2300.
Setelah beberapa kali debugging dan percobaan, serta membaca referensi dari anggota grup Facebook LT4220 ternyata ada beberapa cara yang harus di kerjakan agar modem ini dapat bekerja yaitu diperlukan driver dan perintah untuk mengaktifkan pin GPIO keluaran chipset mt7620 dimana pin GPIO 28
digunakan untuk mengaktifkan suplai daya ke pin pci yang digunakan.
Jika pin 28 tidak diberi tegangan HIGH maka modem tidak akan menyala, hal ini lah yang membuat awalnya agak kebingungan karena semua driver USB dari hasil debugging sudah diinstall tetapi ketika dilihat di log kernel dan sistem tidak ada satupun device yang terdeteksi. Terimakasih kepada anggota grup LT4220 atas referensinya sehingga modem ini bisa dijalankan.
Tutorial
💡 OpenWRT yang digunakan pada tutorial adalah 23.05.2 dibawah versi ini ada bisa terjadi package yang tidak compatible. Jika bisa gunakan versi OpenWRT yang sama.
- Buka console openwrt melalui ssh menggunakan command berikut, sesuaikan dengan IP openwrt yang digunakan device
→ ssh root@192.168.1.1
root@192.168.1.1's password:
BusyBox v1.36.1 (2023-11-14 13:38:11 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 23.05.2, r23630-842932a63d
-----------------------------------------------------
root@PULPSTONE:~#
- Update list package opkg
→ opkg update
root@PULPSTONE:~# opkg update
Downloading http://pulpstone.pw/repo/chaoscalmer/ramips/mt7620/kernel45/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/pulpstone_packages
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
- Install driver core USB driver harusnya sudah include di build openwrt, tetapi untuk memastikan tidak ada yang kelewat
→ opkg install kmod-usb-core kmod-usb-uhci kmod-usb-ohci kmod-usb2
root@PULPSTONE:~# opkg install kmod-usb-core kmod-usb-uhci kmod-usb-ohci kmod-usb2
Package kmod-usb-core (5.15.137-1) installed in root is up to date.
Installing kmod-usb-uhci (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-uhci_5.15.137-1_mipsel_24kc.ipk
Package kmod-usb-ohci (5.15.137-1) installed in root is up to date.
Package kmod-usb2 (5.15.137-1) installed in root is up to date.
Configuring kmod-usb-uhci.
- Install driver usb untuk keperluan modem serial dan modem networking
→ opkg install kmod-usb-net kmod-usb-net-qmi-wwan kmod-usb-wdm kmod-usb-acm kmod-mii kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan
root@PULPSTONE:~# opkg install kmod-usb-net kmod-usb-net-qmi-wwan kmod-usb-wdm kmod-usb-acm kmod-mii kmod-usb-serial-option kmod-usb-s
erial kmod-usb-serial-wwan
Installing kmod-usb-net (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-net_5.15.137-1_mipsel_24kc.ipk
Installing kmod-mii (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-mii_5.15.137-1_mipsel_24kc.ipk
Installing kmod-usb-net-qmi-wwan (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-net-qmi-wwan_5.15.137-1_mipsel_24kc.ipk
Installing kmod-usb-wdm (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-wdm_5.15.137-1_mipsel_24kc.ipk
Package kmod-usb-wdm (5.15.137-1) installed in root is up to date.
Installing kmod-usb-acm (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-acm_5.15.137-1_mipsel_24kc.ipk
Package kmod-mii (5.15.137-1) installed in root is up to date.
Installing kmod-usb-serial-option (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-serial-option_5.15.137-1_mipsel_24kc.ipk
Installing kmod-usb-serial (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-serial_5.15.137-1_mipsel_24kc.ipk
Installing kmod-usb-serial-wwan (5.15.137-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/kmod-usb-serial-wwan_5.15.137-1_mipsel_24kc.ipk
Package kmod-usb-serial (5.15.137-1) installed in root is up to date.
Package kmod-usb-serial-wwan (5.15.137-1) installed in root is up to date.
Configuring kmod-mii.
Configuring kmod-usb-net.
Configuring kmod-usb-wdm.
Configuring kmod-usb-net-qmi-wwan.
Configuring kmod-usb-serial.
Configuring kmod-usb-serial-wwan.
Configuring kmod-usb-serial-option.
Configuring kmod-usb-acm.
- Install utilitas OpenWRT untuk melihat list usb dan kontrol AT command modem
→ opkg install usbutils qmi-utils adb-enablemodem uqmi minicom picocom comgt
root@PULPSTONE:~# opkg install usbutils qmi-utils adb-enablemodem uqmi minicom picocom comgt
Installing usbutils (014-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/usbutils_014-1_mipsel_24kc.ipk
Installing librt (1.2.4-4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/librt_1.2.4-4_mipsel_24kc.ipk
Installing libatomic1 (12.3.0-4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/libatomic1_12.3.0-4_mipsel_24kc.ipk
Installing libusb-1.0-0 (1.0.26-3) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/libusb-1.0-0_1.0.26-3_mipsel_24kc.ipk
Installing libevdev (1.13.0-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libevdev_1.13.0-1_mipsel_24kc.ipk
Installing libudev-zero (1.0.1-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libudev-zero_1.0.1-1_mipsel_24kc.ipk
Installing qmi-utils (1.32.4-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/qmi-utils_1.32.4-1_mipsel_24kc.ipk
Installing zlib (1.2.13-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/zlib_1.2.13-1_mipsel_24kc.ipk
Installing libffi (3.4.2-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libffi_3.4.2-2_mipsel_24kc.ipk
Installing libattr (2.5.1-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libattr_2.5.1-1_mipsel_24kc.ipk
Installing libpcre2 (10.42-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/libpcre2_10.42-1_mipsel_24kc.ipk
Installing glib2 (2.74.0-5) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/glib2_2.74.0-5_mipsel_24kc.ipk
Installing libmbim (1.28.4-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libmbim_1.28.4-1_mipsel_24kc.ipk
Installing libqrtr-glib (1.2.2-3) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libqrtr-glib_1.2.2-3_mipsel_24kc.ipk
Installing libqmi (1.32.4-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libqmi_1.32.4-1_mipsel_24kc.ipk
Installing adb-enablemodem (2017-03-05-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/adb-enablemodem_2017-03-05-1_mipsel_24kc.ipk
Installing libopenssl3 (3.0.12-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/libopenssl3_3.0.12-1_mipsel_24kc.ipk
Installing adb (android.5.0.2_r1-3) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/adb_android.5.0.2_r1-3_mipsel_24kc.ipk
Installing uqmi (2022-10-20-c8c9f105-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/uqmi_2022-10-20-c8c9f105-1_mipsel_24kc.ipk
Installing wwan (2019-04-29-6) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/wwan_2019-04-29-6_mipsel_24kc.ipk
Installing minicom (2.8-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/minicom_2.8-2_mipsel_24kc.ipk
Installing terminfo (6.4-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/terminfo_6.4-2_mipsel_24kc.ipk
Installing libncurses6 (6.4-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/libncurses6_6.4-2_mipsel_24kc.ipk
Installing picocom (3.1-5) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/picocom_3.1-5_mipsel_24kc.ipk
Installing comgt (0.32-35) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7620/packages/comgt_0.32-35_mipsel_24kc.ipk
Installing chat (2.4.9.git-2021-01-04-4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base/chat_2.4.9.git-2021-01-04-4_mipsel_24kc.ipk
Configuring terminfo.
Configuring libatomic1.
Configuring libopenssl3.
Configuring libevdev.
Configuring chat.
Configuring zlib.
Configuring libffi.
Configuring libattr.
Configuring libpcre2.
Configuring glib2.
Configuring libncurses6.
Configuring minicom.
Configuring librt.
Configuring libusb-1.0-0.
Configuring adb.
Configuring libudev-zero.
Configuring usbutils.
Configuring comgt.
Configuring libmbim.
Configuring libqrtr-glib.
Configuring libqmi.
Configuring wwan.
Configuring uqmi.
Configuring qmi-utils.
Configuring picocom.
Configuring adb-enablemodem.
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
- Install Modem Manager untuk mengelola modem dan install modul interface web lucinya
→ opkg install modemmanager luci-proto-modemmanager luci-proto-qmi
root@PULPSTONE:~# opkg install modemmanager luci-proto-modemmanager luci-proto-qmi
Installing modemmanager (1.20.6-12) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/modemmanager_1.20.6-12_mipsel_24kc.ipk
Installing libexpat (2.5.0-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libexpat_2.5.0-1_mipsel_24kc.ipk
Installing libdbus (1.13.18-12) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/libdbus_1.13.18-12_mipsel_24kc.ipk
Installing dbus (1.13.18-12) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages/dbus_1.13.18-12_mipsel_24kc.ipk
Installing luci-proto-modemmanager (git-23.338.81439-5f6fc19) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/luci/luci-proto-modemmanager_git-23.338.81439-5f6fc19_all.ipk
Installing luci-proto-qmi (git-21.231.25157-5ff3ef7) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/luci/luci-proto-qmi_git-21.231.25157-5ff3ef7_all.ipk
Configuring libdbus.
Configuring libexpat.
Configuring dbus.
Configuring modemmanager.
Configuring luci-proto-modemmanager.
Configuring luci-proto-qmi.
- Dari postingan Debugging USB diketahui VID dan PID modem lte adalah
05c6 9026
kita akan memasukkan VID dan PID ini ke dalam driver qmi
→ echo "05c6 9026" > /sys/bus/usb/drivers/qmi_wwan/new_id
root@PULPSTONE:~# echo "05c6 9026" > /sys/bus/usb/drivers/qmi_wwan/new_id
root@PULPSTONE:~#
- Buat Script Bash untuk mengaktifkan pin
GPIO 28
Pin gpio 28 ini digunakan untuk menyuplai tegangan 3.3 v dari output mt7620 dan berfungsi untuk mengaktifkan modul LTE nya. Jika pin ini tidak di trigger HIGH maka modem LTE tidak akan hidup dan tidak akan terdeteksi.
echo \ '
#!/bin/sh
echo 'Booting Modem'
echo "05c6 9026" > /sys/bus/usb/drivers/qmi_wwan/new_id
echo 28 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio28/direction
echo 0 > /sys/class/gpio/gpio28/value
echo "Sleeping 3s..."
sleep 3
echo "Turning On Modem"
echo 1 > /sys/class/gpio/gpio28/value' > /root/bootmodem.sh
chmod +x /root/bootmodem.sh
- Cek list usb yang terkoneksi sekarang dengan command lsusb. Modem seharusnya belum terdeteksi karena pin GPIO belum diaktifkan.
→ lsusb && lsusb -t
root@PULPSTONE:~# lsusb && lsusb -t
Bus 002 Device 001: ID 1d6b:0001 Linux 5.15.137 ohci_hcd Generic Platform OHCI controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.137 ehci_hcd EHCI Host Controller
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
- Aktifkan modem dengan script bootmodem.sh
→ sh /root/bootmodem.sh
root@PULPSTONE:~# sh /root/bootmodem.sh
Booting Modem
Sleeping 3s...
Turning On Modem
- Cek list usb yang terkoneksi dengan command dibawah
→ lsusb && lsusb -t
root@PULPSTONE:~# lsusb && lsusb -t
Bus 002 Device 001: ID 1d6b:0001 Linux 5.15.137 ohci_hcd Generic Platform OHCI controller
Bus 001 Device 003: ID 05c6:9026 Android Android
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.137 ehci_hcd EHCI Host Controller
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 3, If 0, Class=, Driver=, 480M
|__ Port 1: Dev 3, If 1, Class=, Driver=usbfs, 480M
|__ Port 1: Dev 3, If 2, Class=, Driver=cdc_acm, 480M
|__ Port 1: Dev 3, If 3, Class=, Driver=cdc_acm, 480M
|__ Port 1: Dev 3, If 4, Class=, Driver=cdc_acm, 480M
|__ Port 1: Dev 3, If 5, Class=, Driver=cdc_acm, 480M
|__ Port 1: Dev 3, If 6, Class=, Driver=qmi_wwan, 480M
Modem seharusnya sudah terdeteksi dengan VID dan PID 05c6:9026
Serta terdapat Beberapa port dibawahnya dengan driver usbfs,cdc_acm, dan qmi_wwan. Pastikan juga modem sudah berada di kecepatan usb 480mbps agar dapat berfungsi.
- Cek modem menggunakan Modem Manager CLI
→ mmcli -L
root@PULPSTONE:~# mmcli -L
/org/freedesktop/ModemManager1/Modem/1 [QUALCOMM INCORPORATED] 0
Disini modem mendapatkan ID: 1
maka untuk command selanjutnya masukkan angka 1.
- Cek info modem menggunakan
ID: 1
→ mmcli -m 1
root@PULPSTONE:~# mmcli -m 1
-----------------------------
General | path: /org/freedesktop/ModemManager1/Modem/1
| device id: ****************************************
-----------------------------
Hardware | manufacturer: QUALCOMM INCORPORATED
| model: 0
| firmware revision: WWHC020.51.17.M12_01 1 [Dec 09 2015 22:00:00]
| carrier config: default
| h/w revision: 20002
| supported: lte
| current: lte
| equipment id: ***************
-----------------------------
System | device: /sys/devices/platform/101c0000.ehci/usb1/1-1
| drivers: cdc_acm, qmi_wwan
| plugin: generic
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyACM0 (at), ttyACM1 (at), wwan0 (net)
-----------------------------
Status | state: failed
| failed reason: sim-missing
| power state: on
-----------------------------
Modes | supported: allowed: 4g; preferred: none
| current: allowed: 4g; preferred: none
-----------------------------
Bands | supported: eutran-40
| current: eutran-40
-----------------------------
IP | supported: ipv4, ipv6, ipv4v6
- Reboot Router agar interface luci berubah
→ reboot
Setting Modem di Interface Web
- Untuk setting auto config modem setelah boot masuk ke menu
System -> Startup -> Local Startup
- Tambahkan kode
sh /root/bootmodem.sh
sebelum exit, lalu klik Save
- Reboot router telebih dahulu di menu
System -> Reboot
Lalu Perform Reboot
- Jika sudah menyala bisa cek status modem di
Status -> Mobile Service
akan muncul tampilan seperti ini.
- Lanjut buat interface baru untuk modemnya, disini menggunakan interface QMI. Masuk ke
Network -> Interface
Klik Add New Interface. Pilih protokol QMI Cellular.
- Pilih Modem device yang ada di list
/dev/cdc-wdm0
dan APN isikaninternet
- Lanjut ke Firewall pilih yang
WAN
lalu klik Save, lanjut klik Save & Apply
- Interface sudah terbuat, tinggal masukkan kartu di modem lalu restart interfacenya agar bisa terkoneksi.
Loading Comments ...