Alcatel X602D don't work with openwrt

Hi All!
I have Alcatel X602D 4G Usb modem, for using in OpenWRT

cat openwrt_release

OS: OpenWrt 18.06.4 r7808-ef686b7292'
HW: ramips/mt7620,

I cleared device with option "Reset to defaults"
and installed that packets:

opkg install kmod-usb-core kmod-usb2 kmod-usb-serial kmod-usb-serial-wwan kmod-usb-serial-option usb-modeswitch luci-proto-3g

and created file /etc/hotplug.d/usb/30-alcatel_x232d
with content:

#!/bin/sh
ALCATELX232D_PRODID="1bbb/22c/0"
if [ "${PRODUCT}" = "${ALCATELX232D_PRODID}" ]; then
	if [ "${ACTION}" = "add" ]; then
		echo '1bbb 022c' > /sys/bus/usb-serial/drivers/option1/new_id
		logger -t HOTPLUG "${ALCATELX232D_PRODID} plugged in."
	fi
	if [ "${ACTION}" = "remove" ]; then
		logger -t HOTPLUG "${ALCATELX232D_PRODID} was removed."
	fi
fi

created new connection:
/etc/config/network:

config interface 'WAN3G'
	option proto '3g'
	option service 'umts_only'
	option apn 'home.beeline.ru'
	option username 'beeline'
	option password 'beeline'
	option ipv6 'auto'
	option dialnumber '*99#'
	option peerdns '1'
	option device '/dev/ttyUSB1'

new ttyUSB present in devices:

# ls /dev/ttyUSB*
/dev/ttyUSB1  /dev/ttyUSB2  /dev/ttyUSB3

added connection to WAN zone in
/etc/config/firewall

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan wan6 WAN3G'

and 2 or 3 times device is connected over mobile ISP randomly

now log fills by this messages while device is connected:

...
kern.warn kernel: [ 6437.406321] usb 1-1: usbfs: process 24430 (usbmode) did not claim interface 1 before use
...
# logread -l 20 
Sun Oct 13 23:33:08 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.
Sun Oct 13 23:33:08 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.074501] option 1-1:2.0: GSM modem (1-port) converter detected
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.087106] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.101710] option 1-1:2.1: GSM modem (1-port) converter detected
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.114235] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.128845] option 1-1:2.2: GSM modem (1-port) converter detected
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.141365] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.156055] option 1-1:2.3: GSM modem (1-port) converter detected
Sun Oct 13 23:33:08 2019 kern.info kernel: [ 6505.168580] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
Sun Oct 13 23:33:09 2019 kern.info kernel: [ 6505.711615] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Sun Oct 13 23:33:09 2019 kern.info kernel: [ 6505.727801] option 1-1:2.0: device disconnected
Sun Oct 13 23:33:09 2019 user.notice HOTPLUG: 1bbb/22c/0 was removed.
Sun Oct 13 23:33:10 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.
Sun Oct 13 23:33:10 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.
Sun Oct 13 23:33:10 2019 daemon.notice netifd: Interface 'WAN3G' is setting up now
Sun Oct 13 23:33:11 2019 daemon.notice netifd: Interface 'WAN3G' is now down
Sun Oct 13 23:33:11 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.
Sun Oct 13 23:33:12 2019 user.notice HOTPLUG: 1bbb/22c/0 plugged in.

when I press [reconnect] button in interfaces
log file fills with this repeating records:

Sun Oct 13 23:59:07 2019 daemon.notice netifd: Interface 'WAN3G' is setting up now
Sun Oct 13 23:59:10 2019 daemon.notice netifd: WAN3G (32159): /usr/sbin/pppd: local/remote LL address required for demand-dialling
Sun Oct 13 23:59:10 2019 daemon.notice netifd: WAN3G (32159):
Sun Oct 13 23:59:10 2019 daemon.err pppd[32159]: local/remote LL address required for demand-dialling
Sun Oct 13 23:59:10 2019 daemon.notice netifd: Interface 'WAN3G' is now down
Sun Oct 13 23:59:10 2019 daemon.notice netifd: Interface 'WAN3G' is setting up now
Sun Oct 13 23:59:11 2019 daemon.notice netifd: Interface 'WAN3G' is now down

router fails connect to 4G using this modem.
Maybe my config needs another one or two "small magic words" in configs :slight_smile: , who knows please help.

I guess you have problems with USB power, config is out of discussion yet.

BTW, if you set 'option service 'umts_only'' you should not be surprised that

This modem is not even 4G capable.

1 Like

A powered, USB hub is the first step. Many modems require more current than what either the USB 2 spec or hosts can supply.