Streaming webcam videos over network is a great way of monitoring and security. If we can made it with low cast the it will be great beneficial. Here we are doing it with seeed's LinkIt Smart 7688 that comes with OpenWrt Linux distribution and great amount of memory.
What we need is:
Setup and connecting to LinkIt Smart 7688 is very easy.
The basic connectivity of device is shown here. The device has to USB ports, two indicator LEDs and two reset buttons. To power up the board, connect one end of micro USB to the power connector of the LinkIt Smart board and another end to your computer or other 5V power source. The Power LED (Green) will light up first, followed by the Wi-Fi LED (Orange) which will blink once. Then, after about 4~5 seconds, the Wi-Fi LED will light; this indicates that the boot loader has initialized. After the boot loader has initialized the boot up process begins, which takes about 30 seconds. Next, the Wi-Fi LED turns off; this means the system is ready to accept a Wi-Fi connection.
Connect to LinkIt Smart 7688 with web UI:
After the boot process is completed the wi-fi access point of LinkIt Smart will on. Now connect your computer or laptop to this access point. Search for the LinkIt_Smart_7688_XXXXXX Wi-Fi access point (XXXXXX is the MAC address) and connect to the board. Now open http://mylinkit.local and you will get the Web UI of LinkIt Smart 7688. Since LinkIt Smart uses mDNS so in windows 7 or earlier you may need Bonjour.
On first time access to the Web UI, you will be asked to set a password as shown in the figure. Please remember your new password, next time it will be required.
Access the System Console of 7688 board:
Open PuTTY and in the configuration window, type mylinkit.local in Host Name, select SSH and click open.
The PuTTY terminal window displays. Sign in with the username root and the password you set previously in the Web UI. After sign in you should see a screen similar to the one below.
In Mac or Linux:
Open Terminal and at the command prompt type ssh firstname.lastname@example.org. Press return and enter the password you set previously in the Web UI.
If you see a warning error indicating host ID has changed, please check the Troubleshooting section in the MediaTek LinkIt Smart 7688 Developer’s Guide.
You now have access to system console using SSH. You can move on to running your first application on the LinkIt Smart 7688 development board.
Now you can use the LinkIt Smart as wifi station.
This will reboot the system and our board will be in station mode. The reboot process will take some time. Once the reboot process is completed the board will be connected to the network you selected. Now connect your computer or laptop to the same network. Once connected you can access LinkIt Smart 7688 with host 'mylinkit.local'.
Connect to device with ssh as shown in first step.
For streaming purpose we are using 'mjpg_streamer' package which is pre-installed in the device. You can check it by following command:
If your device don't have this package then install it with 'opkg install' command.
Now run the following command.
mjpg_streamer -i"input_uvc.so -d /dev/video0 -r 640x480 -f 25"-o"output_http.so -p 8080 -w /www/webcam"
This will stream your webcam to http port 8080.
Now go to the link"http://mylinkit.local:8080"in the browser connected to the same network on which LinkIt Smart is connected and you will see the live streaming from the device.
You can configure the frame rate and access control to the streaming.
Hope you like it.