Hello
I’ve just created a new Dietpi on a RPi2 and can’t work out how to get usb_modeswitch to start automatically.
The apt-get install of usb-modeswitch seems to want to use upstart by default (as it creates a /etc/init/usb-modeswitch-upstart.conf) but I can’t work out how to use this, or what dietpi uses by default.
I can create a script with the following - but this seems inelegant.
usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1f01
sleep 2
ifup usb0
sleep 2
route add default gw 192.168.8.1
How should I be getting usb_modeswitch to run automatically?
but I can’t work out how to use this, or what dietpi uses by default.
Hi,
DietPi is Raspbian. Both use SystemD. If you installed usb_modeswitch via apt, same for both.
I can create a script with the following - but this seems inelegant.
As per: https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial
Config file is located here:
/etc/usb_modeswitch.conf
I had followed as per https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial
But usb_modeswitch isn’t getting run on boot. I’ve got around this by adding this to /etc/rc.local before exit 0:
/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1f01
ifup usb0
I’m running V148, but on the same devices running V100 I don’t need to do this in rc.local.
Any thoughts?
I found the installer doing an apt-get was only doing an “upstart” install, not systemd and udev.
Complied from the 2.5.0 sources and it’s now running usb_modeswitch-dispatcher correctly.