mesh extender firmware

27 views
Skip to first unread message

Paul Gardner-Stephen

unread,
Oct 24, 2014, 1:46:30 AM10/24/14
to serval-proje...@googlegroups.com
Hello,

I think the mesh extender firmware should be working now with the latest commits if you can try it now.

Paul.

Claes Giljegard

unread,
Oct 24, 2014, 4:56:13 PM10/24/14
to serval-proje...@googlegroups.com
Hi,

I did some testing.
When populate-memory-stick is done it leaves the /dos mounted and if i pull the stick there is no NOROOT file.
If i add a sync before each umount it seems to solve the problem.
--
claes@dellUbuntu:~/serval/mesh-extender-builder$ git diff populate-memory-stick
diff --git a/populate-memory-stick b/populate-memory-stick
index f227996..c6f8b62 100755
--- a/populate-memory-stick
+++ b/populate-memory-stick
@@ -37,6 +37,7 @@ fi
 
 echo "Preparing to copy data for /serval partition"
 ( cd staging ; cp -pr . /tmp/mesh-extender-build )
+sync
 umount /tmp/mesh-extender-build
 
 echo "Creating NOROOT file in /dos to secure first boot"
@@ -47,6 +48,7 @@ if [[ "$?" != 0 ]]; then
 fi
 echo "Remove this file to enable SSH login to the mesh extender as root:root." >/tmp/mesh-extender-build/noroot
 echo "This file is recreated on each reboot, so is effective for one boot only." >>/tmp/mesh-extender-build/noroot
+sync
 umount /tmp/mesh-extender-build
 
 echo
claes@dellUbuntu:~/serval/mesh-extender-builder$ 
--

When i get the routers started i see that servald is running.
--
root@Serval-MeshExtender2-0:/serval-var# export SERVALINSTANCE_PATH=/serval-var
root@Serval-MeshExtender2-0:/serval-var# /serval/servald status
instancepath:/serval-var
pidfile:/serval-var/servald.pid
status:running
pid:1336
http_port:4110
root@Serval-MeshExtender2-0:/serval-var#
--
It is nice to see the logfile...
But it is expecting to find a serval.conf in /serval-var
--
WARN: [ 1713] 00:07:00.055 conf.c:66:reload()  config file /serval-var/serval.conf does not exist -- using all defaults
INFO: [ 1713] 00:07:00.059 Local date/time: 1970-01-01 00:07:00 +0000
INFO: [ 1713] 00:07:00.059 Serval DNA version: UNKNOWN-VERSION
INFO: [ 1713] 00:07:00.059 Current configuration:
INFO: [ 1713] 00:07:00.059    (empty)
--
...but it is not there.
Should populate-memory-stich put it there?
I copy the conf from /etc/serval and put it in /serval-var
--
root@Serval-MeshExtender2-0:/serval-var# ls -l
drwx------    2 root     root          4096 Jan  1 00:01 blob
drwx------    2 root     root          4096 Jan  1 00:01 log
drwx------    2 root     root         16384 Oct 24  2014 lost+found
drwx------    2 root     root          4096 Jan  1 00:01 proc
drwx------    2 root     root          4096 Jan  1 00:01 rhizome
-rw-r--r--    1 root     root         14336 Jan  1 00:01 rhizome.db
-rwxr-xr-x    1 root     root           614 Jan  1 00:07 serval.conf
-rw-r--r--    1 root     root          8192 Jan  1 00:01 serval.keyring
lrwxrwxrwx    1 root     root            29 Jan  1 00:07 serval.log -> log/serval-19700101000000.log
-rw-r--r--    1 root     root             5 Jan  1 00:01 servald.pid
drwx------    2 root     root          4096 Jan  1 00:01 sqlite3tmp
root@Serval-MeshExtender2-0:/serval-var#
--
...and reboot
but i still get the same message in log saying it cannot find the conf file.

ping between two routers work but peer count is still 0.

/Claes

Paul Gardner-Stephen

unread,
Oct 25, 2014, 2:02:39 AM10/25/14
to serval-proje...@googlegroups.com
Hello,

Thanks -- I don't have a linux machine, so I have been testing it by running the upgrade process using a serval.up file, rather than the populate script.
I'll modify the populate script to put serval.conf in the /serval-var partition.
Expect commits in a short while.

Paul.

--
You received this message because you are subscribed to the Google Groups "Serval Project Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-dev...@googlegroups.com.
To post to this group, send email to serval-proje...@googlegroups.com.
Visit this group at http://groups.google.com/group/serval-project-developers.
For more options, visit https://groups.google.com/d/optout.

Claes Giljegard

unread,
Oct 25, 2014, 3:37:00 AM10/25/14
to serval-proje...@googlegroups.com
Hi,

I was up early today...

The conf file is in the right place now.
Servald starts but it cannot find servald on the other router.
If i change loglevel from fatal to warn in the conf file and kill servald a new is started an this is in the log:
--
root@Serval-MeshExtender2-0:/serval-var# tail -50 /serval-var/log/serval-19700101000000.log 
INFO: [ 2096] 00:16:40.738    rhizome.rhizome_mdp_block_size=100
WARN: [ 2096] 00:16:40.738 commandline.c:852:app_server_start()  Server already running (pid=2014)
INFO: [ 2098] 00:16:43.793 Local date/time: 1970-01-01 00:16:43 +0000
INFO: [ 2098] 00:16:43.793 Serval DNA version: UNKNOWN-VERSION
INFO: [ 2098] 00:16:43.793 Current configuration:
INFO: [ 2098] 00:16:43.793    interfaces.1.encapsulation=single
INFO: [ 2098] 00:16:43.793    interfaces.1.file=/dev/ttyATH0
INFO: [ 2098] 00:16:43.793    interfaces.1.socket_type=stream
INFO: [ 2098] 00:16:43.793    interfaces.1.type=catear
INFO: [ 2098] 00:16:43.793    interfaces.1.uartbps=115200
INFO: [ 2098] 00:16:43.793    interfaces.2.match=eth0
INFO: [ 2098] 00:16:43.793    interfaces.2.socket_type=dgram
INFO: [ 2098] 00:16:43.793    interfaces.2.type=ethernet
INFO: [ 2098] 00:16:43.793    interfaces.3.match=wlan0
INFO: [ 2098] 00:16:43.793    interfaces.3.socket_type=dgram
INFO: [ 2098] 00:16:43.793    interfaces.4.match=wlan0-1
INFO: [ 2098] 00:16:43.793    interfaces.4.socket_type=dgram
INFO: [ 2098] 00:16:43.793    log.console.level=debug
INFO: [ 2098] 00:16:43.793    log.console.show_time=true
INFO: [ 2098] 00:16:43.793    log.file.directory_path=/serval-var/log
INFO: [ 2098] 00:16:43.793    log.file.level=warn
INFO: [ 2098] 00:16:43.793    mdp.iftype.wifi.packet_interval=1000
INFO: [ 2098] 00:16:43.793    rhizome.datastore_path=/serval-var/rhizome
INFO: [ 2098] 00:16:43.793    rhizome.idle_timeout=30k
INFO: [ 2098] 00:16:43.793    rhizome.rhizome_mdp_block_size=100
WARN: [ 2098] 00:16:43.793 commandline.c:852:app_server_start()  Server already running (pid=2014)
INFO: [ 2100] 00:16:46.854 Local date/time: 1970-01-01 00:16:46 +0000
INFO: [ 2100] 00:16:46.854 Serval DNA version: UNKNOWN-VERSION
INFO: [ 2100] 00:16:46.854 Current configuration:
INFO: [ 2100] 00:16:46.854    interfaces.1.encapsulation=single
INFO: [ 2100] 00:16:46.854    interfaces.1.file=/dev/ttyATH0
INFO: [ 2100] 00:16:46.854    interfaces.1.socket_type=stream
INFO: [ 2100] 00:16:46.854    interfaces.1.type=catear
INFO: [ 2100] 00:16:46.854    interfaces.1.uartbps=115200
INFO: [ 2100] 00:16:46.854    interfaces.2.match=eth0
INFO: [ 2100] 00:16:46.854    interfaces.2.socket_type=dgram
INFO: [ 2100] 00:16:46.854    interfaces.2.type=ethernet
INFO: [ 2100] 00:16:46.854    interfaces.3.match=wlan0
INFO: [ 2100] 00:16:46.854    interfaces.3.socket_type=dgram
INFO: [ 2100] 00:16:46.854    interfaces.4.match=wlan0-1
INFO: [ 2100] 00:16:46.854    interfaces.4.socket_type=dgram
INFO: [ 2100] 00:16:46.854    log.console.level=debug
INFO: [ 2100] 00:16:46.854    log.console.show_time=true
INFO: [ 2100] 00:16:46.854    log.file.directory_path=/serval-var/log
INFO: [ 2100] 00:16:46.854    log.file.level=warn
INFO: [ 2100] 00:16:46.854    mdp.iftype.wifi.packet_interval=1000
INFO: [ 2100] 00:16:46.854    rhizome.datastore_path=/serval-var/rhizome
INFO: [ 2100] 00:16:46.854    rhizome.idle_timeout=30k
INFO: [ 2100] 00:16:46.854    rhizome.rhizome_mdp_block_size=100
WARN: [ 2100] 00:16:46.854 commandline.c:852:app_server_start()  Server already running (pid=2014)
root@Serval-MeshExtender2-0:/serval-var#
--

The webpage on port 4110 shows:
--
Hello, I'm 25F2698EC932A667*

Interfaces;
0: /dev/ttyATH0, TX: 1, RX: 0
1: eth0, TX: 259, RX: 86
2: wlan0, TX: 87, RX: 0
3: wlan0-1, TX: 87, RX: 0
Neighbours;
No peers
Rhizome Status
--

Everything seems to be ok, except the servald's are not talking to eachother... :-)

One more improvement...
Put 
export SERVALINSTANCE_PATH=/serval-var
into /etc/profile
Then we don't need to do that each time we do /serval/servald <command>


/Claes

To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-developers+unsub...@googlegroups.com.

Paul Gardner-Stephen

unread,
Oct 25, 2014, 6:35:19 PM10/25/14
to serval-proje...@googlegroups.com
Hello,



On Sat, Oct 25, 2014 at 6:07 PM, Claes Giljegard <cl...@giljegard.com> wrote:
Hi,


OK, I'll look into this tomorrow with a couple of MEs in the lab.
 
One more improvement...
Put 
export SERVALINSTANCE_PATH=/serval-var
into /etc/profile
Then we don't need to do that each time we do /serval/servald <command>

I have already committed this.

Paul.
 
To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-dev...@googlegroups.com.

Claes Giljegard

unread,
Oct 26, 2014, 5:01:49 PM10/26/14
to serval-proje...@googlegroups.com
Hi,
I missed that you made changes to profile. I only re-populated the usbmem.
Now I have made a complete reinstall and repopulate on both routers.
I can ping and ssh between them but servald will not talk.

I started a second servald on one of the routers:

root@Serval-MeshExtender1-0:/serval-var# cd /serval-var
root@Serval-MeshExtender1-0:/serval-var# mkdir serval2
root@Serval-MeshExtender1-0:/serval-var# cp serval.conf serval2/
root@Serval-MeshExtender1-0:/serval-var/serval2# export SERVALINSTANCE_PATH=/serval-var/serval2
root@Serval-MeshExtender1-0:/serval-var/serval2# /serval/servald start

Then the new servald will show up on both :4110 webpages of the two routers.

How can that be explained?

I got tired of the routers getting new ip on each reboot so i added two lines to S15wireless_setup. I see your comment in that file and for production my mod should probably be removed.
--
root@Serval-MeshExtender1-0:~# cat /etc/rc.d/S15wireless_setup 
#!/bin/sh
[ -e /etc/config/wireless_setup_done ] && return 1
touch /etc/config/wireless_setup_done

sed 's|MACADDRESS_HERE|'`cat /sys/class/ieee80211/phy0/macaddress`'|' < /etc/config/wireless.template > /etc/config/wireless
--

/Claes
Hello,




/Claes

To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-developers+unsubsc...@googlegroups.com.
To post to this group, send email to serval-proje...@googlegroups.com.
Visit this group at http://groups.google.com/group/serval-project-developers.
For more options, visit https://groups.google.com/d/optout.

Paul Gardner-Stephen

unread,
Oct 26, 2014, 7:14:28 PM10/26/14
to serval-proje...@googlegroups.com
Hello,



On Mon, Oct 27, 2014 at 7:31 AM, Claes Giljegard <cl...@giljegard.com> wrote:
Hi,
I missed that you made changes to profile. I only re-populated the usbmem.

no worries ;)
 
Now I have made a complete reinstall and repopulate on both routers.
I can ping and ssh between them but servald will not talk.

Most strange. I intend to try to reproduce this here in the lab today.
 
I started a second servald on one of the routers:
 
root@Serval-MeshExtender1-0:/serval-var# cd /serval-var
root@Serval-MeshExtender1-0:/serval-var# mkdir serval2
root@Serval-MeshExtender1-0:/serval-var# cp serval.conf serval2/
root@Serval-MeshExtender1-0:/serval-var/serval2# export SERVALINSTANCE_PATH=/serval-var/serval2
root@Serval-MeshExtender1-0:/serval-var/serval2# /serval/servald start

Then the new servald will show up on both :4110 webpages of the two routers.

How can that be explained?

So with the 2nd servald all 3 instances see each other, is that right?
 
I got tired of the routers getting new ip on each reboot so i added two lines to S15wireless_setup. I see your comment in that file and for production my mod should probably be removed.
--
root@Serval-MeshExtender1-0:~# cat /etc/rc.d/S15wireless_setup 
#!/bin/sh
[ -e /etc/config/wireless_setup_done ] && return 1
touch /etc/config/wireless_setup_done

sed 's|MACADDRESS_HERE|'`cat /sys/class/ieee80211/phy0/macaddress`'|' < /etc/config/wireless.template > /etc/config/wireless
--

Sounds fine. Or, if you prefer, modify it so that you can put ADHOC.IP and ACCESSP.IP files in /dos with the IP addresses desired for the mesh extender.  That way it is up to the end user how they want IP address configuration to work.

Paul.
 
To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-dev...@googlegroups.com.

Claes Giljegard

unread,
Oct 27, 2014, 1:31:24 PM10/27/14
to serval-proje...@googlegroups.com
Hi,

With a new instance started, according to :4110 webpage on old1 and old2
old1 and old2 can see new
but old1 and old2 cannot see eachother

I could not get a :4110 for new but peer count was 1.

/Claes

Claes Giljegard

unread,
Oct 27, 2014, 5:21:06 PM10/27/14
to serval-proje...@googlegroups.com
One thing that comes to mind is that if i do ifconfig i can see that the packet counters for the wlan0-1 (which is the mesh) is increasing but on the :4110 page it is only the TX counter that is increasing. The RX counter remains at 0.

/Claes

Paul Gardner-Stephen

unread,
Oct 27, 2014, 6:22:58 PM10/27/14
to serval-proje...@googlegroups.com
Hello,

I am pretty sure now that it is /etc/config/firewall that is to blame.  I'm aiming to take a closer look today with a view to opening port 4110 on both TCP and UDP.  Feel free to test from your end also.

Paul.

To unsubscribe from this group and stop receiving emails from it, send an email to serval-project-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages