Hi all, Has anyone had any success with getting a Huawei (Vodafone-branded) K5161h 4G dongle working on OpenBSD?
It looks like it should work with the umb(4) driver, but the problem is getting it into the right mode. When I plug it in, it appears as a USB CD drive, and there are magic commands you can send to it to make it appear either as an Ethernet interface (where it does NAT and DHCP for you, should be supported by the cdce(4) driver) or as an MBIM device plus three USB serial ports (which should be supported by umb(4) and hopefully ucom(4)). On FreeBSD and Linux, the mode switching is done by usb_modeswitch, which supports switching it to either mode. usb_modeswitch compiles fine on OpenBSD, but fails to actually send the magic command, and the error code (from the usb_bulk_io function in libusb) says "unsupported on this platform". The other approach is to find a magic AT command that would switch it to MBIM mode permanently, but I've failed to find anything online for this model, and AT commands that I've found for other models don't work on this one. What it looks like in dmesg: ----- umass0 at uhub0 port 1 configuration 1 interface 0 "HUAWEI_MOBILE HUAWEI_MOBILE" rev 2.00/1.02 addr 2 umass0: using SCSI over Bulk-Only scsibus3 at umass0: 2 targets, initiator 0 scsibus3 targ 1 lun 0: <HUAWEI, Mass Storage, 2.31> removable serial.12d11f1d456789ABCDEF not configured ----- What usbdevs -v says: ----- addr 02: 12d1:1f1d HUAWEI_MOBILE, HUAWEI_MOBILE high speed, power 2 mA, config 1, rev 1.02, iSerial 0123456789ABCDEF driver: umass0 ----- What usb_modeswitch says: ----- # usb_modeswitch -v 12d1 -p 1f1d -X Look for default devices ... Found devices in default mode (1) Access device 002 on bus 000 Get the current device configuration ... Current configuration number is 1 Use interface number 0 with class 8 Use endpoints 0x01 (out) and 0x81 (in) Using alternative Huawei switching message Looking for active drivers ... Can't do driver detection on this platform. Set up interface 0 Use endpoint 0x01 for message sending ... Trying to send message 1 to endpoint 0x01 ... Sending the message returned error -12. Try to continue Read the response to message 1 (CSW) ... Response reading failed (error -12) Device is gone, skip any further commands -> Run lsusb to note any changes. Bye! ----- I don't think it should make a difference, but I'm trying to do this on the Octeon platform (EdgeRouter 6P). Any ideas appreciated. Many thanks, Alex