Raspberry Pi WebCam with 3G (Solarcam): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 2: | Line 2: | ||
* Use solar panel to harvest energy | * Use solar panel to harvest energy | ||
* Store the energy in a left over car battery | * Store the energy in a left over car battery | ||
* Power a [[Pi]], camera and 3G-Stick | * Power a [[Pi]], camera and <del>3G-Stick</del> Mobile HotSpot<ref>Since setting up the 3G-Stick was a pain in...</ref> | ||
* Make a nice webcam out of it :) | * Make a nice webcam out of it :) | ||
Line 9: | Line 9: | ||
* Huawei E1750C (thats an mobile HotSpot. Because getting an UMTS-Stick getting to work with an [[Pi]] sucks. Additionally you can easily join the WiFi network for maintenance) | * Huawei E1750C (thats an mobile HotSpot. Because getting an UMTS-Stick getting to work with an [[Pi]] sucks. Additionally you can easily join the WiFi network for maintenance) | ||
* SIM Card | * SIM Card | ||
* (used) Car battery | * (used) Car battery, my case an 74Ah battery with one dead cell | ||
* Solar panel (TBD) | * Solar panel (TBD) | ||
* Solar charger (TBD) | * Solar charger (TBD) |
Revision as of 13:53, 19 April 2018
The Idea
- Use solar panel to harvest energy
- Store the energy in a left over car battery
- Power a Pi, camera and
3G-StickMobile HotSpot[1] - Make a nice webcam out of it :)
Shopping List
- A Pi :)
- Huawei E1750C (thats an mobile HotSpot. Because getting an UMTS-Stick getting to work with an Pi sucks. Additionally you can easily join the WiFi network for maintenance)
- SIM Card
- (used) Car battery, my case an 74Ah battery with one dead cell
- Solar panel (TBD)
- Solar charger (TBD)
- more to come…
How To
Update your Pi
apt-get update apt-get upgrade
Install USB-Modeswitch
apt-get install usb-modeswitch
(you'll need this 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) or use a chroot environment
- Create a special user to access the data from remote, or even better, get it per HTTP and use .htaccess for privacy (and less 3G-traffic ;) )
- If you WiFi connection breaks regularly, see Raspberry Pi WiFi issue (Solarcam)
?
- Links
- ↑ Since setting up the 3G-Stick was a pain in...