ok, so almost everything here works as expected.
However, the 'modeselect' utility provided with the above zipfile coredumps all over the place on my mac:
- OS X 10.11.6
- Macbook Pro (Retina, Mid 2015)
So, after a lot of digging around, I was able to plugin the device on a linux box, and use the installed 'usb_modeswitch' it failed also (although with a nicer error message):
# usb_modeswitch -v 0x1410 -p 0x9020 -u 2
Looking for default devices ...
found matching product ID
Getting the current device configuration ...
OK, got current device configuration (1)
Found device in default mode, class or configuration (1)
Accessing device 006 on bus 004 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using interface number 0
Error: message endpoint not given or found. Aborting.
So, I proceeded to follow these instructions:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2393&start=0
And, on Linux, using this command successfully puts the device into 'Ethernet Mode':
# echo 2 /sys/bus/usb/devices X-Y-Z/bConfigurationValue
You can find the values for X-Y-Z with:
# lsusb|grep -i nova
Bus 00X Device 00Y: ID 1410:9020 Novatel Wireless
Although this is an easier method:
# dmesg -H
And then scroll down until you see the Novatel section, similar to this:
[ +16.560733] usb 4-1.7: new high-speed USB device number 7 using ehci-pci
[ +0.115107] usb 4-1.7: New USB device found, idVendor=1410, idProduct=9020
[ +0.000005] usb 4-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000003] usb 4-1.7: Product: MiFi USB620L
[ +0.000002] usb 4-1.7: Manufacturer: Novatel Wireless
[ +0.000002] usb 4-1.7: SerialNumber: ABCDEF
So, I thought I was done, but no, Mac OS X has no such mechanism to 'poke' values into /sys/bus/...
And the modeslect provided with the tool above coredumps.
So, I am back to the start, and have no solution for Mac OS X.
But, I didn't give up quite yet:
I remembered that I have installed macports, and have libusb1.0.0 from that.
Unrelated to this thread, I highly recommend macports for any serious Mac Developers.
For more details on macports, go here:
https://www.macports.org/
So, now I dig out the source code for 'usb-modeselect', available from here:
http://www.draisberghof.de/usb_modeswitch/
Compiling this took a bit of fiddling around with the 'Makefile'.
Just change the 'Makefile' as below:
# diff Makefile Makefile.ORIG
3c3
< CC = gcc
---
> CC ?= gcc
# make
sed 's_!/usr/bin/tclsh_!'"/opt/local/src/usb-modeswitch-2.4.0/jim /usr/bin/tclsh"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher
You can safely ignore the weird response from the make command.
The important thing is you now have a usable 'usb_modeswitch' command for OS X!
Now, this is probably enough for most people's use, you can make a little script of your own, that you run every time that you plugin the device:
./usb_modeswitch -p 9020 -v 1410 -u 2
Look for default devices ...
product ID matched
Get the current device configuration ...
Found devices in default mode (1)
Access device 012 on bus 020
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
USB description data (for identification)
-------------------------
Manufacturer: Novatel Wireless
Product: MiFi USB620L
Serial No.: 0123456789ABCDEF
-------------------------
Change configuration to 2 ...
OK, configuration set
Get the current device configuration ...
The configuration was set successfully
-> Run lsusb to note any changes. Bye!
I went a bit further than this, but the steps I gave you above are enough for most uses.