How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7

Showing 1-12 of 12 messages
How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/3/12 2:45 PM
Hello everyone

I have spent more than too weeks trying to do this on my own but I am
throwing the towel and asking for help.

How can I configure batman-d after flashing the TP-link with openwrt-
ar71xx-generic-tl-wr703n-v1-SN1_7-squashfs-factory.bin from the SECN
branch.

Out of the box, that firmware has a corrupt batman-adv configuration
file. It shows like a binary file. But even after replacing the file
with a plain text version, batman-adv does not seam to be compatible
with batman-d. They are not seeing each other in my can even though
they have the same settings.

If anyone has done this before, can you please give me some pointers?

If it is not possible, then my next question will be ... How to mount
and external USB drive using Elektra's firmware for the TP-Link?

I am now thinking compiling my own openwrt flavor for the TP-Link but
I will probably have to create the serial port first as it is very
easy to brick a device when building a firmware.

Keep up the good work.

A. $iby

Re: [vt-dev] How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Keith Williamson 2/3/12 4:18 PM
Hi Abdoulaye,

Sorry you are having this issue. I posted SN1_7 not long ago but ran it in my home test net for several days without issue. We later discovered that /etc/config/batman-adv got scrozzled by a missed attempt to create the config.tar.gz in the same folder. The batman-adv file got overwritten as a gzipped tar archive.

I think to recover, just zero out the batman-adv config file, and then re-run init.d/run-on-first-boot. The run-on-first-boot script will create the correct entries in batman-adv and wireless config files such that the device should interwork with MP's and other TP's.

It normally runs once because it's initially linked to rc.d and then it's last act is to nuke the link in rc.d so it doesn't run again. I wonder if that mechanism is subverted somehow if the factory.bin file is flashed from the TP-link factory image.

When you say you flashed the factory.bin version, I assume that means you flashed a unit that was still running TP-link factory firmware. Once you have OpenWRT flashed on the device, you need to use the sysupgrade.bin version unless you have access to uboot via a serial port. When you do use sysupgrade, I recommend using the -n arg to prevent having stale config files in /etc that cause other potential issues.

Cheers,

Keith


--
You received this message because you are subscribed to the Google Groups "village-telco-dev" group.
To post to this group, send email to village-...@googlegroups.com.
To unsubscribe from this group, send email to village-telco-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/village-telco-dev?hl=en.


Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/3/12 4:34 PM
Hello Keith

Thanks for your response. The flashing was made from the factory
firmware and I have used the version that should be used without any
need to apply a sysupgrade (as per the documentation that I found at
that time). The flashing went well and I had the same result as
another TP-Link that had to go through the sysupgrade process.

I will follow the instructions for batman-adv in a few minutes and
give you some feedback.

Thanks again Keith.

A. $iby
Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/4/12 8:19 AM
Still no luck.

When running the run-on-first-boot script, it hangs after trying to
restart the network and I get the following error message

interface not found.
interface not found.
Interface type  not supported.
ifconfig: SIOCSIFADDR: No such device
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 38:83:45:36:47:02 and ssid 'TL-
WR703N-AP'

Here are the configuration files

root@TP-20:~# cat /etc/config/wireless

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'macaddr' '38:83:45:36:47:02'
        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'
        option 'channel' '1'
        option 'disabled' '0'
        option 'txpower' '17'
        option 'country' 'DE'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'encryption' 'none'
        option 'network' 'wifi1'
        option 'bssid' '02:CA:FF:EE:BA:BE'
        option 'mode' 'adhoc'
        option 'ssid' 'potato'
        option 'sw_merge' '1'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'wifi0'
        option 'mode' 'ap'
        option 'ssid' 'TL-WR703N-AP'
        option 'encryption' 'psk'
        option 'key' 'potato-potato'
        option 'sw_merge' '1'
        option 'hidden' '0'


root@TP-20:~# 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 'proto' 'static'
        option 'ipaddr' '10.130.1.20'
        option 'netmask' '255.255.255.0'
        option 'gateway' '10.130.1.254'
        option 'dns' '8.8.8.8'
        option 'type' 'bridge'
        option 'ifname' 'eth0 bat0 wlan0'

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'

config 'interface' 'wifi0'
        option 'ifname' 'wlan0'

config 'interface' 'wifi1'
        option 'ifname' 'wlan1'
        option 'proto' 'static'
        option 'ipaddr' '10.30.1.1'
        option 'netmask' '255.255.255.0'
        option 'mtu' '1527'


root@TP-20:~# cat /etc/config/batman-adv

config 'mesh' 'bat0'
        option 'interfaces' 'wlan1'
        option 'gw_mode' 'off'
Re: [vt-dev] Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 elektra 2/4/12 9:44 AM
Hi -

please post the output of "iwconfig" and of "batctl if"

Do you have a firewall installed/running?

Cheers,
Elektra


--
Viral meme of radical freedom
 
The fact that you talk in your head doesn't mean that you think.
 
The best way to lose control over yourself is trying to control yourself.
 
Most people experience themselves as a voice in their head, telling them
 who they are, what they think and what they have to do.
 
http://en.wikipedia.org/wiki/Meme

Re: [vt-dev] Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Keith Williamson 2/4/12 10:27 AM
Hi,

It might be that running init.d/run-on-first-boot doesn't work correctly once the system in completely up. I also think this must reflect a difference in the way the original TP-Link factory firmware flashes factory.bin files vs the way we do this with uboot.

Since you seem to have working network access to openwrt on the unit, I recommend using scp to copy the SN1_7 sysupgrade.bin to /tmp, then ssh into the unit and run:

sysupgrade -n -v /tmp/openwrt-ar71xx-generic-tl-wr703n-v1-SN1_7-squashfs-sysupgrade.bin

Then take a break since the sysupgrade process seems to take quite some time to complete.

If this fixes the issue, I need to add a test after building where I reflash one of my WR703's back to the TP-Link factory firmware and then flash my factory.bin using their web interface.

Cheers,

Keith
Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/4/12 12:23 PM
Hello Keith

I have made the sysupgrade and it brought it to the version: WR703N v1-
SN1_7 (r28943) ... which is the same version I had back when I was
having issues configuring batman-adv.

Elektra, here are the data you have requested ...

iwconfig
======
root@TP-20:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

br-lan    no wireless extensions.

wlan0     IEEE 802.11bgn  Mode:Master  Frequency:2.412 GHz  Tx-
Power=17 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

wlan0-1   IEEE 802.11bgn  ESSID:"potato"
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:CA:FF:EE:BA:BE
          Tx-Power=17 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

mon.wlan0  IEEE 802.11bgn  Mode:Monitor  Tx-Power=17 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

bat0      no wireless extensions.


batctl if
======

root@TP-20:~# batctl if
wlan0-1: active

I haven't installed or configured any firewall. The only extra
packages that I have installed after flashing it are php5 and nano and
they are installed on the usb.

Cheers

A. $iby
Re: [vt-dev] Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Keith Williamson 2/4/12 12:44 PM
Hi Abdoulaye,

Sorry to be a bit thick headed but I'm not sure I understand what the actual issue is. After doing the sysupgrade, do the WR703's interoperate OK? And if you have Mesh Potatoes with SECN installed, do the WR703's interoperate with those?

Rereading your email carefully, you ask if batman-adv is compatible with batman-d. What is batman-d? Is it a daemon that's part of batman (layer-3 version)?

Cheers,

Keith




A. $iby

--
You received this message because you are subscribed to the Google Groups "village-telco-dev" group.
To post to this group, send email to village-...@googlegroups.com.
To unsubscribe from this group, send email to village-telco-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/village-telco-dev?hl=en.


Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/4/12 1:52 PM
Hello Keith,

Don't worry. You are not thick at all. I think that my explanation of
the issue was not clear enough.

Here is a quick recap ...

After receiving the TP-Links, I have flashed it with openwrt-ar71xx-
generic-tl-wr703n-v1-SN1_7-squashfs-factory.bin (see
http://villagetelco.org/download/firmware/secn/unstable/tp-703n/SECN-1.1/SECN-Factory-Flash/VERSIONS-TP.txt)

After the flash, the device was running properly and I could ssh to
it. Then, I wanted to make sure that it was running batman but it
wasn't. The closest thing to batman that was running was create-batman-
adv-status-page.sh

So I tried to make it work and I discoved that the batman version on
SECN was different than the one on the default MP01. Regardless of the
version, I simply couldn't find a way to open batman-adv that is on
theTP-Link. I get the following error ...

root@TP-20:/# /etc/init.d/batman-adv start
/etc/rc.common: .: line 6: can't open '/lib/batman-adv/config.sh'

And when I run the following ...

root@TP-20:/# /etc/init.d/run-on-first-boot

.. then the networking fails all at once and I lose access to the TP-
Link. At that point, I have to go through the reset cycle, then telnet
192.168.1.1 and run the "firstboot" command. Then I will start the
whole configuration again.

As for the MP, I had it flash with the Village telco image, but the
plan was to get batman-adv started first on the tp-Link, then flash
the MP with SECN and connecting them.

Let's forget about what I say about batman-d vs batman-adv for the
moment. I need to clear a few things up before.
Re: [vt-dev] Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 tlg 2/4/12 3:01 PM
Hi Abdoulaye

Batman-adv used in SECN firmware is a kernel module rather than a daemon as batmand was in the original Mesh potato firmware.

Batman-adv will be running all the time and if you want to access it for status etc use the batctl command eg "batctl o" will list the mesh neighbours and routing hops.

If you have multiple TP WR703N devices they will mesh automatically, just as flashed. No need to even set individual IPs on them.

If you want to mesh with Mesh Potatoes, they will have to be running SECN firmware, and if you are using SECN-1.0 firmware on them, you will have to update the BSSID to start with 02:...  rather than the original 01:... as the new firmware must use 02:....

Regards
Terry
Re: [vt-dev] Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 elektra 2/4/12 6:19 PM
Hello Abdoulaye -

the external configuration script dependency in OpenWrt came in with the new batman-adv version, introduced 3 months ago. If you install an older version of batman-adv, this script is missing.

You have to create a new directory:

mkdir /lib/batman-adv/

And copy config.sh inside. I have attached "config.sh".

This requirement is necessary to make the new OpenWrt scripts work which initialize batman-adv.

You can also start batman-adv by hand, with batctl. This is the generic way that works in any case and is also useful for debugging purposes.

"batctl if add wlan0"

will start the batman-adv daemon in the kernel and associate the wlan0 interface with it.

Cheers,
Elektra

Siby <as...@mananotel.com> wrote:


--
Viral meme of radical freedom
 
The fact that you talk in your head doesn't mean that you think.
 
The best way to lose control over yourself is trying to control yourself.
 
Most people experience themselves as a voice in their head, telling them
 who they are, what they think and what they have to do.
 
http://en.wikipedia.org/wiki/Meme

Re: How to make batman-d (or equivalent) work on a TP-Link WR703n using SECN firmare 1.7 Abdoulaye Siby 2/11/12 6:54 PM
Hello T. Gillet and Elektra

Sorry for the delay in answering. Since my last message, my days have
been hectic beyond the imaginable.

I would like to thank you for your help. After T. Gillet's
explanation, I have realized that I didn't need to be poking around to
try to "start" batman on the SECN flavor of the firmware. As
explained, it all works right out of the box.

I am about to follow the steps explained by Elektra to create the
missing scripts.

I have to point out though that "batctl o" command throws an error
message on the Mesh Potatoes. It works well on the TP-Link however.

Thanks again.

I will keep you informed about the results.

Cheers

A. $iby

On Feb 4, 9:19 pm, elektra <onelek...@gmx.net> wrote:
> Hello Abdoulaye -
>
> the external configuration script dependency in OpenWrt came in with the new batman-adv version, introduced 3 months ago. If you install an older version of batman-adv, this script is missing.
>
> You have to create a new directory:
>
> mkdir /lib/batman-adv/
>
> And copy config.sh inside. I have attached "config.sh".
>
> This requirement is necessary to make the new OpenWrt scripts work which initialize batman-adv.
>
> You can also start batman-adv by hand, with batctl. This is the generic way that works in any case and is also useful for debugging purposes.
>
> "batctl if add wlan0"
>
> will start the batman-adv daemon in the kernel and associate the wlan0 interface with it.
>
> Cheers,
> Elektra
>
>
>
>
>
>
>
>
>
> Siby <as...@mananotel.com> wrote:
> > Hello Keith,
>
> > Don't worry. You are not thick at all. I think that my explanation of
> > the issue was not clear enough.
>
> > Here is a quick recap ...
>
> > After receiving the TP-Links, I have flashed it with openwrt-ar71xx-
> > generic-tl-wr703n-v1-SN1_7-squashfs-factory.bin (see
> >http://villagetelco.org/download/firmware/secn/unstable/tp-703n/SECN-...)
> > For more options, visit this group athttp://groups.google.com/group/village-telco-dev?hl=en.
>
> --
> Viral meme of radical freedom
>
> The fact that you talk in your head doesn't mean that you think.
>
> The best way to lose control over yourself is trying to control yourself.
>
> Most people experience themselves as a voice in their head, telling them
>  who they are, what they think and what they have to do.
>
> http://en.wikipedia.org/wiki/Meme
>
>  config.sh
> 2KViewDownload