OpenWrt Forum Archive

Topic: Tp-link Tl-wr703n

The content of this topic has been archived between 18 Mar 2015 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Ok, here is the answer to my own question--wifi and lan appear to need to be on separate networks.  I put wifi on 192.168.1.51 and wired on 192.168.0.51.  Here are the config files.

cat /etc/config/wireless

config wifi-device  radio0
        option type     mac80211
        option channel  auto
        option macaddr  38:83:45:d3:10:4c
        option hwmode   11ng
        option htmode   HT20
        list ht_capab   SHORT-GI-20
        list ht_capab   SHORT-GI-40
        list ht_capab   RX-STBC1
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:
#       option disabled 1

config wifi-iface
        option device   radio0
        option network  wireless
        option mode     sta
        option ssid     Omnibus1
        option encryption none

cat /etc/config/network

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.0.51'
        option 'netmask' '255.255.255.0'
        option 'dns' '8.8.8.8'
        option 'gateway' '192.168.1.1'

config 'interface' 'wireless'
       option 'ifname' 'radio0'
#       option 'proto' 'dhcp'
       option 'proto' 'static'
       option 'ipaddr' '192.168.1.51'
       option 'netmask' '255.255.255.0'
       option 'dns' '8.8.8.8'
       option 'gateway' '192.168.1.1'

With this setup, with no ethernet connected to the WR703N, I can ssh to 192.168.1.51 and can browse to the same address to view web pages.

lizby wrote:

Ok, here is the answer to my own question--wifi and lan appear to need to be on separate networks.  I put wifi on 192.168.1.51 and wired on 192.168.0.51. 
With this setup, with no ethernet connected to the WR703N, I can ssh to 192.168.1.51 and can browse to the same address to view web pages.

STA mode, it is so called Client mode.
Work as a wifi client just like those USB-wifi receiver.
I think you can also set your "wireless" interface use dhcp.

But seems that your 703n has no other function at all.
I think repeater mode is more suitable in your case, it will extend your wifi coverage,
Install relayd (or luci-proto-relay if you use luci webui),
interface relay will work as repeater w/o WDS setup.

(Last edited by johan666 on 29 Feb 2012, 10:42)

Hi there.

I have a 703 that is setup such that I can get online with a 3G dongle over WiFi.  The problem is, I don't want to use the WiFi for this particular computer.  I want to use the Ethernet port.  Removed the bridge and disabled the wifi with no luck.  I can't seem to figure out how to get this to work.  Any ideas?

=====================================
/etc/config/network:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        #option 'type' 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wifi'
        option 'proto' 'static'
        option 'ipaddr' '192.168.2.1'
        option 'netmask' '255.255.255.0'

config interface 'wan'
        option 'ifname' 'ppp0'
        option 'pincode' '1234'
        option 'device' 'ttyUSB2'
        option 'apn' '3gnet'
        option 'service' 'umts'
        option 'proto' '3g'
===============================
/etc/config/wireless:

config wifi-device  radio0
        option type     mac80211
        option channel  11
        option macaddr  14:e6:e4:e6:7f:fa
        option hwmode   11ng
        option htmode   HT20
        list ht_capab   SHORT-GI-20
        list ht_capab   SHORT-GI-40
        list ht_capab   RX-STBC1
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   radio0
        option network  wifi
        option mode     ap
        option ssid     OpenWrt
        option encryption none
============================================================
/etc/config/firewall:

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        option network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT

config zone
        option name             wan
        option network          'wan'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan
=========================================
/etc/config/dhcp:

config dnsmasq
        option domainneeded     1
        option boguspriv        1
        option filterwin2k      0  # enable for dial on demand
        option localise_queries 1
        option rebind_protection 1  # disable if upstream must serve RFC1918 addresses
        option rebind_localhost 1  # enable for RBL checking and similar services
        #list rebind_domain example.lan  # whitelist RFC1918 responses for domains
        option local    '/lan/'
        option domain   'lan'
        option expandhosts      1
        option nonegcache       0
        option authoritative    1
        option readethers       1
        option leasefile        '/tmp/dhcp.leases'
        option resolvfile       '/tmp/resolv.conf.auto'
        #list server            '/mycompany.local/1.2.3.4'
        #option nonwildcard     1
        #list interface         br-lan
        #list notinterface      lo
        #list bogusnxdomain     '64.94.110.11'

config dhcp lan
        option interface        lan
        option start    100
        option limit    150
        option leasetime        12h

config dhcp wan
        option interface        wan
        option ignore   1
==============================================

Appreciate any input.

Thanks!!

johan666 wrote:
lizby wrote:

Ok, here is the answer to my own question--wifi and lan appear to need to be on separate networks.  I put wifi on 192.168.1.51 and wired on 192.168.0.51. 
With this setup, with no ethernet connected to the WR703N, I can ssh to 192.168.1.51 and can browse to the same address to view web pages.

STA mode, it is so called Client mode.
Work as a wifi client just like those USB-wifi receiver.
I think you can also set your "wireless" interface use dhcp.

But seems that your 703n has no other function at all.
I think repeater mode is more suitable in your case, it will extend your wifi coverage,
Install relayd (or luci-proto-relay if you use luci webui),
interface relay will work as repeater w/o WDS setup.

>seems that your 703n has no other function at all

No other router function, that's true.  The purpose is for it to be a little stand-alone computer with network access.  This particular one I intend to use as a furnace controller, so that with a usb/serial-connected microprocessor (a PICAXE) I can turn on and off the furnace using a web page running on the WR703N.

lizby wrote:

>seems that your 703n has no other function at all

No other router function, that's true.  The purpose is for it to be a little stand-alone computer with network access.  This particular one I intend to use as a furnace controller, so that with a usb/serial-connected microprocessor (a PICAXE) I can turn on and off the furnace using a web page running on the WR703N.

I see.
In STA mode, it is much better than any USB-wifi.

>In STA mode it is much better than any USB-wifi.

Yes, it provides a lot.  I just wish there were some gpios available (in addition to the led and the serial i/o).

lizby wrote:

>In STA mode it is much better than any USB-wifi.

Yes, it provides a lot.  I just wish there were some gpios available (in addition to the led and the serial i/o).

There is another LED pin - LED2 onboard,
but I don't know it is workable or not.


http://1.bp.blogspot.com/-3vz6u3b7-nM/ToMPbGWsMwI/AAAAAAAABH4/3mHz1U3fd_E/s1600/IMG_0220.JPG


There is onboard serial pin too.
In REV1.0, TP_IN & TP_OUT just beside the RAM chip.
REV1.1 or later, need to use C55 C57 instead.
However I don't find any need to use serial interface.
SquashFS is safe for me.

Finally I figured out how to do Bridge Wifi, extend the wifi coverage with 703N and also reproduce a different ssid.

Hello,
I have three question:

1) How much does the card itself weight ? (with and without the case)

2) I would like to connect a UVC webcam (plugged through USB) and stream the video (other Wifi).  Do you think it is possible ? (Does a 'UVC' driver is working on Openwrt on such device ?)

Thanks for you help

johan666 wrote:

Finally I figured out how to do Bridge Wifi, extend the wifi coverage with 703N and also reproduce a different ssid.

How did you do that?

Hi,
I have created a custom wr703n firmware from latest trunk (r30753) with some additional cool features:
- LUCI web UI
- Luci Statistics app for some cool graphs
- nano text editor out of the box
- USB 2.0 support
- USB storage support with FAT and ext4 file-system support

with all these packages installed you still have 168 K of free storage.

If you have some special feature or package that you would like to see introduced to some packages removed please just ask.

I have tested this firmware on my 703 V1.5  and older ones also and it works without issues.

Download it here: http://dl.dropbox.com/u/184632/openwrt- … actory.bin
Config file: http://dl.dropbox.com/u/184632/.config.703

(Last edited by valentt on 1 Mar 2012, 14:35)

valentt wrote:

Hi,
I have created a custom wr703n firmware from latest trunk (r30753) with some additional cool features:
- LUCI web UI
- Luci Statistics app for some cool graphs
- nano text editor out of the box
- USB 2.0 support
- USB storage support with FAT and ext4 file-system support

with all these packages installed you still have 168 K of free storage.

If you have some special feature or package that you would like to see introduced to some packages removed please just ask.

I have tested this firmware on my 703 V1.5  and older ones also and it works without issues.

Download it here: http://dl.dropbox.com/u/184632/openwrt- … actory.bin
Config file: http://dl.dropbox.com/u/184632/.config.703

Sounds cool !
Is it possible pack the WPAD i/o wpad-mini ?
I think it is needed to make WPS possible in 703n

medvedutka wrote:

Hello,
I have three question:

1) How much does the card itself weight ? (with and without the case)

2) I would like to connect a UVC webcam (plugged through USB) and stream the video (other Wifi).  Do you think it is possible ? (Does a 'UVC' driver is working on Openwrt on such device ?)

Thanks for you help

1. This router itself is already very light, as you can see it is just a simple PCB, I think its weight is just one or two DVD discs.

2. I think so, there is a package named "ffserver" can stream video and audio.
I'm an expert so I don't know how to config it, maybe you need to try on errors.

nebbia88 wrote:
johan666 wrote:

I think it is needed to make WPS possible in 703n

you must be crazy XD

http://www.thedatachain.com/news/2012/1 … _cryptzone

First of all, the WPS is not enable all the time, just activate while pressing the button.
But the main point is, it is for educational purpose.

On the other hand, another brotherhood product - MR3020 - also bundled with WPS function,
those manufactures must by crazy XDDDDD

Well, MS-Windows, OSX, Linux, Android, iphone...... all have security issues,
You must be crazy using all of them XDDDDD

Hi everyone,

i have a bricked device with working serial konsole.
Now i just want to interrupt booting by pressing "tpl" on:
"Autobooting in 1 seconds", but it does not work!

what can i do?

cs

@medvedutka

My scale is not especially accurate, but I get about 9.5 grams for the board alone, and 27 grams for the whole WR703N with nothing plugged into it.

Yes you can connect a UVC camera to the device and it can take snapshots.  In my test with mjpg-streamer, it did not stream reliably--up to 10 seconds between image refreshes, and some lockups.  motion (another program) should work, but I didn't test it.

You would get the most control if you built your own system, but I just downloaded trunk and added packages with opkg.

UPGRADE FROM TRUNK
cd /tmp
wget http://downloads.openwrt.org/snapshots/ … pgrade.bin
mtd write openwrt-ar71xx-generic-tl-wr703n-v1-jffs2-sysupgrade.bin firmware
reboot
[power cycle, telnet in to 192.168.1.1, run passwd, set up system, wireless, network as you like, reboot, ssh in]

INSTALL PROGRAMS
opkg install kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-video-core kmod-video-uvc mjpg-streamer kmod-usb-uhci
mkdir /webcam_www
cd /webcam_www

Now here's the tricky part.  Back in 2008, when you installed mjpg-streamer, it created a directory, /webcam_www, and populated it with helper programs.  Since 2009, that doesn't happen.  I have the earlier programs, and they still work.  I've tarred them and made them available at https://docs.google.com/open?id=0B3iXik … dENqVTd2QQ.  You'll have to download them and get them into the /webcam_www directory. 

If you build your own program, you can include openssh-sftp-server and then download them from windows with winscp or from linux with similar.

Plug in your camera and make sure it is found and set up (dmesg | tail).  Check that you have /dev/video0 or similar.

Once the helper programs are available, you can start mjpg-streamer with

mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w webcam_www"& 

If it started without errors, then you can snap a shot or stream with the following commands (replace 192... with your IP address):

http://192.168.1.52:8080/?action=snapshot
http://192.168.1.52:8080/?action=stream

Snapshot worked on all browsers tested: IE, Opera, Chrome, Firefox, Safari.  Stream worked poorly, and not at all on IE and Opera.  Streaming works fine on an NSLU2 with comparable computing power (see http://www.lyzby.com/cam.html, written up here:

http://www.picaxeforum.co.uk/showthread.php?13705

), so I don't know why the WR703N is sluggish.

(Last edited by lizby on 2 Mar 2012, 05:13)

johan666 wrote:
nebbia88 wrote:
johan666 wrote:

I think it is needed to make WPS possible in 703n

you must be crazy XD

http://www.thedatachain.com/news/2012/1 … _cryptzone

First of all, the WPS is not enable all the time, just activate while pressing the button.
But the main point is, it is for educational purpose.

On the other hand, another brotherhood product - MR3020 - also bundled with WPS function,
those manufactures must by crazy XDDDDD

Well, MS-Windows, OSX, Linux, Android, iphone...... all have security issues,
You must be crazy using all of them XDDDDD

Johan please listen to Security Now Podcast Episode #337 titled "WPS: A Troubled Protocol", download it from http://www.grc.com/securitynow.htm

WPS can be hacked trivially even when you aren't pressing the button.

valentt wrote:

Johan please listen to Security Now Podcast Episode #337 titled "WPS: A Troubled Protocol", download it from http://www.grc.com/securitynow.htm

WPS can be hacked trivially even when you aren't pressing the button.

Tks for the advise.
Actually I fully understood those things.
and in fact I'm not intended to use WPS.
As I said it is for educational purpose.

For security, I would never count on that little 703N, and never count on those AP/router.
Behind that, I have my own firewall and network security system.
And I have two SSID, one is WPA2 protected, another is OPEN.
Just like those public hotspots, even you have connected to the OPEN AP, you won't get access unless you have your own account.
So, if you can hack those hotspots, maybe you can hack mine.

valentt wrote:
johan666 wrote:

Finally I figured out how to do Bridge Wifi, extend the wifi coverage with 703N and also reproduce a different ssid.

How did you do that?

This is called Bridged Client Mode w/Relay.
Install relayd,
or luci-proto-relay if you use luci webui, it will install relayd automatically since it is dependent.

In my 703N,
- simply add a Client AP (let say its interface named "staAP"), it is connected to my neighbor's wifi.
- then add a new AP(s) (eg. ssid3 ssid4...), they are bridged to interface "repeatAP".
- Finally add a new interface use Relay protocol, eg. named as "relay1".
# network
    option proto 'relay'
(relay interface should have IP)

- Then, in "relay1", bond "staAP"  & "repeatAP"
# network
        list network 'repeatAP'
        list network 'staAP'

- Create a new zone named "relay"  (or whatever you like)
put "staAP" "repeatAP" "relay1" in "relay" zone and set Input/Output/Forward all to accept.

restart network, done.

Now, all traffic on ssid3 ssid4..... will go to "staAP" then thorugh wifi go to my neighbor's network.
Since zone "relay1" is not connected or linked to my LAN and WAN zone, so it is isolated to my own network.
But they are still able to connect to my 703N if they know the IP (if it is in the same subnet).

In interface "staAP" and "repeatAP", set to Unmanaged  (option proto 'none'), so that they will have empty IP.
As a result the relay zone and the device(703N) will transparent to neighbor's network.
Moreover, routing, nat, dhcp are not using in 703N.

In short, just repeat my neighbor's wifi AP, then relay to different ssid, then separate those traffic from my own zone.


If you ask (again) why build a network like that,
it is just for educational purpose,
and be sure you are authorized to use others network.

(Last edited by johan666 on 2 Mar 2012, 14:54)

@lizby

thank you so much for all this explanation.  My 703n is ordered, I am waiting for it right now.
I plan to use it as an indoor Blimp controller (through wifi, from a small laptop, it is also why weigh was so important for me); I expect to embed a camera on it and stream "a live stream".
I would like to stream a "good quality live stream" (at 20fps at least but better will be 30fps).

From your experience, do you think the limitation to stream at 20fps come from the USB controller (not fast enough) ?, the processor (not fast enough) or the Wifi connection ?

Thanks again.

@medvedutka

Sounded like you might have an airborne application.  I don't know why streaming is not working well with the WR703N.  As I mentioned, it's working fine with an NSLU2, about comparable in speed, same usb connection, also streaming over wifi. 

I'm going to try streaming with "motion", and will also see if adding back in some webcam_www helper code that I omitted will help.  A self-built version is compiling as I type.

I want to resolve MAC changing procedure completely.  From the forum there are conflicting reports:

        1.  One line of thought suggests that this can be done through the config files without touching the mtd0 and that both wireless and wired will work
        2.  Others have said that this fails to work and that instead the mtd0 must be modified

Which is it?

If mtd0 must be modified, it must first be made writable by modifying the kernel, recompiling, and reflashing the new firmware. This is _hard_ for me.
If mtd0 must be modified, I am in the market for a firmware with the necessary modification but that is otherwise the basic trunk build.

Lets clarify this once and for all.

weissman wrote:

I want to resolve MAC changing procedure completely.  From the forum there are conflicting reports:

        1.  One line of thought suggests that this can be done through the config files without touching the mtd0 and that both wireless and wired will work
        2.  Others have said that this fails to work and that instead the mtd0 must be modified

Which is it?

If mtd0 must be modified, it must first be made writable by modifying the kernel, recompiling, and reflashing the new firmware. This is _hard_ for me.
If mtd0 must be modified, I am in the market for a firmware with the necessary modification but that is otherwise the basic trunk build.

Lets clarify this once and for all.

I tried to change the mac address by changing the macaddr option in the network file.  After the change, ethernet connection works but the wifi stopped working properly as I stated previously.  If anyone did such change and verified that wifi worked correctly after such change, please describe your procedure and I am interested to know also.

I'm trying to build my own image, including only simple functionality:
1) wi-fi client with relayd
2) usbserial, usbstorage, setserial
3) python.
I've removed luci, firewall and so on... Unfortunately, no success - the image still is too big.
What items are not needed to  wi-fi client mode (maybe wpad, hostapd), which I can remove?
Or maybe some other items can be also not included?
Thanks,

clinkme wrote:

I'm trying to build my own image, including only simple functionality:
1) wi-fi client with relayd
2) usbserial, usbstorage, setserial
3) python.
I've removed luci, firewall and so on... Unfortunately, no success - the image still is too big.
What items are not needed to  wi-fi client mode (maybe wpad, hostapd), which I can remove?
Or maybe some other items can be also not included?
Thanks,

maybe you can use wpad-mini i/o complete package of wpad.