Huawei mobile/wifi gadgets: HOWTO

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Fri, 16 Aug 2019 09:07:13 +0000
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.
Received on Fri Aug 16 2019 - 07:07:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:21 UTC