Date: Fri, 16 Aug 2019 09:07:13 +0000 From: Poul-Henning Kamp <phk@phk.freebsd.dk> To: current@freebsd.org Subject: Huawei mobile/wifi gadgets: HOWTO Message-ID: <5368.1565946433@critter.freebsd.dk>
next in thread | raw e-mail | index | archive | help
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@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5368.1565946433>