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?
Dietpi - autostart usb_modeswitch
Re: Dietpi - autostart usb_modeswitch
Hi,but I can't work out how to use this, or what dietpi uses by default.
DietPi is Raspbian. Both use SystemD. If you installed usb_modeswitch via apt, same for both.
As per: https://www.thefanclub.co.za/how-to/how ... and-wvdialI can create a script with the following - but this seems inelegant.
Config file is located here:
Code: Select all
/etc/usb_modeswitch.conf
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 6
- Joined: Wed Aug 19, 2015 11:54 am
Re: Dietpi - autostart usb_modeswitch
I had followed as per https://www.thefanclub.co.za/how-to/how ... 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?
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?
-
- Posts: 6
- Joined: Wed Aug 19, 2015 11:54 am
Re: Dietpi - autostart usb_modeswitch (resolved)
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.
Complied from the 2.5.0 sources and it's now running usb_modeswitch-dispatcher correctly.