]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2013/11/11.rss
Generated.
[homepage.git] / blog / archive / 2013 / 11 / 11.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from November 2013</title>
5 <description>Entries from November 2013</description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>All drones should be radio marked with what they do and who they belong to</title>
11 <link>http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html</guid>
13 <pubDate>Thu, 21 Nov 2013 15:40:00 +0100</pubDate>
14 <description>Drones, flying robots, are getting more and more popular. The most
15 know ones are the killer drones used by some government to murder
16 people they do not like without giving them the chance of a fair
17 trial, but the technology have many good uses too, from mapping and
18 forest maintenance to photography and search and rescue. I am sure it
19 is just a question of time before &quot;bad drones&quot; are in the hands of
20 private enterprises and not only state criminals but petty criminals
21 too. The drone technology is very useful and very dangerous. To have
22 some control over the use of drones, I agree with Daniel Suarez in his
23 TED talk
24 &quot;&lt;a href=&quot;http://www.ted.com/talks/daniel_suarez_the_kill_decision_shouldn_t_belong_to_a_robot.html&quot;&gt;The
25 kill decision shouldn&#39;t belong to a robot&lt;/a&gt;&quot;, where he suggested this
26 little gem to keep the good while limiting the bad use of drones:&lt;/p&gt;
27
28 &lt;blockquote&gt;
29
30 &lt;p&gt;Each robot and drone should have a cryptographically signed
31 I.D. burned in at the factory that can be used to track its movement
32 through public spaces. We have license plates on cars, tail numbers on
33 aircraft. This is no different. And every citizen should be able to
34 download an app that shows the population of drones and autonomous
35 vehicles moving through public spaces around them, both right now and
36 historically. And civic leaders should deploy sensors and civic drones
37 to detect rogue drones, and instead of sending killer drones of their
38 own up to shoot them down, they should notify humans to their
39 presence. And in certain very high-security areas, perhaps civic
40 drones would snare them and drag them off to a bomb disposal facility.&lt;/p&gt;
41
42 &lt;p&gt;But notice, this is more an immune system than a weapons system. It
43 would allow us to avail ourselves of the use of autonomous vehicles
44 and drones while still preserving our open, civil society.&lt;/p&gt;
45
46 &lt;/blockquote&gt;
47
48 &lt;p&gt;The key is that &lt;em&gt;every citizen&lt;/em&gt; should be able to read the
49 radio beacons sent from the drones in the area, to be able to check
50 both the government and others use of drones. For such control to be
51 effective, everyone must be able to do it. What should such beacon
52 contain? At least formal owner, purpose, contact information and GPS
53 location. Probably also the origin and target position of the current
54 flight. And perhaps some registration number to be able to look up
55 the drone in a central database tracking their movement. Robots
56 should not have privacy. It is people who need privacy.&lt;/p&gt;
57 </description>
58 </item>
59
60 <item>
61 <title>Lets make a wireless community network in Oslo!</title>
62 <link>http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html</link>
63 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html</guid>
64 <pubDate>Wed, 13 Nov 2013 21:00:00 +0100</pubDate>
65 <description>&lt;p&gt;Today NUUG and Hackeriet announced
66 &lt;a href=&quot;http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml&quot;&gt;our
67 plans to join forces and create a wireless community network in
68 Oslo&lt;/a&gt;. The workshop to help people get started will take place
69 Thursday 2013-11-28, but we already are collecting the geolocation of
70 people joining forces to make this happen. We have
71 &lt;a href=&quot;https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson&quot;&gt;9
72 locations plotted on the map&lt;/a&gt;, but we will need more before we have
73 a connected mesh spread across Oslo. If this sound interesting to
74 you, please join us at the workshop. If you are too impatient to wait
75 15 days, please join us on the IRC channel
76 &lt;a href=&quot;irc://irc.freenode.net/%23nuug&quot;&gt;#nuug on irc.freenode.net&lt;/a&gt;
77 right away. :)&lt;/p&gt;
78 </description>
79 </item>
80
81 <item>
82 <title>Running TP-Link MR3040 as a batman-adv mesh node using openwrt</title>
83 <link>http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html</link>
84 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html</guid>
85 <pubDate>Sun, 10 Nov 2013 23:00:00 +0100</pubDate>
86 <description>&lt;p&gt;Continuing my research into mesh networking, I was recommended to
87 use TP-Link 3040 and 3600 access points as mesh nodes, and the pair I
88 bought arrived on Friday. Here are my notes on how to set up the
89 MR3040 as a mesh node using
90 &lt;a href=&quot;http://www.openwrt.org/&quot;&gt;OpenWrt&lt;/a&gt;.&lt;/p&gt;
91
92 &lt;p&gt;I started by following the instructions on the OpenWRT wiki for
93 &lt;a href=&quot;http://wiki.openwrt.org/toh/tp-link/tl-mr3040&quot;&gt;TL-MR3040&lt;/a&gt;,
94 and downloaded
95 &lt;a href=&quot;http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin&quot;&gt;the
96 recommended firmware image&lt;/a&gt;
97 (openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
98 uploaded it into the original web interface. The flashing went fine,
99 and the machine was available via telnet on the ethernet port. After
100 logging in and setting the root password, ssh was available and I
101 could start to set it up as a batman-adv mesh node.&lt;/p&gt;
102
103 &lt;p&gt;I started off by reading the instructions from
104 &lt;a href=&quot;http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine&#39;s_Research&quot;&gt;Wireless
105 Africa&lt;/a&gt;, which had quite a lot of useful information, but
106 eventually I followed the recipe from the Open Mesh wiki for
107 &lt;a href=&quot;http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config&quot;&gt;using
108 batman-adv on OpenWrt&lt;/a&gt;. A small snag was the fact that the
109 &lt;tt&gt;opkg install kmod-batman-adv&lt;/tt&gt; command did not work as it
110 should. The batman-adv kernel module would fail to load because its
111 dependency crc16 was not already loaded. I
112 &lt;a href=&quot;https://dev.openwrt.org/ticket/14452&quot;&gt;reported the bug&lt;/a&gt; to
113 the openwrt project and hope it will be fixed soon. But the problem
114 only seem to affect initial testing of batman-adv, as configuration
115 seem to work when booting from scratch.&lt;/p&gt;
116
117 &lt;p&gt;The setup is done using files in /etc/config/. I did not bridge
118 the Ethernet and mesh interfaces this time, to be able to hook up the
119 box on my local network and log into it for configuration updates.
120 The following files were changed and look like this after modifying
121 them:&lt;/p&gt;
122
123 &lt;p&gt;&lt;tt&gt;/etc/config/network&lt;/tt&gt;&lt;/p&gt;
124
125 &lt;pre&gt;
126
127 config interface &#39;loopback&#39;
128 option ifname &#39;lo&#39;
129 option proto &#39;static&#39;
130 option ipaddr &#39;127.0.0.1&#39;
131 option netmask &#39;255.0.0.0&#39;
132
133 config globals &#39;globals&#39;
134 option ula_prefix &#39;fdbf:4c12:3fed::/48&#39;
135
136 config interface &#39;lan&#39;
137 option ifname &#39;eth0&#39;
138 option type &#39;bridge&#39;
139 option proto &#39;dhcp&#39;
140 option ipaddr &#39;192.168.1.1&#39;
141 option netmask &#39;255.255.255.0&#39;
142 option hostname &#39;tl-mr3040&#39;
143 option ip6assign &#39;60&#39;
144
145 config interface &#39;mesh&#39;
146 option ifname &#39;adhoc0&#39;
147 option mtu &#39;1528&#39;
148 option proto &#39;batadv&#39;
149 option mesh &#39;bat0&#39;
150 &lt;/pre&gt;
151
152 &lt;p&gt;&lt;tt&gt;/etc/config/wireless&lt;/tt&gt;&lt;/p&gt;
153 &lt;pre&gt;
154
155 config wifi-device &#39;radio0&#39;
156 option type &#39;mac80211&#39;
157 option channel &#39;11&#39;
158 option hwmode &#39;11ng&#39;
159 option path &#39;platform/ar933x_wmac&#39;
160 option htmode &#39;HT20&#39;
161 list ht_capab &#39;SHORT-GI-20&#39;
162 list ht_capab &#39;SHORT-GI-40&#39;
163 list ht_capab &#39;RX-STBC1&#39;
164 list ht_capab &#39;DSSS_CCK-40&#39;
165 option disabled &#39;0&#39;
166
167 config wifi-iface &#39;wmesh&#39;
168 option device &#39;radio0&#39;
169 option ifname &#39;adhoc0&#39;
170 option network &#39;mesh&#39;
171 option encryption &#39;none&#39;
172 option mode &#39;adhoc&#39;
173 option bssid &#39;02:BA:00:00:00:01&#39;
174 option ssid &#39;meshfx@hackeriet&#39;
175 &lt;/pre&gt;
176 &lt;p&gt;&lt;tt&gt;/etc/config/batman-adv&lt;/tt&gt;&lt;/p&gt;
177 &lt;pre&gt;
178
179 config &#39;mesh&#39; &#39;bat0&#39;
180 option interfaces &#39;adhoc0&#39;
181 option &#39;aggregated_ogms&#39;
182 option &#39;ap_isolation&#39;
183 option &#39;bonding&#39;
184 option &#39;fragmentation&#39;
185 option &#39;gw_bandwidth&#39;
186 option &#39;gw_mode&#39;
187 option &#39;gw_sel_class&#39;
188 option &#39;log_level&#39;
189 option &#39;orig_interval&#39;
190 option &#39;vis_mode&#39;
191 option &#39;bridge_loop_avoidance&#39;
192 option &#39;distributed_arp_table&#39;
193 option &#39;network_coding&#39;
194 option &#39;hop_penalty&#39;
195
196 # yet another batX instance
197 # config &#39;mesh&#39; &#39;bat5&#39;
198 # option &#39;interfaces&#39; &#39;second_mesh&#39;
199 &lt;/pre&gt;
200
201 &lt;p&gt;The mesh node is now operational. I have yet to test its range,
202 but I hope it is good. I have not yet tested the TP-Link 3600 box
203 still wrapped up in plastic.&lt;/p&gt;
204 </description>
205 </item>
206
207 <item>
208 <title>Debian init.d boot script example for rsyslog</title>
209 <link>http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html</link>
210 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html</guid>
211 <pubDate>Sat, 2 Nov 2013 22:40:00 +0100</pubDate>
212 <description>&lt;p&gt;If one of the points of switching to a new init system in Debian is
213 &lt;a href=&quot;http://thomas.goirand.fr/blog/?p=147&quot;&gt;to get rid of huge
214 init.d scripts&lt;/a&gt;, I doubt we need to switch away from sysvinit and
215 init.d scripts at all. Here is an example init.d script, ie a rewrite
216 of /etc/init.d/rsyslog:&lt;/p&gt;
217
218 &lt;p&gt;&lt;pre&gt;
219 #!/lib/init/init-d-script
220 ### BEGIN INIT INFO
221 # Provides: rsyslog
222 # Required-Start: $remote_fs $time
223 # Required-Stop: umountnfs $time
224 # X-Stop-After: sendsigs
225 # Default-Start: 2 3 4 5
226 # Default-Stop: 0 1 6
227 # Short-Description: enhanced syslogd
228 # Description: Rsyslog is an enhanced multi-threaded syslogd.
229 # It is quite compatible to stock sysklogd and can be
230 # used as a drop-in replacement.
231 ### END INIT INFO
232 DESC=&quot;enhanced syslogd&quot;
233 DAEMON=/usr/sbin/rsyslogd
234 &lt;/pre&gt;&lt;/p&gt;
235
236 &lt;p&gt;Pretty minimalistic to me... For the record, the original sysv-rc
237 script was 137 lines, and the above is just 15 lines, most of it meta
238 info/comments.&lt;/p&gt;
239
240 &lt;p&gt;How to do this, you ask? Well, one create a new script
241 /lib/init/init-d-script looking something like this:
242
243 &lt;p&gt;&lt;pre&gt;
244 #!/bin/sh
245
246 # Define LSB log_* functions.
247 # Depend on lsb-base (&gt;= 3.2-14) to ensure that this file is present
248 # and status_of_proc is working.
249 . /lib/lsb/init-functions
250
251 #
252 # Function that starts the daemon/service
253
254 #
255 do_start()
256 {
257 # Return
258 # 0 if daemon has been started
259 # 1 if daemon was already running
260 # 2 if daemon could not be started
261 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test &gt; /dev/null \
262 || return 1
263 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
264 $DAEMON_ARGS \
265 || return 2
266 # Add code here, if necessary, that waits for the process to be ready
267 # to handle requests from services started subsequently which depend
268 # on this one. As a last resort, sleep for some time.
269 }
270
271 #
272 # Function that stops the daemon/service
273 #
274 do_stop()
275 {
276 # Return
277 # 0 if daemon has been stopped
278 # 1 if daemon was already stopped
279 # 2 if daemon could not be stopped
280 # other if a failure occurred
281 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
282 RETVAL=&quot;$?&quot;
283 [ &quot;$RETVAL&quot; = 2 ] &amp;&amp; return 2
284 # Wait for children to finish too if this is a daemon that forks
285 # and if the daemon is only ever run from this initscript.
286 # If the above conditions are not satisfied then add some other code
287 # that waits for the process to drop all resources that could be
288 # needed by services started subsequently. A last resort is to
289 # sleep for some time.
290 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
291 [ &quot;$?&quot; = 2 ] &amp;&amp; return 2
292 # Many daemons don&#39;t delete their pidfiles when they exit.
293 rm -f $PIDFILE
294 return &quot;$RETVAL&quot;
295 }
296
297 #
298 # Function that sends a SIGHUP to the daemon/service
299 #
300 do_reload() {
301 #
302 # If the daemon can reload its configuration without
303 # restarting (for example, when it is sent a SIGHUP),
304 # then implement that here.
305 #
306 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
307 return 0
308 }
309
310 SCRIPTNAME=$1
311 scriptbasename=&quot;$(basename $1)&quot;
312 echo &quot;SN: $scriptbasename&quot;
313 if [ &quot;$scriptbasename&quot; != &quot;init-d-library&quot; ] ; then
314 script=&quot;$1&quot;
315 shift
316 . $script
317 else
318 exit 0
319 fi
320
321 NAME=$(basename $DAEMON)
322 PIDFILE=/var/run/$NAME.pid
323
324 # Exit if the package is not installed
325 #[ -x &quot;$DAEMON&quot; ] || exit 0
326
327 # Read configuration variable file if it is present
328 [ -r /etc/default/$NAME ] &amp;&amp; . /etc/default/$NAME
329
330 # Load the VERBOSE setting and other rcS variables
331 . /lib/init/vars.sh
332
333 case &quot;$1&quot; in
334 start)
335 [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_daemon_msg &quot;Starting $DESC&quot; &quot;$NAME&quot;
336 do_start
337 case &quot;$?&quot; in
338 0|1) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 0 ;;
339 2) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 1 ;;
340 esac
341 ;;
342 stop)
343 [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_daemon_msg &quot;Stopping $DESC&quot; &quot;$NAME&quot;
344 do_stop
345 case &quot;$?&quot; in
346 0|1) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 0 ;;
347 2) [ &quot;$VERBOSE&quot; != no ] &amp;&amp; log_end_msg 1 ;;
348 esac
349 ;;
350 status)
351 status_of_proc &quot;$DAEMON&quot; &quot;$NAME&quot; &amp;&amp; exit 0 || exit $?
352 ;;
353 #reload|force-reload)
354 #
355 # If do_reload() is not implemented then leave this commented out
356 # and leave &#39;force-reload&#39; as an alias for &#39;restart&#39;.
357 #
358 #log_daemon_msg &quot;Reloading $DESC&quot; &quot;$NAME&quot;
359 #do_reload
360 #log_end_msg $?
361 #;;
362 restart|force-reload)
363 #
364 # If the &quot;reload&quot; option is implemented then remove the
365 # &#39;force-reload&#39; alias
366 #
367 log_daemon_msg &quot;Restarting $DESC&quot; &quot;$NAME&quot;
368 do_stop
369 case &quot;$?&quot; in
370 0|1)
371 do_start
372 case &quot;$?&quot; in
373 0) log_end_msg 0 ;;
374 1) log_end_msg 1 ;; # Old process is still running
375 *) log_end_msg 1 ;; # Failed to start
376 esac
377 ;;
378 *)
379 # Failed to stop
380 log_end_msg 1
381 ;;
382 esac
383 ;;
384 *)
385 echo &quot;Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}&quot; &gt;&amp;2
386 exit 3
387 ;;
388 esac
389
390 :
391 &lt;/pre&gt;&lt;/p&gt;
392
393 &lt;p&gt;It is based on /etc/init.d/skeleton, and could be improved quite a
394 lot. I did not really polish the approach, so it might not always
395 work out of the box, but you get the idea. I did not try very hard to
396 optimize it nor make it more robust either.&lt;/p&gt;
397
398 &lt;p&gt;A better argument for switching init system in Debian than reducing
399 the size of init scripts (which is a good thing to do anyway), is to
400 get boot system that is able to handle the kernel events sensibly and
401 robustly, and do not depend on the boot to run sequentially. The boot
402 and the kernel have not behaved sequentially in years.&lt;/p&gt;
403 </description>
404 </item>
405
406 <item>
407 <title>Browser plugin for SPICE (spice-xpi) uploaded to Debian</title>
408 <link>http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html</link>
409 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html</guid>
410 <pubDate>Fri, 1 Nov 2013 11:00:00 +0100</pubDate>
411 <description>&lt;p&gt;&lt;a href=&quot;http://www.spice-space.org/&quot;&gt;The SPICE protocol&lt;/a&gt; for
412 remote display access is the preferred solution with oVirt and RedHat
413 Enterprise Virtualization, and I was sad to discover the other day
414 that the browser plugin needed to use these systems seamlessly was
415 missing in Debian. The &lt;a href=&quot;http://bugs.debian.org/668284&quot;&gt;request
416 for a package&lt;/a&gt; was from 2012-04-10 with no progress since
417 2013-04-01, so I decided to wrap up a package based on the great work
418 from Cajus Pollmeier and put it in a collab-maint maintained git
419 repository to get a package I could use. I would very much like
420 others to help me maintain the package (or just take over, I do not
421 mind), but as no-one had volunteered so far, I just uploaded it to
422 NEW. I hope it will be available in Debian in a few days.&lt;/p&gt;
423
424 &lt;p&gt;The source is now available from
425 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary&quot;&gt;http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary&lt;/a&gt;.&lt;/p&gt;
426 </description>
427 </item>
428
429 </channel>
430 </rss>