Raspberry Pi ideas wanted


R, G, and B LEDs [7].
R, G, and B LEDs [7]. (Photo credit: Wikipedia)
Every week I teach a group of 9- and 10-year-olds some core programming skills using Scratch.

The children seem to love it and I certainly enjoy it – it’s good fun to see them tackle the problems and find solutions: it really reminds me of the reasons, ongoing C++ debugging slog not withstanding, that I enjoy programming as a¬†pastime.

The school I work with have got some Raspberry Pis and I am wondering about ideas to show off how these can be used. I know there is a version of Scratch that allows access to the GPIO so that would be a good place to start.

What makes a good project? Is a calculator – with the results displayed on LEDs a viable idea – or is there something else people recommend? I think it would probably be best if this was a project two or three children could work on together – as I am not sure that all the other things needed to give each child a working Raspberry Pi – like screens and power supplies – are likely to be available in sufficient numbers.

Any ideas please add to the comments, thanks

Enhanced by Zemanta

Situation normal, all fscked up


Why, oh why, oh why? … Hopefully someone will now tell me the rant that follows is unnecessary.

But, here goes: an update of my Raspberry Pi failed about a week ago. As I then went to Paris with the family for a few days I only got round to trying to fix it this weekend.

I managed to get the thing booting again by copying some files from the distributed boot partition into the boot partition on my RasPi, but on booting the networking failed (possibly kernel modules needed were not available as a consequence of the failed update, not sure). Anyway, one of biggest weaknesses of the RasPi is the whole flakiness of the system when it comes to power and a small error there is likely to cause corruption on the SD card – and this happened to me.

But, why on why oh why does fsck.ext4 insist on a manual check? After an hour (with a figure of Robbie Burns on the enter key) I have only got a little way through this and had to give up.

I am a grown up. If I want to risk fsck corrupting my partition that should be up to me – I should have an automatic option.

Update: fsck -y is what I needed.

Help needed: what is making the wireless card on my Raspberry Pi crash


Here’s the syslog from my Raspberry Pi this morning:


Jan 8 06:25:15 raspberrypi /USR/SBIN/CRON[10042]: (CRON) info (No MTA installed, discarding output)
Jan 8 06:25:30 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:25:30 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:25:31 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 373 seconds.
Jan 8 06:31:43 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:31:43 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:31:43 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 405 seconds.
Jan 8 06:38:28 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:38:28 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:38:28 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 376 seconds.
Jan 8 06:44:44 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:44:44 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:44:44 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 415 seconds.
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: authentication OK (open system)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-AUTHENTICATE.indication(7c:61:93:ff:98:0c, OPEN_SYSTEM)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-DELETEKEYS.request(7c:61:93:ff:98:0c)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: authenticated
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: association OK (aid 1)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: associated (aid 1)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-ASSOCIATE.indication(7c:61:93:ff:98:0c)
Jan 8 06:49:58 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-DELETEKEYS.request(7c:61:93:ff:98:0c)
Jan 8 06:51:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:51:39 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:51:39 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:51:40 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 373 seconds.
Jan 8 06:52:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:53:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:54:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:55:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:56:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:57:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:57:53 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 06:57:53 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 06:57:54 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 350 seconds.
Jan 8 06:58:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 06:59:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:00:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:01:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:02:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:03:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:03:44 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 07:03:44 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 07:03:44 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 419 seconds.
Jan 8 07:04:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:05:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:06:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:07:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:08:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:09:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:10:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:10:43 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 07:10:43 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 07:10:43 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 368 seconds.
Jan 8 07:11:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:12:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:13:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:14:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:15:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:16:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:16:51 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 8 07:16:51 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 8 07:16:52 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 385 seconds.
Jan 8 07:17:01 raspberrypi /USR/SBIN/CRON[10417]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 8 07:17:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:18:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:19:11 raspberrypi NetworkManager[2774]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 8 07:18:04 raspberrypi kernel: imklog 5.8.11, log source = /proc/kmsg started.

(The last line is the first output of the rebooted machine – when, at about 7.19am I got up and found it wasn’t working – not sure why the clock goes backwards but it does.)

And here is yesterday’s log at the same time…


Jan 7 06:25:14 raspberrypi /USR/SBIN/CRON[8350]: (CRON) info (No MTA installed, discarding output)
Jan 7 06:26:05 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:26:05 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:26:07 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 399 seconds.
Jan 7 06:32:46 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:32:46 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:32:47 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 361 seconds.
Jan 7 06:38:48 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:38:48 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:38:49 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 420 seconds.
Jan 7 06:41:27 raspberrypi kernel: [63555.391671] usb 1-1.3.1: reset high-speed USB device number 6 using dwc_otg
Jan 7 06:45:50 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:45:50 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:45:50 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 354 seconds.
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: authentication OK (open system)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-AUTHENTICATE.indication(7c:61:93:ff:98:0c, OPEN_SYSTEM)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-DELETEKEYS.request(7c:61:93:ff:98:0c)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: authenticated
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: association OK (aid 1)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c IEEE 802.11: associated (aid 1)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-ASSOCIATE.indication(7c:61:93:ff:98:0c)
Jan 7 06:49:59 raspberrypi hostapd: wlan0: STA 7c:61:93:ff:98:0c MLME: MLME-DELETEKEYS.request(7c:61:93:ff:98:0c)
Jan 7 06:51:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:51:45 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:51:45 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:51:45 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 359 seconds.
Jan 7 06:52:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:53:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:54:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:55:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:56:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:57:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:57:45 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 06:57:45 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 06:57:45 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 369 seconds.
Jan 7 06:58:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 06:59:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:00:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:01:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:02:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:03:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:03:54 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:03:54 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:03:54 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 366 seconds.
Jan 7 07:04:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:05:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:06:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:07:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:08:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:09:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:10:00 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:10:00 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:10:00 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 397 seconds.
Jan 7 07:10:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:11:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:12:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:13:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:14:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:15:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:16:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:16:37 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:16:37 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:16:38 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 435 seconds.
Jan 7 07:17:01 raspberrypi /USR/SBIN/CRON[8725]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 7 07:17:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:18:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:19:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:20:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:21:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:22:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:23:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Jan 7 07:23:53 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:23:53 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:23:54 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 389 seconds.
Jan 7 07:24:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:25:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:26:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:27:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:28:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:29:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:30:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:30:23 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:30:23 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:30:23 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 382 seconds.
Jan 7 07:31:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:32:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:33:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:34:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:35:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:36:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:36:45 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:36:45 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:36:46 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 375 seconds.
Jan 7 07:37:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:38:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:39:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:40:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:41:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:42:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:43:02 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:43:02 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:43:02 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 439 seconds.
Jan 7 07:43:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:44:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:45:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:46:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:47:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:48:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:49:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:50:21 raspberrypi dhclient: DHCPREQUEST on br0 to 192.168.62.1 port 67
Jan 7 07:50:21 raspberrypi dhclient: DHCPACK from 192.168.62.1
Jan 7 07:50:22 raspberrypi dhclient: bound to 192.168.62.104 -- renewal in 418 seconds.
Jan 7 07:50:23 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:51:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:52:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:53:22 raspberrypi NetworkManager[2763]: <warn> Could not get scan request result: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Jan 7 07:17:55 raspberrypi kernel: imklog 5.8.11, log source = /proc/kmsg started.

As you can see, I didn’t reboot it yesterday until a bit later (I was puzzled as to why I could still ping the bridge but not log in to the box – but this morning I had seen it al before.)

As the logs up to time 6.49am show no sign of a problem I am guessing this is a cron related issue.

But I can see nothing in the various cron.daily scripts that should hit the wireless card.

Any ideas as to what this is about?

Raspberry Pi stability issues


CDC raspberry
CDC raspberry (Photo credit: Wikipedia)

Now I am loading my Raspberry Pi with a fair few tasks – squid proxy, bridged wireless connection, samba server – I am having some stability issues.

Essentially I am having to reboot it every day or so, as it seems to drop off the network.

I run it headless, so I cannot tell exactly what is up, but all the lights remain on, so my inclination is to think that – with a USB wireless dongle and a 1TB drive hanging off it, it has become very sensitive to spikes and troughs in my domestic supply (it’s also running off an extension cord as opposed to a socket directly on the ring main).

I have seen some people say this is not too uncommon and a UPS of some sort is the answer.

 

Raspberry Jam in London


Coming a bit late to this, but if you are a teacher (it seems tickets for 11 – 16 year olds have all gone) and have a Raspberry Pi and can get into London tomorrow (3 January) then this looks interesting…

‘Pizza and Pi’ Raspberry Pi Raspberry Jam meetup for 11-16s in London

Thursday, 3 January 2013 from 13:30 to 16:00 (GMT)

London, United Kingdom

Tickets from here

Feeling very daunted


Distributed and parallel systems
Distributed and parallel systems (Photo credit: Wikipedia)

One of my Christmas tasks is to have some serious thoughts about, and maybe make some progress with my “invention” or “experiment” for my PhD. It is not easy.

Currently I am thinking about what I could do about a parallel file system. There are several problems with this, not least of which is what distributed system could I test a distributed file system with? I have now taken delivery of three 250GB USB disks so I have that part of a RAID 0 array, which seems the most obvious place to start. But I do not have a distributed system with three I/O nodes.

(Well I do have three Raspberry Pi boxes on which I can run Plan 9, which is a distributed operating system, but I am not entirely convinced any more this is a practical option.)

Then there is a question of originality – because twenty years ago an experimental file system, Vesta, was built that seems to, more or less, do what I want. I am not sure Vesta is being used anywhere any more, but I do not just want to go around re-implementing it. Now, I am sure when I actually start writing code, if that happens, it will move away from Vesta (especially as I have no Vesta code and I am not aware it is available in any case) and towards something else, but right now it just feels like I am walking down a well trodden road.

Raspberry Pi as an ethernet to wifi bridge


So, here’s my account of how to set up your Raspberry Pi box as an ethernet bridge.

English: Extract from Raspberry Pi board at Tr...
English: Extract from Raspberry Pi board at TransferSummit 2011 (Photo credit: Wikipedia)

First of all, for those wondering: what is a bridged connection? Essentially this is a “see through” way of extending your network – in a bridge software decides which packets get fowarded on to the next segment of the network. So for a wired to wireless bridge you can imagine it as an extension of the wired network into the wifi-fi space. This is different from just being a router as we don’t need to, for instance, set up a new DHCP server or fix the routing table elsewhere in the network to ensure packets for the wireless connection are sent to your router and so on.

I was already using my Raspberry Pi box as Squid proxy server and I could have gone an extra step of making that “transparent” (ie forcing users to use that via the bridged connection) but that was a level of control too far! But it’s an option. To be honest the RasPi’s (this is a first series version, with less memory) performance as a Squid server seems to tend towards the mediocre, so while I think using a proxy is worth it for limiting the stress on a network like mine (we can have up to 10 devices at once with PCs and phones these days), it’s not fundamental.

Before you begin: The assumption here is that you have an ethernet connection already running and a wireless card (USB device) that supports “promiscuous” mode, meaning it can read packets that were not originally destined for it. I think most modern cards¬† do that, but I am no expert. The assumption here is that you are running Raspian. If you have another distro adjust the suggestions appropriately.

First step:

sudo apt-get install aptitudeaptitude is just better than apt-get.
sudo aptitude install hostapd bridge-utils – you need these to get the wireless card and the bridge running

Then ensure that IP forwarding is on by editing /etc/sysctl.conf and removing the # from before the line that reads net.ipv4.ip_forward=1.

Second step:

Edit (i.e., create) /etc/hostapd/hostapd.conf – insert your SSID and probably don’t use WEP, which is close to useless…

interface=wlan0
bridge=br0
driver=nl80211
auth_algs=1
macaddr_acl=0
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=0
hw_mode=g
ssid=YOUR_SSID
channel=11
wep_default_key=0
wep_key0=YOUR_WEP_KEY
wpa=0

Third step:

Edit your /etc/network/interfaces file … here is mine:

auto lo
iface lo inet loopback
iface eth0 inet static
address 0.0.0.0

auto br0
iface br0 inet dhcp
    pre-up ip link set eth0 down
    pre-up ip link set wlan0 down
    pre-up brctl addbr br0
    pre-up brctl addif br0 eth0 wlan0
    pre-up ip addr flush dev eth0
    pre-up ip addr flush dev wlan0
    post-down ip link set eth0 down
    post-down ip link set wlan0 down
    post-down ip link set br0 down
    post-down brctl delif br0 eth0 wlan0
    post-down brctl delbr br0

(I had to force my eth0 to IP address 0.0.0.0 because of the behaviour of my DHCP server on the commodity router, you may not need to do that, but it is essential that neither your eth0 nor your wlan0 acquire an IP address.)

Fourth step:
Edit your /etc/rc.local file to ensure that the hostapd service is restarted after the bridge comes up. (For DHCP server reasons I also had to ensure my bridge was assigned an IP address – not sure you will need to do that, but it’s probably harmless)

# Setup bridge
dhclient br0
/etc/init.d/hostapd restart

Fifth step:
Restart your box sudo shutdown -r now and if it doesn’t work, don’t blame me, blame the guy who gave me the answer here – http://superuser.com/questions/520172/wired-to-wireless-bridge-in-linux

But hopefully it will work…