Raspberry PI Firmware HowTo

The raspi is available as a gluon target, so here is a short introduction.

Please note that support is experimental and sometimes a little wonky.

Known issues:

  • Networking changes sometimes required a restart for me — Ludwig 2016/03/16 11:03

Compile && Install

Download the firmware from the experimental branch. Or compile from source:

You might want to edit the Makefile and restrict the build to Raspi only:

	brcm2708-bcm2708 \


brcm2708-bcm2708: Raspi A/B/B+

brcm2708-bcm2709: Raspi 2

Zipped image files appear in the „output/images“ folder after build.

Use the sysupgrade image, and unzip && burn to sd:

gunzip gluon-tecff-*-raspberry-pi-*sysupgrade.img.gz
sudo dd if=gluon-tecff-*-raspberry-pi-*sysupgrade.img of=/dev/YOURSDCARD

The image is about 80 MB, so any recent SD-card > 128MB will suffice. After writing to the card its recommended to expand the ext4 partition, using gparted or similar. This way the whole SD-card space will be used.(We dont want to run into not-enough-harddisk-space issues on such a big system.)

Put the card into the raspi, connect network to your PC, and boot. Like with all other Freifunk-devices, it should boot in config mode. Configure with LuCI.

What should work out of the box?:

  • Connection to the fastd-server (if WAN is enabled )

What doesn't work:

  • Wireless
  • Meshing

Setting up wireless / Networking HowTo

(Applies to x86/kvm/virtual images also)

Connect your desired USB wireless stick to the raspi.

Check dmesg output for working drivers: (example done using Raspi2 and LevelOne WNC-0305USB)

root@raspi:~# dmesg
[    9.886382] usbcore: registered new interface driver rt73usb
[    9.991176] random: nonblocking pool is initialized
[   10.050632] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.052144] ieee80211 phy0: hwaddr 00:11:6b:XX:XX:XX, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
[   10.078902] rtl8187: Customer ID is 0xFF
[   10.085864] rtl8187: wireless switch is on

Stick has been recognized and driver loaded, good.

Check the sticks capabilities: (Important! only one stick should be connected for now)

root@raspi:~# iw list
Wiphy phy0
	max # scan SSIDs: 4
	max scan IEs length: 2285 bytes
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * monitor
	Band 1:
			* 2484 MHz [14] (20.0 dBm) (no IR)
	interface combinations are not supported
	HT Capability overrides:

Important parts are Supported interface modes (See and interface combinations.

This is a very cheap stick, so no AP/Managed Mode and no combinations. Looks like we can only set up meshing(IBSS) here, no client network. Better devices will have more modes and 5Ghz bands(other bands will appear as devices for the network config).

To set up, do the following:

Edit File: /etc/config/wireless:

#Here should already be the device section - edit it to say radi0, but leave the path and other vars unchanged
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '6' ## you may want to test on another channel, but for successful meshing 6 is needed
        option hwmode '11g'
        option path '###YOURPATHHERE#####'
        option disabled '0'

# remove the remaining Openwrt Ap parts
# paste the following:
#--- start
# mesh network
config wifi-iface 'ibss_radio0'
        option ifname 'ibss0'
        option network 'ibss_radio0'
        option device 'radio0'
        option disabled '0'
        option mcast_rate '12000'
        option mode 'adhoc'
        option ssid 'mesh.tecff'

# client network
config wifi-iface 'client_radio0'
        option ifname 'client0'
        option network 'client'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Freifunk'
        option disabled '1'

Edit file: /etc/config/network

Search for ibss, if its not present, add this:

#--- start
config interface 'ibss_radio0'            
        option mesh 'bat0'         
        option proto 'batadv'             
        option mtu '1532'   

if an IBSS interface is already present, check for the correct naming (ibss_radio0).

Finally do a wifi and networking restart:

root@raspi:~# wifi && /etc/intit.d/network restart

A mesh.tecff ad-hoc network should be appearing on your scanner now. To open a client network, set the mesh to disabled, and enable the client wifi-iface. Your stick has to support AP/master mode for that. Configuration for 2 sticks or two bands (5Ghz) is similar, copy the devie/iface sections and edit to your needs.

Further information

bastelprojekte/freifunk-pi.txt · Zuletzt geändert: 2016/03/20 16:22 von ludwig