On 2017-02-03, Karl Pettersson <[email protected]> wrote: > I have a Huwaei E353 USB device, which I use to connect with the tre.se > Internet provider. This device initially attaches as a mass storage > device with product id 1f01. Under Linux, it is then switched to HiLink > Ethernet mode with the usb_modeswitch program. OpenBSD 6.0 instead makes the > device attach as a umsm modem device (after initially identifying it as > a UMASS5 storage device), and I have been unable to connect > using ppp in that mode. Maybe the device is not supposed to be used > that way: AT^SETPORT=? does not even list modem mode as > available. > > I made the following changes to src/sys/dev/usb/umsm.c, after the > settings in the device_reference.txt for usb_modeswitch (l 2632): > > *** 704,709 **** > --- 704,711 ---- > cbw.bCBWFlags = CBWFLAGS_OUT; > cbw.CBWCDB[0] = 0x11; > cbw.CBWCDB[1] = 0x06; > + cbw.CBWCDB[2] = 0x20; > + cbw.CBWCDB[8] = 0x01; > break; > case DEV_UMASS6: /* ZTE */ > USETDW(cbw.dCBWDataTransferLength, 0x20); > > After I recompiled the kernel with these changes, the device correctly > attaches as a cdce Ethernet device, and after giving the following commands, I > can use my Internet connection normally: > > # ifconfig cdce0 up > # dhclient cdce0 > > So, these changes should perhaps be merged with the default kernel? > > Regards, > Karl Pettersson > >
This code is used by 11 different entries in umsm(4)'s device id table, some of which may not support this, so would either need matching against only this device id, or testing with a wide range of other Huaweis. Even then, presumably there are some devices with this product id which *do* work (it may be that the mobile provider can programme the device to provide only certain modes). So those users would need notice in release notes etc about the change of device type, otherwise they might not be able to get into a remote machine following an upgrade..

