Raspberry Pi WebCam with 3G (Solarcam): Difference between revisions
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
iface wwan0 inet dhcp | iface wwan0 inet dhcp | ||
allow-hotplug wwan0 | allow-hotplug wwan0 | ||
Reboot: | |||
shutdown -r now | shutdown -r now | ||
Revision as of 21:32, 12 August 2017
The Idea
- Use solar panel to harvest energy
- Store the energy in a left over car battery
- Power a Pi with camera and 3G-Stick
- Make a nice webcam out of it :)
How To
Update your Pi
apt-get update apt-get upgrade
Install USB-Modeswitch
apt-get install usb-modeswitch
(you'll need this later to switch your stick from mass storage to modem mode)
Create network interface
Add to /etc/network/interfaces
iface eth1 inet dhcpallow-hotplug eth1iface wwan0 inet dhcp allow-hotplug wwan0
Reboot:
shutdown -r now
Check interface
It should read like this (on boot):
pi@raspberrypi ~ $ dmesg | grep GSM [ 9.322073] usbserial: USB Serial support registered for GSM modem (1-port) [ 9.805167] option 1-1.3:1.0: GSM modem (1-port) converter detected [ 9.893094] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0 [ 10.003375] option 1-1.3:1.3: GSM modem (1-port) converter detected [ 10.145947] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1 [ 10.250436] option 1-1.3:1.4: GSM modem (1-port) converter detected [ 10.372741] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2 pi@raspberrypi ~ $
pi@raspberrypi ~ $ dmesg | grep HUA [ 3.442910] usb 1-1.3: Product: HUAWEI Mobile [ 3.448928] usb 1-1.3: Manufacturer: HUAWEI Technology [ 4.514394] scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2 [ 4.535154] scsi 6:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2 pi@raspberrypi ~ $
root@raspberrypi:~# lsusb | grep Huaw Bus 001 Device 006: ID 12d1:1436 Huawei Technologies Co., Ltd. root@raspberrypi:~#
Script: Take picture every minute
Add this to crontab:
* * * * * /home/pi/Development/webcam/takePicture.sh > /dev/null 2>&1
Add a file named takePicture.sh to ~/Development/webcam/ with this contents:
TBD TBD TBD
Tips
- Remember that this Pi is in the wild and easily stolen or all the data read
- Don't use your usual passwords for this project
- Don't store keys on the Pi
- Let your master server fetch the data (so no private keys are stored on the Pi)
- Create a special user to access the data from remote