Jump to content


TP-link WR703n as telemetry link and camera broadcasting Part2 (software)

Posted by fertito , 13 June 2012 · 12243 views

wr703n ip telemetry openwrt

now that you have a wr703n runing on openwrt, it is time to put some software on it and eventually make some addon.

the fact is : there is not much place on the router to make everything fit...
the solution I recommand : Add a USB Hub, to be able to plug not only the openpilot board, but also the webcam, and an usb flashdrive to make a system overlay so that it will be at ease.

Warning : Connectic is heavy, it may be necessery to solder the whole things instead of plugin it.

So, connect the wr703n with an ethernet cable on your home router, plug the usb power, wait until the blue led is rock solid, open a terminal and type :

It should grant you and wait for your input...

first of all we need to update the package :

opkg update
the we need to install some stuff to prepare the overlay :
opkg install kmod-usb-storage
Do the same with :
note : your flashdrive should be ext4 formated (I did this directly on the router, but don't remember the command)

once this is done :
mkdir -p /mnt/usb
mount -t ext4 /dev/sda1 /mnt/usb -o rw,sync
then open with vim /etc/config/fstab and add :
config 'mount'
	   option target   /overlay
	   option device   /dev/sda1
	   option fstype   ext4
	   option options  rw,sync
	   option enabled  1
	   option enabled_fsck 0

and reconnect

because it is nice to have a web interface for administration install luci
opkg update
opkg install luci

this will give you access, with a nice GUI, to all the administration forms when you connect a browser to :
Posted Image

Now it is time to add some software relative to the Openpilot Board with the mainport as telemetry serial (57600bds):
opkg install ser2net

note : I'm am note sure anymore, but I think I added also a tty program utility, but not sure it was usefull

I'll repeat myself, at start openwrt stream the console in the serial line, it is usefull to be able to unbrick a wr703n (maybe next tutorial), but if you enter a CR or LF on the serial line (/dev/ttyS0 or /dev/console) it will enter in console mode and then won't let you stream the telemetry.
So first of all, we have to edit /etc/inittab and remove all the line that look like one of the 3 last :
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
tts/0::askfirst:/bin/ash --login
ttyS0::askfirst:/bin/ash --login
tty1::askfirst:/bin/ash --login
To avoid any problem at boot, do plug the openpilot board only when the wr703n has finished his booting sequence (blue led solid). It will come specially if you have your telemetry setup with 115200bds.

Now it is time to setup ser2net, edit /etc/ser2net.conf on mine I removed everything and putted only this line :

edit the /etc/rc.common and add :
killall ser2net

And then enable the service :
/etc/init.d/ser2net enable

and run it :

that's All! now everything that'll go througt the serial line will be directed (full duplex) to ;)

plug the openpilot to the wr703n (gnd, tx, rx are minimum) and power it, configure it with telemetry on the port it is connected @57600bds, reboot and configure your gcs with ip telemtry TCP port 8081.

Now use the luci interface to add a new network interface (wifi) to be able to access to the router on wireless (I think this is the usefull things ;) ) and make your wifi ip adress this one :
Reboot, ..., connect your pc with wifi to the new openwrt network that should appear, configure the gcs with this new adress ( and Voila... ;)

For the 'next' branche with your openpilot setup with vcp telemetry you'll have to add few more things :
opkg update
opkg install kmod-usb-serial kmod-usb-acm

And edit /etc/ser2net.conf :

Does that "option target /overlay" really work?

I tried to use your blog notes when i set mine up. Thought it will be a fast setup. I toook me a while to get it to work.

I got mine working with USB stick and extroot, but not configured as you show above, I never had any success with that config. Does it really work?

I have seen the same config examples at wiki as well, thats why I'm wondering. I guess there is some scenario where it work..

I mounted my usb stick, copied the data for the overlay to the USB stick root, then i mounted without option target but option is_rootfs 1. fs_root, without "option target" stated. It then mounted as /overlay by itself. never got it working with the config you wrote in blog.

Seems like a lot have been changed regarding this in Open WRT, and what is working and not isn't really obvious.
Any luck with 3G modem? I got a bunch of huawei modems I will try to get working. Seems like it might be a challenge, when reading up on the topic.
yes it worked fine for me, it is a setup I stricktly followed on another website.
be sure that your usb external drive is ext4 formatted...

I didn't retry yet the 3G modem, it connected but I couldn't get a global ip adress, just a local one, will try it again someday ;)

October 2015

   123 4

Recent Comments