Laman

New

a

Tampilkan postingan dengan label raspberrypi. Tampilkan semua postingan
Tampilkan postingan dengan label raspberrypi. Tampilkan semua postingan

Selasa

use wifi on raspberrypi

The raspberrypi has two usb ports, so I bought a usb wifi dongle to get rid of network cable.
fast_fw150us
This dongle uses RTL8188CUS chipset, which has built-in support on the raspberrypi linux kernel. So it just worked after I plugged it to raspberrypi.
The next step is to configure the dongle so that it can connect to my wifi router. There is GUI based connection manager if you're using raspbian system image. But in my case, I use a small system image built with built from builtroot with only command line interface, I have to setup manually.
I enabled wireless tools in buildroot config, which provides tools such as iwlist, iwconfig. My wifi router, which is configured with dhcp server enabled, doesn't required password to connect. So I can setup the network with commands below:
ifconfig wlan0 up
iwconfig wlan0 essid WIFI_ESSID
udhcpc -i wlan0
Having tested the network run ok, I updated the /etc/network/interfaces file so that network would be setup automatically.
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
pre-up ifconfig $IFACE up
pre-up iwconfig $IFACE essid WIFI_ESSID
down ifconfig $IFACE down
I struggled a lot with the interfaces file due to the dhcp always failed to work. And I finally found that the connman package caused the conflict. Disable it solved the problem.

Kamis

buildroot for raspberrypi

I bought a raspberrypi to try some interseting ideas on.
raspberry_pi_image
raspberrypi provides several images for downloading, but they are too large and exceeds my needs. My desired raspberrypi image should meet:
  1. fully customizing capabilities on kernel and user applications
  2. python support
  3. standard c&c++ libiaries
  4. serial port communication with peripheral devices
Luckily, here is a buildroot project customized for raspberrypi. With buildroot, all my requirements can be easily satisfied. So I forked from the repository and made some changes, to make the targe image minimal.
  1. disable Qt5 library
  2. disable boost library
  3. change kernel to the official one maintained by raspberrypi team
To build the target image, run commands below:
cp configs/raspberry_simple_defconfig .config
make
After the build is finished. I just need to copy the output/build/linux-rpi-3.6.y/arch/arm/boot/Image to kernel.img on boot partition on the sd card, and untar output/images/rootfs.tar to root filesystem partition.
Power on, and now raspberry pi should be running our own system.