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

copyright (C) 2011-2017 iesensor.com

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

http://wiki.openwrt.org/doc/howto/firstlogin
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”,

http://wiki.openwrt.org/doc/howto/basic.config

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

 

——————-
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
https://devzone.nordicsemi.com/blogs/700/trying-openwrt-chaos-calmer-1505-rc1-on-raspberry-/

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

https://github.com/1248/microcoap

https://devzone.nordicsemi.com/blogs/663/6lowpan-for-bluetooth-low-energy-on-openwrt/

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)” \
> | ssmtp -vvv MYOTHEREMAIL@EXAMPLE.COM

http://serverfault.com/questions/224375/how-to-send-mail-from-an-openwrt-router

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

Appendeix:
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

BSD documentation licensed Free for non-commercial usage only
Author: Qingfeng XIA
copyright (C) 2011-2017
http://www.iesensor.com
please keep the original link in your reference.
http://www.iesensor.com/blog/2015/09/15/ten-things-you-must-do-after-install-openwrt-15-05-on-raspberry-pi-b/
This entry was posted in Ineternet of Things, Linux. Bookmark the permalink.