creation on one Raspberry Pi of the home VPN server;
installation and setup on the second Raspberry Pi OpenVPN-client, Node.JS and the 3G-modem.
This time we will configure and we will connect the GPS receiver and the Webcam (both devices – USB).
Connection and setup of the GPS receiver
For this purpose I purchased
Let's check whether the device was defined:
Our device — Prolific Technology.
Let's set packets for our device to receive coordinates and we will reboot:
sudo apt-get install gpsd gpsd-clients python-gps -y sudo reboot
Now we will look and we will see that we load the gpsd service, but without indication of the input device (this option does not work):
Let's disconnect this demon:
sudo dpkg-reconfigure gpsd
We answer the first question with "No":
On "No" second too:
It is possible to correct manually file/etc/default/gpsd, but there it is written that it is better to use a packet rekonfigurator that I also made.
Let's start the demon for work with the receiver:
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
Now we will try to receive coordinates:
Happens that indoors cannot long catch coordinate or at the first start — for acquaintance it is possible to esteem about cold and hot start.
It's cool! Now we will add right start of the demon to automatic loading:
Connection and Webcams setup
Because of speed of the channel I preferred image transfer, but not video.
After search and testing of different packets I stopped on fswebcam by means of which I received the image for couple of seconds.
Let's set and at once we will try to receive a picture:
sudo apt-get install fswebcam -y fswebcam —save /home/pi/test.png
Let's take away now and we will check:
scp email@example.com:/home/pi/test.png ./
Where 192.168.2.6 — the IP address received from server OpenVPN.
This article is a translation of the original post at habrahabr.ru/post/202330/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: firstname.lastname@example.org.
We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.