Huawei mobile/wifi gadgets: HOWTO
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Aug 16 09:07:25 UTC 2019
This seems to be sort of a FAQ, and I had a chance to spend a couple of
quality minutes with one of these devices.
The fundamental problem is that they come up as a CD device, with Windows
software to do whatever it takes.
Sending them a magic USB command enables other interfaces, including
serial/modem, USB ethernet etc.
The remaining issue is: How to get FreeBSD do send the magic string?
A file in /etc/devd along these lines will do it:
notify 1000 {
match "system" "GEOM";
match "type" "CREATE";
match "cdev" "iso9660/MOBILEWIFI";
action "/usr/local/sbin/usb_modeswitch -v 0x12d1 -p 0x15ca -J";
};
It works by reacting to the CD device appearing, which seems to be a
sure-fire indication that the device is in wrong mode.
You may have to adjust the precise "cdev" name (ls /dev/iso9660) and
vendor/product numbers (usbconfig dump_device_desc), and obviously
you have to install the usb_modeswitch port.
The -J argument seems to be what all newer Huawei devices want.
Add ifconfig_ue0=DHCP in /etc/rc.conf, and you should be set.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list