1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"http://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Lets make a wireless community network in Oslo!
</title>
11 <link>http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</guid>
13 <pubDate>Wed,
13 Nov
2013 21:
00:
00 +
0100</pubDate>
14 <description><p
>Today NUUG and Hackeriet announced
15 <a href=
"http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml
">our
16 plans to join forces and create a wireless community network in
17 Oslo
</a
>. The workshop to help people get started will take place
18 Thursday
2013-
11-
28, but we already are collecting the geolocation of
19 people joining forces to make this happen. We have
20 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson
">9
21 locations plotted on the map
</a
>, but we will need more before we have
22 a connected mesh spread across Oslo. If this sound interesting to
23 you, please join us at the workshop. If you are too impatient to wait
24 15 days, please join us on the IRC channel
25 <a href=
"irc://irc.freenode.net/%
23nuug
">#nuug on irc.freenode.net
</a
>
26 right away. :)
</p
>
31 <title>Running TP-Link MR3040 as a batman-adv mesh node using openwrt
</title>
32 <link>http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</link>
33 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</guid>
34 <pubDate>Sun,
10 Nov
2013 23:
00:
00 +
0100</pubDate>
35 <description><p
>Continuing my research into mesh networking, I was recommended to
36 use TP-Link
3040 and
3600 access points as mesh nodes, and the pair I
37 bought arrived on Friday. Here are my notes on how to set up the
38 MR3040 as a mesh node using
39 <a href=
"http://www.openwrt.org/
">OpenWrt
</a
>.
</p
>
41 <p
>I started by following the instructions on the OpenWRT wiki for
42 <a href=
"http://wiki.openwrt.org/toh/tp-link/tl-mr3040
">TL-MR3040
</a
>,
44 <a href=
"http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin
">the
45 recommended firmware image
</a
>
46 (openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
47 uploaded it into the original web interface. The flashing went fine,
48 and the machine was available via telnet on the ethernet port. After
49 logging in and setting the root password, ssh was available and I
50 could start to set it up as a batman-adv mesh node.
</p
>
52 <p
>I started off by reading the instructions from
53 <a href=
"http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine
's_Research
">Wireless
54 Africa
</a
>, which had quite a lot of useful information, but
55 eventually I followed the recipe from the Open Mesh wiki for
56 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config
">using
57 batman-adv on OpenWrt
</a
>. A small snag was the fact that the
58 <tt
>opkg install kmod-batman-adv
</tt
> command did not work as it
59 should. The batman-adv kernel module would fail to load because its
60 dependency crc16 was not already loaded. I
61 <a href=
"https://dev.openwrt.org/ticket/
14452">reported the bug
</a
> to
62 the openwrt project and hope it will be fixed soon. But the problem
63 only seem to affect initial testing of batman-adv, as configuration
64 seem to work when booting from scratch.
</p
>
66 <p
>The setup is done using files in /etc/config/. I did not bridge
67 the Ethernet and mesh interfaces this time, to be able to hook up the
68 box on my local network and log into it for configuration updates.
69 The following files were changed and look like this after modifying
72 <p
><tt
>/etc/config/network
</tt
></p
>
76 config interface
'loopback
'
77 option ifname
'lo
'
78 option proto
'static
'
79 option ipaddr
'127.0.0.1'
80 option netmask
'255.0.0.0'
82 config globals
'globals
'
83 option ula_prefix
'fdbf:
4c12:
3fed::/
48'
85 config interface
'lan
'
86 option ifname
'eth0
'
87 option type
'bridge
'
88 option proto
'dhcp
'
89 option ipaddr
'192.168.1.1'
90 option netmask
'255.255.255.0'
91 option hostname
'tl-mr3040
'
92 option ip6assign
'60'
94 config interface
'mesh
'
95 option ifname
'adhoc0
'
96 option mtu
'1528'
97 option proto
'batadv
'
98 option mesh
'bat0
'
101 <p
><tt
>/etc/config/wireless
</tt
></p
>
104 config wifi-device
'radio0
'
105 option type
'mac80211
'
106 option channel
'11'
107 option hwmode
'11ng
'
108 option path
'platform/ar933x_wmac
'
109 option htmode
'HT20
'
110 list ht_capab
'SHORT-GI-
20'
111 list ht_capab
'SHORT-GI-
40'
112 list ht_capab
'RX-STBC1
'
113 list ht_capab
'DSSS_CCK-
40'
114 option disabled
'0'
116 config wifi-iface
'wmesh
'
117 option device
'radio0
'
118 option ifname
'adhoc0
'
119 option network
'mesh
'
120 option encryption
'none
'
121 option mode
'adhoc
'
122 option bssid
'02:BA:
00:
00:
00:
01'
123 option ssid
'meshfx@hackeriet
'
125 <p
><tt
>/etc/config/batman-adv
</tt
></p
>
128 config
'mesh
' 'bat0
'
129 option interfaces
'adhoc0
'
130 option
'aggregated_ogms
'
131 option
'ap_isolation
'
132 option
'bonding
'
133 option
'fragmentation
'
134 option
'gw_bandwidth
'
135 option
'gw_mode
'
136 option
'gw_sel_class
'
137 option
'log_level
'
138 option
'orig_interval
'
139 option
'vis_mode
'
140 option
'bridge_loop_avoidance
'
141 option
'distributed_arp_table
'
142 option
'network_coding
'
143 option
'hop_penalty
'
145 # yet another batX instance
146 # config
'mesh
' 'bat5
'
147 # option
'interfaces
' 'second_mesh
'
150 <p
>The mesh node is now operational. I have yet to test its range,
151 but I hope it is good. I have not yet tested the TP-Link
3600 box
152 still wrapped up in plastic.
</p
>
157 <title>Debian init.d boot script example for rsyslog
</title>
158 <link>http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</link>
159 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</guid>
160 <pubDate>Sat,
2 Nov
2013 22:
40:
00 +
0100</pubDate>
161 <description><p
>If one of the points of switching to a new init system in Debian is
162 <a href=
"http://thomas.goirand.fr/blog/?p=
147">to get rid of huge
163 init.d scripts
</a
>, I doubt we need to switch away from sysvinit and
164 init.d scripts at all. Here is an example init.d script, ie a rewrite
165 of /etc/init.d/rsyslog:
</p
>
168 #!/lib/init/init-d-script
171 # Required-Start: $remote_fs $time
172 # Required-Stop: umountnfs $time
173 # X-Stop-After: sendsigs
174 # Default-Start:
2 3 4 5
175 # Default-Stop:
0 1 6
176 # Short-Description: enhanced syslogd
177 # Description: Rsyslog is an enhanced multi-threaded syslogd.
178 # It is quite compatible to stock sysklogd and can be
179 # used as a drop-in replacement.
181 DESC=
"enhanced syslogd
"
182 DAEMON=/usr/sbin/rsyslogd
183 </pre
></p
>
185 <p
>Pretty minimalistic to me... For the record, the original sysv-rc
186 script was
137 lines, and the above is just
15 lines, most of it meta
187 info/comments.
</p
>
189 <p
>How to do this, you ask? Well, one create a new script
190 /lib/init/init-d-script looking something like this:
195 # Define LSB log_* functions.
196 # Depend on lsb-base (
>=
3.2-
14) to ensure that this file is present
197 # and status_of_proc is working.
198 . /lib/lsb/init-functions
201 # Function that starts the daemon/service
207 #
0 if daemon has been started
208 #
1 if daemon was already running
209 #
2 if daemon could not be started
210 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test
> /dev/null \
212 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
215 # Add code here, if necessary, that waits for the process to be ready
216 # to handle requests from services started subsequently which depend
217 # on this one. As a last resort, sleep for some time.
221 # Function that stops the daemon/service
226 #
0 if daemon has been stopped
227 #
1 if daemon was already stopped
228 #
2 if daemon could not be stopped
229 # other if a failure occurred
230 start-stop-daemon --stop --quiet --retry=TERM/
30/KILL/
5 --pidfile $PIDFILE --name $NAME
231 RETVAL=
"$?
"
232 [
"$RETVAL
" =
2 ]
&& return
2
233 # Wait for children to finish too if this is a daemon that forks
234 # and if the daemon is only ever run from this initscript.
235 # If the above conditions are not satisfied then add some other code
236 # that waits for the process to drop all resources that could be
237 # needed by services started subsequently. A last resort is to
238 # sleep for some time.
239 start-stop-daemon --stop --quiet --oknodo --retry=
0/
30/KILL/
5 --exec $DAEMON
240 [
"$?
" =
2 ]
&& return
2
241 # Many daemons don
't delete their pidfiles when they exit.
243 return
"$RETVAL
"
247 # Function that sends a SIGHUP to the daemon/service
251 # If the daemon can reload its configuration without
252 # restarting (for example, when it is sent a SIGHUP),
253 # then implement that here.
255 start-stop-daemon --stop --signal
1 --quiet --pidfile $PIDFILE --name $NAME
260 scriptbasename=
"$(basename $
1)
"
261 echo
"SN: $scriptbasename
"
262 if [
"$scriptbasename
" !=
"init-d-library
" ] ; then
263 script=
"$
1"
270 NAME=$(basename $DAEMON)
271 PIDFILE=/var/run/$NAME.pid
273 # Exit if the package is not installed
274 #[ -x
"$DAEMON
" ] || exit
0
276 # Read configuration variable file if it is present
277 [ -r /etc/default/$NAME ]
&& . /etc/default/$NAME
279 # Load the VERBOSE setting and other rcS variables
282 case
"$
1" in
284 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Starting $DESC
" "$NAME
"
286 case
"$?
" in
287 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
288 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
292 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Stopping $DESC
" "$NAME
"
294 case
"$?
" in
295 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
296 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
300 status_of_proc
"$DAEMON
" "$NAME
" && exit
0 || exit $?
302 #reload|force-reload)
304 # If do_reload() is not implemented then leave this commented out
305 # and leave
'force-reload
' as an alias for
'restart
'.
307 #log_daemon_msg
"Reloading $DESC
" "$NAME
"
311 restart|force-reload)
313 # If the
"reload
" option is implemented then remove the
314 #
'force-reload
' alias
316 log_daemon_msg
"Restarting $DESC
" "$NAME
"
318 case
"$?
" in
321 case
"$?
" in
323 1) log_end_msg
1 ;; # Old process is still running
324 *) log_end_msg
1 ;; # Failed to start
334 echo
"Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}
" >&2
340 </pre
></p
>
342 <p
>It is based on /etc/init.d/skeleton, and could be improved quite a
343 lot. I did not really polish the approach, so it might not always
344 work out of the box, but you get the idea. I did not try very hard to
345 optimize it nor make it more robust either.
</p
>
347 <p
>A better argument for switching init system in Debian than reducing
348 the size of init scripts (which is a good thing to do anyway), is to
349 get boot system that is able to handle the kernel events sensibly and
350 robustly, and do not depend on the boot to run sequentially. The boot
351 and the kernel have not behaved sequentially in years.
</p
>
356 <title>Browser plugin for SPICE (spice-xpi) uploaded to Debian
</title>
357 <link>http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</link>
358 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</guid>
359 <pubDate>Fri,
1 Nov
2013 11:
00:
00 +
0100</pubDate>
360 <description><p
><a href=
"http://www.spice-space.org/
">The SPICE protocol
</a
> for
361 remote display access is the preferred solution with oVirt and RedHat
362 Enterprise Virtualization, and I was sad to discover the other day
363 that the browser plugin needed to use these systems seamlessly was
364 missing in Debian. The
<a href=
"http://bugs.debian.org/
668284">request
365 for a package
</a
> was from
2012-
04-
10 with no progress since
366 2013-
04-
01, so I decided to wrap up a package based on the great work
367 from Cajus Pollmeier and put it in a collab-maint maintained git
368 repository to get a package I could use. I would very much like
369 others to help me maintain the package (or just take over, I do not
370 mind), but as no-one had volunteered so far, I just uploaded it to
371 NEW. I hope it will be available in Debian in a few days.
</p
>
373 <p
>The source is now available from
374 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary
">http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary
</a
>.
</p
>
379 <title>Teaching vmdebootstrap to create Raspberry Pi SD card images
</title>
380 <link>http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html
</link>
381 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html
</guid>
382 <pubDate>Sun,
27 Oct
2013 17:
00:
00 +
0100</pubDate>
383 <description><p
>The
384 <a href=
"http://packages.qa.debian.org/v/vmdebootstrap.html
">vmdebootstrap
</a
>
385 program is a a very nice system to create virtual machine images. It
386 create a image file, add a partition table, mount it and run
387 debootstrap in the mounted directory to create a Debian system on a
388 stick. Yesterday, I decided to try to teach it how to make images for
389 <a href=
"https://wiki.debian.org/RaspberryPi
">Raspberry Pi
</a
>, as part
390 of a plan to simplify the build system for
391 <a href=
"https://wiki.debian.org/FreedomBox
">the FreedomBox
392 project
</a
>. The FreedomBox project already uses vmdebootstrap for
393 the virtualbox images, but its current build system made multistrap
394 based system for Dreamplug images, and it is lacking support for
395 Raspberry Pi.
</p
>
397 <p
>Armed with the knowledge on how to build
"foreign
" (aka non-native
398 architecture) chroots for Raspberry Pi, I dived into the vmdebootstrap
399 code and adjusted it to be able to build armel images on my amd64
400 Debian laptop. I ended up giving vmdebootstrap five new options,
401 allowing me to replicate the image creation process I use to make
402 <a href=
"http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
">Debian
403 Jessie based mesh node images for the Raspberry Pi
</a
>. First, the
404 <tt
>--foreign /path/to/binfm_handler
</tt
> option tell vmdebootstrap to
405 call debootstrap with --foreign and to copy the handler into the
406 generated chroot before running the second stage. This allow
407 vmdebootstrap to create armel images on an amd64 host. Next I added
408 two new options
<tt
>--bootsize size
</tt
> and
<tt
>--boottype
409 fstype
</tt
> to teach it to create a separate /boot/ partition with the
410 given file system type, allowing me to create an image with a vfat
411 partition for the /boot/ stuff. I also added a
<tt
>--variant
412 variant
</tt
> option to allow me to create smaller images without the
413 Debian base system packages installed. Finally, I added an option
414 <tt
>--no-extlinux
</tt
> to tell vmdebootstrap to not install extlinux
415 as a boot loader. It is not needed on the Raspberry Pi and probably
416 most other non-x86 architectures. The changes were accepted by the
417 upstream author of vmdebootstrap yesterday and today, and is now
419 <a href=
"http://git.liw.fi/cgi-bin/cgit/cgit.cgi/vmdebootstrap/
">the
420 upstream project page
</a
>.
</p
>
422 <p
>To use it to build a Raspberry Pi image using Debian Jessie, first
423 create a small script (the customize script) to add the non-free
424 binary blob needed to boot the Raspberry Pi and the APT source
429 set -e # Exit on first error
430 rootdir=
"$
1"
431 cd
"$rootdir
"
432 cat
&lt;
&lt;EOF
> etc/apt/sources.list
433 deb http://http.debian.net/debian/ jessie main contrib non-free
435 # Install non-free binary blob needed to boot Raspberry Pi. This
436 # install a kernel somewhere too.
437 wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update \
438 -O $rootdir/usr/bin/rpi-update
439 chmod a+x $rootdir/usr/bin/rpi-update
440 mkdir -p $rootdir/lib/modules
441 touch $rootdir/boot/start.elf
442 chroot $rootdir rpi-update
443 </pre
></p
>
445 <p
>Next, fetch the latest vmdebootstrap script and call it like this
446 to build the image:
</p
>
449 sudo ./vmdebootstrap \
452 --distribution jessie \
453 --mirror http://http.debian.net/debian \
462 --root-password raspberry \
463 --hostname raspberrypi \
464 --foreign /usr/bin/qemu-arm-static \
465 --customize `pwd`/customize \
469 --package ca-certificates \
472 </pre
></p
>
474 <p
>The list of packages being installed are the ones needed by
475 rpi-update to make the image bootable on the Raspberry Pi, with the
476 exception of netbase, which is needed by debootstrap to find
477 /etc/hosts with the minbase variant. I really wish there was a way to
478 set up an Raspberry Pi using only packages in the Debian archive, but
479 that is not possible as far as I know, because it boots from the GPU
480 using a non-free binary blob.
</p
>
482 <p
>The build host need debootstrap, kpartx and qemu-user-static and
483 probably a few others installed. I have not checked the complete
484 build dependency list.
</p
>
486 <p
>The resulting image will not use the hardware floating point unit
487 on the Raspberry PI, because the armel architecture in Debian is not
488 optimized for that use. So the images created will be a bit slower
489 than
<a href=
"http://www.raspbian.org/
">Raspbian
</a
> based images.
</p
>
494 <title>Det er jo makta som er mest sårbar ved massiv overvåkning av Internett
</title>
495 <link>http://people.skolelinux.org/pere/blog/Det_er_jo_makta_som_er_mest_s_rbar_ved_massiv_overv_kning_av_Internett.html
</link>
496 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Det_er_jo_makta_som_er_mest_s_rbar_ved_massiv_overv_kning_av_Internett.html
</guid>
497 <pubDate>Sat,
26 Oct
2013 20:
30:
00 +
0200</pubDate>
498 <description><p
>De siste måneders eksponering av
499 <a href=
"http://www.aftenposten.no/nyheter/uriks/Her-er-Edvard-Snowdens-mest-omtalte-avsloringer-
7351734.html
">den
500 totale overvåkningen som foregår i den vestlige verden dokumenterer
501 hvor sårbare vi er
</a
>. Men det slår meg at de som er mest sårbare
502 for dette, myndighetspersoner på alle nivåer, neppe har innsett at de
503 selv er de mest interessante personene å lage profiler på, for å kunne
504 påvirke dem.
</p
>
506 <p
>For å ta et lite eksempel: Stortingets nettsted,
507 <a href=
"http://www.stortinget.no/
">www.stortinget.no
</a
> (og
509 <a href=
"http://data.stortinget.no/
">data.stortinget.no
</a
>),
510 inneholder informasjon om det som foregår på Stortinget, og jeg antar
511 de største brukerne av informasjonen der er representanter og
512 rådgivere på Stortinget. Intet overraskende med det. Det som derimot
513 er mer skjult er at Stortingets nettsted bruker
514 <a href=
"http://en.wikipedia.org/wiki/Google_Analytics
">Google
515 Analytics
</a
>, hvilket gjør at enhver som besøker nettsidene der også
516 rapporterer om besøket via Internett-linjer som passerer Sverige,
517 England og videre til USA. Det betyr at informasjon om ethvert besøk
518 på stortingets nettsider kan snappes opp av svensk, britisk og USAs
519 etterretningsvesen. De kan dermed holde et øye med hvilke
520 Stortingssaker stortingsrepresentantene synes er interessante å sjekke
521 ut, og hvilke sider rådgivere og andre på stortinget synes er
522 interessant å besøke, når de gjør det og hvilke andre representanter
523 som sjekker de samme sidene omtrent samtidig. Stortingets bruk av
524 Google Analytics gjør det dermed enkelt for utenlands etteretning å
525 spore representantenes aktivitet og interesse. Hvis noen av
526 representantene bruker Google Mail eller noen andre tjenestene som
527 krever innlogging, så vil det være enda enklere å finne ut nøyaktig
528 hvilke personer som bruker hvilke nettlesere og dermed knytte
529 informasjonen opp til enkeltpersoner på Stortinget.
</p
>
531 <p
>Og jo flere nettsteder som bruker Google Analytics, jo bedre
532 oversikt over stortingsrepresentantenes lesevaner og interesse blir
533 tilgjengelig for svensk, britisk og USAs etterretning. Hva de kan
534 bruke den informasjonen til overlater jeg til leseren å undres
540 <title>A Raspberry Pi based batman-adv Mesh network node
</title>
541 <link>http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</link>
542 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</guid>
543 <pubDate>Mon,
21 Oct
2013 11:
40:
00 +
0200</pubDate>
544 <description><p
>The last few days I have been experimenting with
545 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki
">the
546 batman-adv mesh technology
</a
>. I want to gain some experience to see
547 if it will fit
<a href=
"https://wiki.debian.org/FreedomBox
">the
548 Freedombox project
</a
>, and together with my neighbors try to build a
549 mesh network around the park where I live. Batman-adv is a layer
2
550 mesh system (
"ethernet
" in other words), where the mesh network appear
551 as if all the mesh clients are connected to the same switch.
</p
>
553 <p
>My hardware of choice was the Linksys WRT54GL routers I had lying
554 around, but I
've been unable to get them working with batman-adv. So
555 instead, I started playing with a
556 <a href=
"http://www.raspberrypi.org/
">Raspberry Pi
</a
>, and tried to
557 get it working as a mesh node. My idea is to use it to create a mesh
558 node which function as a switch port, where everything connected to
559 the Raspberry Pi ethernet plug is connected (bridged) to the mesh
560 network. This allow me to hook a wifi base station like the Linksys
561 WRT54GL to the mesh by plugging it into a Raspberry Pi, and allow
562 non-mesh clients to hook up to the mesh. This in turn is useful for
563 Android phones using
<a href=
"http://servalproject.org/
">the Serval
564 Project
</a
> voip client, allowing every one around the playground to
565 phone and message each other for free. The reason is that Android
566 phones do not see ad-hoc wifi networks (they are filtered away from
567 the GUI view), and can not join the mesh without being rooted. But if
568 they are connected using a normal wifi base station, they can talk to
569 every client on the local network.
</p
>
571 <p
>To get this working, I
've created a debian package
572 <a href=
"https://github.com/petterreinholdtsen/meshfx-node
">meshfx-node
</a
>
574 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/build-rpi-mesh-node
">build-rpi-mesh-node
</a
>
575 to create the Raspberry Pi boot image. I
'm using Debian Jessie (and
576 not Raspbian), to get more control over the packages available.
577 Unfortunately a huge binary blob need to be inserted into the boot
578 image to get it booting, but I
'll ignore that for now. Also, as
579 Debian lack support for the CPU features available in the Raspberry
580 Pi, the system do not use the hardware floating point unit. I hope
581 the routing performance isn
't affected by the lack of hardware FPU
584 <p
>To create an image, run the following with a sudo enabled user
585 after inserting the target SD card into the build machine:
</p
>
588 % wget -O build-rpi-mesh-node \
589 https://raw.github.com/petterreinholdtsen/meshfx-node/master/build-rpi-mesh-node
590 % sudo bash -x ./build-rpi-mesh-node
> build.log
2>&1
591 % dd if=/root/rpi/rpi_basic_jessie_$(date +%Y%m%d).img of=/dev/mmcblk0 bs=
1M
593 </pre
></p
>
595 <p
>Booting with the resulting SD card on a Raspberry PI with a USB
596 wifi card inserted should give you a mesh node. At least it does for
597 me with a the wifi card I am using. The default mesh settings are the
598 ones used by the Oslo mesh project at Hackeriet, as I mentioned in
599 <a href=
"http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
">an
600 earlier blog post about this mesh testing
</a
>.
</p
>
602 <p
>The mesh node was not horribly expensive either. I bought
603 everything over the counter in shops nearby. If I had ordered online
604 from the lowest bidder, the price should be significantly lower:
</p
>
606 <p
><table
>
608 <tr
><th
>Supplier
</th
><th
>Model
</th
><th
>NOK
</th
></tr
>
609 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi model B
</td
><td
>349.90</td
></tr
>
610 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi type B case
</td
><td
>99.90</td
></tr
>
611 <tr
><td
>Lefdal
</td
><td
>Jensen Air:Link
25150</td
><td
>295.-
</td
></tr
>
612 <tr
><td
>Clas Ohlson
</td
><td
>Kingston
16 GB SD card
</td
><td
>199.-
</td
></tr
>
613 <tr
><td
>Total cost
</td
><td
></td
><td
>943.80</td
></tr
>
615 </table
></p
>
617 <p
>Now my mesh network at home consist of one laptop in the basement
618 connected to my production network, one Raspberry Pi node on the
1th
619 floor that can be seen by my neighbor across the park, and one
620 play-node I use to develop the image building script. And some times
621 I hook up my work horse laptop to the mesh to test it. I look forward
622 to figuring out what kind of latency the batman-adv setup will give,
623 and how much packet loss we will experience around the park. :)
</p
>
628 <title>Perl library to control the Spykee robot moved to github
</title>
629 <link>http://people.skolelinux.org/pere/blog/Perl_library_to_control_the_Spykee_robot_moved_to_github.html
</link>
630 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Perl_library_to_control_the_Spykee_robot_moved_to_github.html
</guid>
631 <pubDate>Sat,
19 Oct
2013 10:
20:
00 +
0200</pubDate>
632 <description><p
>Back in
2010, I created a Perl library to talk to
633 <a href=
"http://en.wikipedia.org/wiki/Spykee
">the Spykee robot
</a
>
634 (with two belts, wifi, USB and Linux) and made it available from my
635 web page. Today I concluded that it should move to a site that is
636 easier to use to cooperate with others, and moved it to github. If
637 you got a Spykee robot, you might want to check out
638 <a href=
"https://github.com/petterreinholdtsen/libspykee-perl
">the
639 libspykee-perl github repository
</a
>.
</p
>
644 <title>Good causes: Debian Outreach Program for Women, EFF documenting the spying and Open access in Norway
</title>
645 <link>http://people.skolelinux.org/pere/blog/Good_causes__Debian_Outreach_Program_for_Women__EFF_documenting_the_spying_and_Open_access_in_Norway.html
</link>
646 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Good_causes__Debian_Outreach_Program_for_Women__EFF_documenting_the_spying_and_Open_access_in_Norway.html
</guid>
647 <pubDate>Tue,
15 Oct
2013 21:
30:
00 +
0200</pubDate>
648 <description><p
>The last few days I came across a few good causes that should get
649 wider attention. I recommend signing and donating to each one of
652 <p
>Via
<a href=
"http://www.debian.org/News/weekly/
2013/
18/
">Debian
653 Project News for
2013-
10-
14</a
> I came across the Outreach Program for
654 Women program which is a Google Summer of Code like initiative to get
655 more women involved in free software. One debian sponsor has offered
656 to match
<a href=
"http://debian.ch/opw2013
">any donation done to Debian
657 earmarked
</a
> for this initiative. I donated a few minutes ago, and
658 hope you will to. :)
</p
>
660 <p
>And the Electronic Frontier Foundation just announced plans to
661 create
<a href=
"https://supporters.eff.org/donate/nsa-videos
">video
662 documentaries about the excessive spying
</a
> on every Internet user that
663 take place these days, and their need to fund the work. I
've already
664 donated. Are you next?
</p
>
666 <p
>For my Norwegian audience, the organisation Studentenes og
667 Akademikernes Internasjonale Hjelpefond is collecting signatures for a
668 statement under the heading
669 <a href=
"http://saih.no/Bloggers_United/
">Bloggers United for Open
670 Access
</a
> for those of us asking for more focus on open access in the
671 Norwegian government. So far
499 signatures. I hope you will sign it
677 <title>Oslo community mesh network - with NUUG and Hackeriet at Hausmania
</title>
678 <link>http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
</link>
679 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
</guid>
680 <pubDate>Fri,
11 Oct
2013 14:
10:
00 +
0200</pubDate>
681 <description><p
>Wireless mesh networks are self organising and self healing
682 networks that can be used to connect computers across small and large
683 areas, depending on the radio technology used. Normal wifi equipment
684 can be used to create home made radio networks, and there are several
685 successful examples like
686 <a href=
"http://www.freifunk.net/
">Freifunk
</a
> and
687 <a href=
"http://www.awmn.net/
">Athens Wireless Metropolitan Network
</a
>
689 <a href=
"http://en.wikipedia.org/wiki/List_of_wireless_community_networks_by_region#Greece
">wikipedia
690 for a large list
</a
>) around the globe. To give you an idea how it
691 work, check out the nice overview of the Kiel Freifunk community which
692 can be seen from their
693 <a href=
"http://freifunk.in-kiel.de/ffmap/nodes.html
">dynamically
694 updated node graph and map
</a
>, where one can see how the mesh nodes
695 automatically handle routing and recover from nodes disappearing.
696 There is also a small community mesh network group in Oslo, Norway,
697 and that is the main topic of this blog post.
</p
>
699 <p
>I
've wanted to check out mesh networks for a while now, and hoped
700 to do it as part of my involvement with the
<a
701 href=
"http://www.nuug.no/
">NUUG member organisation
</a
> community, and
702 my recent involvement in
703 <a href=
"https://wiki.debian.org/FreedomBox
">the Freedombox project
</a
>
704 finally lead me to give mesh networks some priority, as I suspect a
705 Freedombox should use mesh networks to connect neighbours and family
706 when possible, given that most communication between people are
707 between those nearby (as shown for example by research on Facebook
708 communication patterns). It also allow people to communicate without
709 any central hub to tap into for those that want to listen in on the
710 private communication of citizens, which have become more and more
711 important over the years.
</p
>
713 <p
>So far I have only been able to find one group of people in Oslo
714 working on community mesh networks, over at the hack space
715 <a href=
"http://hackeriet.no/
">Hackeriet
</a
> at Husmania. They seem to
716 have started with some Freifunk based effort using OLSR, called
717 <a href=
"http://oslo.freifunk.net/index.php?title=Main_Page
">the Oslo
718 Freifunk project
</a
>, but that effort is now dead and the people
719 behind it have moved on to a batman-adv based system called
720 <a href=
"http://meshfx.org/trac
">meshfx
</a
>. Unfortunately the wiki
721 site for the Oslo Freifunk project is no longer possible to update to
722 reflect this fact, so the old project page can
't be updated to point to
723 the new project. A while back, the people at Hackeriet invited people
724 from the Freifunk community to Oslo to talk about mesh networks. I
725 came across this video where Hans Jørgen Lysglimt interview the
726 speakers about this talk (from
727 <a href=
"https://www.youtube.com/watch?v=N2Kd7CLkhSY
">youtube
</a
>):
</p
>
729 <p
><iframe width=
"420" height=
"315" src=
"https://www.youtube.com/embed/N2Kd7CLkhSY
" frameborder=
"0" allowfullscreen
></iframe
></p
>
731 <p
>I mentioned OLSR and batman-adv, which are mesh routing protocols.
732 There are heaps of different protocols, and I am still struggling to
733 figure out which one would be
"best
" for some definitions of best, but
734 given that the community mesh group in Oslo is so small, I believe it
735 is best to hook up with the existing one instead of trying to create a
736 completely different setup, and thus I have decided to focus on
737 batman-adv for now. It sure help me to know that the very cool
738 <a href=
"http://www.servalproject.org/
">Serval project in Australia
</a
>
739 is using batman-adv as their meshing technology when it create a self
740 organizing and self healing telephony system for disaster areas and
741 less industrialized communities. Check out this cool video presenting
743 <a href=
"https://www.youtube.com/watch?v=
30qNfzJCQOA
">youtube
</a
>):
</p
>
745 <p
><iframe width=
"560" height=
"315" src=
"https://www.youtube.com/embed/
30qNfzJCQOA
" frameborder=
"0" allowfullscreen
></iframe
></p
>
747 <p
>According to the wikipedia page on
748 <a href=
"http://en.wikipedia.org/wiki/Wireless_mesh_network
">Wireless
749 mesh network
</a
> there are around
70 competing schemes for routing
750 packets across mesh networks, and OLSR, B.A.T.M.A.N. and
751 B.A.T.M.A.N. advanced are protocols used by several free software
752 based community mesh networks.
</p
>
754 <p
>The batman-adv protocol is a bit special, as it provide layer
2
755 (as in ethernet ) routing, allowing ipv4 and ipv6 to work on the same
756 network. One way to think about it is that it provide a mesh based
757 vlan you can bridge to or handle like any other vlan connected to your
758 computer. The required drivers are already in the Linux kernel at
759 least since Debian Wheezy, and it is fairly easy to set up. A
760 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide
">good
761 introduction
</a
> is available from the Open Mesh project. These are
762 the key settings needed to join the Oslo meshfx network:
</p
>
764 <p
><table
>
765 <tr
><th
>Setting
</th
><th
>Value
</th
></tr
>
766 <tr
><td
>Protocol / kernel module
</td
><td
>batman-adv
</td
></tr
>
767 <tr
><td
>ESSID
</td
><td
>meshfx@hackeriet
</td
></tr
>
768 <td
>Channel / Frequency
</td
><td
>11 /
2462</td
></tr
>
769 <td
>Cell ID
</td
><td
>02:BA:
00:
00:
00:
01</td
>
770 </table
></p
>
772 <p
>The reason for setting ad-hoc wifi Cell ID is to work around bugs
773 in firmware used in wifi card and wifi drivers. (See a nice post from
775 "<a href=
"http://tiebing.blogspot.no/
2009/
12/ad-hoc-cell-splitting-re-post-original.html
">Information
776 about cell-id splitting, stuck beacons, and failed IBSS merges!
</a
>
777 for details.) When these settings are activated and you have some
778 other mesh node nearby, your computer will be connected to the mesh
779 network and can communicate with any mesh node that is connected to
780 any of the nodes in your network of nodes. :)
</p
>
782 <p
>My initial plan was to reuse my old Linksys WRT54GL as a mesh node,
783 but that seem to be very hard, as I have not been able to locate a
784 firmware supporting batman-adv. If anyone know how to use that old
785 wifi access point with batman-adv these days, please let me know.
</p
>
787 <p
>If you find this project interesting and want to join, please join
788 us on IRC, either channel
789 <a href=
"irc://irc.freenode.net/#oslohackerspace
">#oslohackerspace
</a
>
790 or
<a href=
"irc://irc.freenode.net/#nuug
">#nuug
</a
> on
791 irc.freenode.net.
</p
>
793 <p
>While investigating mesh networks in Oslo, I came across an old
794 research paper from the university of Stavanger and Telenor Research
795 and Innovation called
796 <a href=
"http://folk.uio.no/paalee/publications/netrel-egeland-iswcs-
2008.pdf
">The
797 reliability of wireless backhaul mesh networks
</a
> and elsewhere
798 learned that Telenor have been experimenting with mesh networks at
799 Grünerløkka in Oslo. So mesh networks are also interesting for
800 commercial companies, even though Telenor discovered that it was hard
801 to figure out a good business plan for mesh networking and as far as I
802 know have closed down the experiment. Perhaps Telenor or others would
803 be interested in a cooperation?
</p
>
805 <p
><strong
>Update
2013-
10-
12</strong
>: I was just
806 <a href=
"http://lists.alioth.debian.org/pipermail/freedombox-discuss/
2013-October/
005900.html
">told
807 by the Serval project developers
</a
> that they no longer use
808 batman-adv (but are compatible with it), but their own crypto based
809 mesh system.
</p
>