TP-LINK TL-MR3020 + OPENWRT + WEBCAM

Prerequisites
- A working OpenWRT on TP-LINK TL-MR3020 Portable 3G/4G Wireless N Router
- Microsoft LifeCam HD-5000 or any other Linux UVC supported cameras
Installing pacakges for OpenWRT
- Make sure you have Internet connection
- SSH to the router
-
Install the following packages
opkg update opkg install kmod-video-uvc opkg install mjpg-streamer |
[email protected]:~# opkg update |
[email protected]:~# dmesg | grep -i usb |
Enable video streaming
config mjpg-streamer core |
- start on boot
/etc/init.d/mjpg-streamer enable - start mjpg-streamer right now
/etc/init.d/mjpg-streamer start - Stop mjgp-streamer
/etc/init.d/mjpg-streamer stop
Nanavigate to http://192.168.1.1:8080, you should see the following screen

Show Date and Time on top of video
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <script> setInterval(function(){showDateTime()},500); //run showDateTime function every 500ms function showDateTime() { document.getElementById("dateNow").innerHTML = new Date().toDateString(); document.getElementById("timeNow").innerHTML = new Date().toLocaleTimeString(); } </script> <style type="text/css"> div.dateTime { position: fixed; top: 10px; left: 10px; } </style> </head>
<!-- show video from camera, please use your own router IP & port --> <div class="img"> <a target="_parent"><img src="http://192.168.0.1:8080/?action=stream"></a> </div> <div class="dateTime">
<div id="dateNow">Show the date</div> <div id="timeNow">Show the time</div> </div> </body></html>
|
Manage dynamic controls in uvcvideo
- Listing available controls for device video
opkg install uvcdynctrl
uvcdynctrl -c
- Disable auto focus
uvcdynctrl --set='Focus, Auto' 0
- Enable auto focus
uvcdynctrl --set='Focus, Auto'