Ten things you must do after install Openwrt 15.05 on raspberry pi B

copyright (C) qingfeng Xia 2011-2020 CC-BY-NC 4.0

This is not a tutorial, but list some interesting things for Openwrt

2015-09-14 by Qingfeng Xia

1. install the image by dd on linux, or ImageWriter in windows
on linux, the partition can be extened to 2G by gparted

In the home router, Flash size is quite limited (32-64MB), try usbdisk to extend, see:

OpenWrt Wiki ->Documentation -> HOWTOs -> Rootfs on External Storage (extroot)

2. first login,
using HDMI cable conected to one screen, plus usbcable, to make life easiser

usb-serial ttl may works, but there is a lot of hassel.
USB device is not hotpluggable on rpi
change root password by `passwd`

3. change network config and opkg update
by default, the ethernet is in `bridge` mode, proto=”static”,


change to simple `dhcp` to make it connect to ineternet via home rooter
option proto=’pppoe’,
option username=”
option password=”
pppoa is not supported, as there is no ADSL modem on raspberry pi. Perhaps it is possible behind an ADSL modem

Important!: `opkg update` at first before install any pkg, as /tmp/opkg-lists is not permanent between restart!

4. develop gcc, git, python2.7 ,python-pip
i2c, spi, gpio
pip install pyserial

5. wifi for internal network (usb wifi  TL WN722N)
#wifi detect > /etc/config/wireless

config wifi-device  radio1
        option type     mac80211
        option channel  11
        option hwmode   11g
        option path     'platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0'
        option htmode   HT20
        #option disabled 1  

config wifi-iface
        option device   radio1
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        #option encryption none
#make sure you give a password after testing, psk
        option ssid 'your_ssid'
        option encryption 'psk2'
        option key 'your_psswd' #test pass, DLink usb hub may cause error.
        #tested with android, it suggests the signal is not good.

#device should be radio0,  if it is your first wifi dongle
#generate this file with command `wifi detect>/etc/config/wireless` and edit it


config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

#not sure it is needed in openwrt 15.05
config switch 'eth0'
        option reset '0'
        option enable_vlan '0'

#could be pppoe
config interface 'wan'
        option ifname 'eth0'
        #option _orig_ifname 'eth0'
        #option _orig_bridge 'false'
        option proto 'dhcp'
#       option macaddr 'your mac addr'
#       option netmask ''
#       option ip6assign '60'

config interface lan
        #should be 'radio0' or 'radio1'for internal net, no needed to specify a name here
        option proto 'static'

        option ipaddr ''
        option netmask ''
        option type 'bridge'

#wifi and bluetooth are set in other files

config globals 'globals'
        option ula_prefix 'fd1e:0d6b:407b::/48'


if you copy this text, you may end up with mess up space,
as there must be a TAB before each option!!!

6. bluetooth_6lowpan and coap node

root@OpenWrt:/# modprobe bluetooth_6lowpan
root@OpenWrt:/# echo 35 > /sys/kernel/debug/bluetooth/6lowpan_psm



7. usb camera and motion server,
turn off the firewall and edit motion.conf (only localhost can access 8080 and 8081)
8081 port needs to be active in control page: ip:8080 (in fact, webbrowser will redict you to 8080)
make it start at start up if /dev/video0 is available?
install ffmpeg codec? it is easy to install ffmpeg pkg

8. sending email using ssmtp on event or system mail
install ssmtp and setup ssmtp.conf (if it work on your normal linux install, it works with openwrt)
There is tons of tutorial on setup gmail

$ echo -e “From:root@openwrt\nSubject:openwrt_startup\n\n $(ifconfig)” \


9. usbip,  which is cool, but ‘usbip’ pkg is not found for raspberry pi built

10. After all configuration tested, backup  fireware (/etc) folder in luci web UI

dd to backup all the partitions

1. system arch compared with desktop Linux

ubus (dbus) evdev(udev), uclibc (glibc)  netifd(NetworkManager) ubox (glib)
but still install : glib gobject, libstdc++
busybox-initd:light weight init process
overlay, so it is less concern of SD card fs corrupt

CC-BY-NC 4.0 licensed free for non-commercial usage
Author: Qingfeng XIA
copyright (C) 2011-2020
please keep the original link in your reference.
This entry was posted in Ineternet of Things, Linux. Bookmark the permalink.