Hello,
first of all I'd like to say thanks for your fast replies. I'm not very used to using Linux so this is a little tricky to me.
First of all I'm going to show you the way I compiled an image containing batman-adv (that's the way it used to work before) for WRT54GL:
Step1: Check out the backfire repository: "svn co svn://svn.openwrt.org/openwrt/branches/backfire"
Step2: Change to backfire-folder "cd backfire"
Step3: Adding the Batman-Adv module "./scripts/feeds update" "./scripts/feeds install kmod-batman-adv"
Step4: Configure the Image using: "make menuconfig" Here I select "Broadcom BCM947xx/953xx" with 2.6 kernel as Target System and add the batman-package in "Image Configuration -
Kernel Modules -> Network Support"
Step4: Compiling the Image Step5: Transferring the image, changing the password via telnet and the connecting via SSH Step6: Editing the config files using uci: "root@OpenWrt:~# uci delete wireless.radio0.disabled root@OpenWrt:~# uci delete wireless.@wifi-iface[0].network root@OpenWrt:~# uci set wireless. radio0.channel=1 root@OpenWrt:~# uci set wireless.@wifi-iface[0].mode=adhoc root@OpenWrt:~# uci set wireless.@wifi-iface[0].ssid=mesh root@OpenWrt:~# uci set wireless.@wifi-iface[0].bssid=02:12:34:56:78:9A root@OpenWrt:~# uci set network.lan.mtu=1500 root@OpenWrt:~# uci set network.lan.ifname="eth0.0 bat0" root@OpenWrt:~# uci set network.wlan0=interface root@OpenWrt:~# uci set network.wlan0.ifname=wlan0 root@OpenWrt:~# uci set network.wlan0.proto=none root@OpenWrt:~# uci set network.wlan0.mtu=1524 root@OpenWrt:~# uci set network.bat0=interface root@OpenWrt:~# uci set network.bat0.ifname=bat0 root@OpenWrt:~# uci set network.bat0.proto=none root@OpenWrt:~# uci set network.bat0.mtu=1500 root@OpenWrt:~# uci commit root@OpenWrt:~# /etc/init.d/network restart"
After restarting the network the console says: "segmentation fault" and freezes. When doing "reboot" instead the device also freezes and the power-led keeps flashing. I also tried only changing the config in /etc/config/wireless and restarted the device, with the same effect.
In order to make sure the error isn't related to any errors while compiling the image, I compiled an Image without the batman-adv package. After that I was able to configure the router as usual without any freezes.
As I already mentioned I'm not very used to Linux, so I have not yet found a way to connect to the router with serial console without building an JTAG-Cable. Is that right?
Greetings, Tim
Hi,
Step6: Editing the config files using uci: "root@OpenWrt:~# uci delete wireless.radio0.disabled root@OpenWrt:~# uci delete wireless.@wifi-iface[0].network root@OpenWrt:~# uci set wireless. radio0.channel=1 root@OpenWrt:~# uci set wireless.@wifi-iface[0].mode=adhoc root@OpenWrt:~# uci set wireless.@wifi-iface[0].ssid=mesh root@OpenWrt:~# uci set wireless.@wifi-iface[0].bssid=02:12:34:56:78:9A root@OpenWrt:~# uci set network.lan.mtu=1500 root@OpenWrt:~# uci set network.lan.ifname="eth0.0 bat0" root@OpenWrt:~# uci set network.wlan0=interface root@OpenWrt:~# uci set network.wlan0.ifname=wlan0 root@OpenWrt:~# uci set network.wlan0.proto=none root@OpenWrt:~# uci set network.wlan0.mtu=1524
You don't seem to modify the batman-adv settings. Could you post the batman- adv config file, so that we can see whether it fits the rest of your uci configuration ?
root@OpenWrt:~# uci set network.bat0=interface root@OpenWrt:~# uci set network.bat0.ifname=bat0 root@OpenWrt:~# uci set network.bat0.proto=none root@OpenWrt:~# uci set network.bat0.mtu=1500
I'm not sure what this will do. Any reason to set these values ?
root@OpenWrt:~# uci commit root@OpenWrt:~# /etc/init.d/network restart"
After restarting the network the console says: "segmentation fault" and freezes. When doing "reboot" instead the device also freezes and the power-led keeps flashing. I also tried only changing the config in /etc/config/wireless and restarted the device, with the same effect.
With "uci commit" you save these settings permanently which then get loaded at boot time. If these settings crash your device it is save to assume that this happens with each boot attempt. :-)
In order to make sure the error isn't related to any errors while compiling the image, I compiled an Image without the batman-adv package. After that I was able to configure the router as usual without any freezes.
Before you try the next "/etc/init.d/network restart" could you please check whether the batman-adv module is loaded (using 'lsmod') and whether any interfaces are active (using 'batctl if'). The batman-adv version would be also interesting to know (can be found in the system log -> 'logread'). At this point I don't see how a "network restart" is related to batman.
As I already mentioned I'm not very used to Linux, so I have not yet found a way to connect to the router with serial console without building an JTAG-Cable. Is that right?
Yes, you will need a corresponding cable and pins on the board to connect it to. A WRT54GL probably does not have the pins which means you would need to solder it yourself.
Regards, Marek
On Wednesday 11 August 2010 12:47:43 Tim wrote: [...]
After restarting the network the console says: "segmentation fault" and freezes. When doing "reboot" instead the device also freezes and the power-led keeps flashing. I also tried only changing the config in /etc/config/wireless and restarted the device, with the same effect.
In order to make sure the error isn't related to any errors while compiling the image, I compiled an Image without the batman-adv package. After that I was able to configure the router as usual without any freezes.
Thanks for the steps to reproduce. That should help a little bit.
I don't have hardware here at the moment to test it. So cannot tell what the problem may be. Maybe another person has some free time to test it and check for a possible problem (but I don't think that anyone active has a WRT54GL).
what you could try is to setup the stuff by yourself using http://open-mesh.net/wiki/batman-adv-quick-start-guide and test which command may cause the problem (when it is batman-adv related).
As I already mentioned I'm not very used to Linux, so I have not yet found a way to connect to the router with serial console without building an JTAG-Cable. Is that right?
No, JTAG and serial port are completely unrelated: http://nuwiki.openwrt.org/oldwiki/OpenWrtDocs/Hardware/Linksys/WRT54GL#seria...
But yes, you must build something. But it is highly recommended to have some serial console on embedded devices anyway.
Best regards, Sven
On 11.08.2010 13:20, Sven Eckelmann wrote: [...]
what you could try is to setup the stuff by yourself using http://open-mesh.net/wiki/batman-adv-quick-start-guide and test which command may cause the problem (when it is batman-adv related).
I tried to configure it as described in the guide and I think I some kind of found the problem:
Before being able to add wlan0 to the batman interfaces, I need to create the interface wlan0 and to remove "option disabled 1" from /etc/config/wireless, because otherwise wlan will be disabled by default.
Way1: When removing "option disabled 1" first and then doing "/etc/init.d/network restart" I get the following message: "root@OpenWrt:/# /etc/init.d/network restart udhcpc (v1.15.3) started Sending discover... Configuration file: /var/run/hostapd-phy0.conf Segmentation fault Failed to start hostapd for phy0 root@OpenWrt:/# Sending discover... Sending discover..."
When rebooting the whole device it freezes as already described.
Way 2: When adding the interface wlan0 before enableing radio0 and then doing "/etc/init.d/network restart" the following output appears: "config interface wlan0 option type interface option ifname "wlan0" option proto none
root@OpenWrt:/# /etc/init.d/network restart udhcpc (v1.15.3) started 'radio0' is disabled 'radio0' is disabled root@OpenWrt:/# Sending discover... Sending discover... Sending discover..."
That's clear, enabeling the interface without radio0 running is impossible. After that the devices reboots as it should. Enableing radio0 after that and then doing "etc/init.d/network restart" the output changes a little bit:
"root@OpenWrt:~# /etc/init.d/network restart Received SIGTERM Entering released state udhcpc (v1.15.3) started Sending discover... Configuration file: /var/run/hostapd-phy0.conf Segmentation fault Failed to start hostapd for phy0 root@OpenWrt:~# Sending discover... Sending discover..."
So for me the problem seems to be related to radio0. Trying that with the image I compiled without adding batman-adv, enabeling radio0 is working fine.
With best regards, Tim
On Wednesday 11 August 2010 16:23:22 Tim wrote:
On 11.08.2010 13:20, Sven Eckelmann wrote: [...]
what you could try is to setup the stuff by yourself using
http://open-mesh.net/wiki/batman-adv-quick-start-guide and test which command
may cause the problem (when it is batman-adv related).
I tried to configure it as described in the guide and I think I some kind of found the problem:
Before being able to add wlan0 to the batman interfaces, I need to create the interface wlan0 and to remove "option disabled 1" from /etc/config/wireless, because otherwise wlan will be disabled by default.
Way1: When removing "option disabled 1" first and then doing "/etc/init.d/network restart" I get the following message: "root@OpenWrt:/# /etc/init.d/network restart udhcpc (v1.15.3) started Sending discover... Configuration file: /var/run/hostapd-phy0.conf Segmentation fault Failed to start hostapd for phy0 root@OpenWrt:/# Sending discover... Sending discover..."
So you mean that the device has radio0 and wlan0, but not bat0 configured? And still it crashes? Is batman-adv loaded or unloaded completely in that situation (check `lsmod` output)?
It is not clear to me how batman-adv is involved when it is not loaded. But it is somewhat active when it is only loaded, but bat0 is not configured... because it has netdev notification enabled - which means that it gets informed about added and removed (and some other things) devices. It is maybe related to that.
If it is loaded, but doesn't get configured when it crashes then please onload batman-adv using `rmmod batman-adv` and try to restart the network (without the batman-adv stuff loaded or configured).
By the way, you seem to have shell access after that segfault. Could you please post the `dmesg` output after that segfault - thanks.
And please don't forget to write the complete version number of batman-adv which you are using (I can guess it using the backfire branch, but it is safer to get that information from you).
Best regards, Sven
b.a.t.m.a.n@lists.open-mesh.org