Remote Piaware via 3g

Hello,

i´m trying to set up a rpi2 to run outside without any wifi access. I have a 3g stick and i can conect with it via “sudo wvdial umts” and it seems that it will auto reconect if the connection is lost… but i have two problems and because i have almost now clue how to work with linux i can´t solve it…

problem 1: if the connection to the 3g stick is lost it will not auto reconnect. How can i set up that?The biggest problem is that the 3g stick is first recognised as a storage device(sometimes…) and than usb modeswitch will switch it over to the 3g device but if you start wvdial before this switching was done it will not connect…

problem 2: how can i get that thing to dial after booting?

Which 3G stick are you using?

hi

i´m using a “xs-mobile” xs14 stick… to most shitty stick to use with a rpi… but got it working with solar power :slight_smile:

had to set up wvdial (with usb_modeswitch first). Then you can dial with “sudo wvdial yourconnectionname” after that was working i set it up as a network interface in /etc/network/interfaces:

“auto ppp0
allow-auto ppp0
allow-hotplug ppp0
iface ppp0 inet wvdial
provider umts”

after that i could dail in with

“sudo ifdown ppp0
sudo ifup ppp”

and the rpi should use that during boot…
but because of the shitty xs14 3g stick usb_modeswitch has to change from the internal storage area in the 3g stick to the 3g device first. Problem is the the rpi is trying to connect first and than usb_modeswitch is trying to change the id… but without a 3g stick the connection is not possible and the rpi skip´s the ppp0 connection…

then i added this to

/etc/rc.local

“sleep 90s
sudo ifdown ppp0 &
sudo ifup ppp0 &
sudo wvdial umts &”

sleep 90s waits 90sec after the boot and during that time usb_modeswitch can do his job…

next problem was that after unplugging the stick or something wvdial didn´t try to dial again…

with this piece of text into /etc/rc.local this problem was also solved…

“(
while : ; do
wvdial umts
sleep 35
done
) &”

rpi 2 with stock whip, xs14 3g stick, rtl sdr, solar charge controller, 30watt solar panel and a 10watt adjustable switching voltage regulator running:

flightaware.com/adsb/stats/user/ … tats-24855
abload.de/img/20160711_194423r1sx7.jpg

:mrgreen:

but the 30watt panel is to small. The rpi is pulling ~0,6A@13Volt and the panel can´t supply that over a day…

btw. add the usb max power =1 comment to the config file ont the rpi. Without that the rpi couldn´t supply enough power for the 3g stick and the rtl + wifi. Now it is running since a few days with all that plugged directly to it without any problems…

only thing to change is the graph for the network usage in the statistics from dump muta… but i have no clue how to do it… :smiling_imp: