LEDE in RPI3 with LuCI Interface

This is a continuation to LEDE in RPI3 with 64-Bit kernel. We are going to enable the web interface support for LEDE which is provided by the LUCI interface. This is very useful as it is much much easier to configure the device using the web interface. Luci was part of openwrt itself and its support has been extended to LEDE also.

Enable LUCI in LEDE

First we need to update the feeds so that luci shows up in the menuconfig menu.

kasi@Vostro:/Sourcefiles/git/lede$ ./scripts/feeds update

This will update the feeds which is used by LEDE build environment.

Then we need to install luci

kasi@Vostro:/Sourcefiles/git/lede$ ./scripts/feeds install luci
Installing package ‘luci’ from luci
Installing package ‘luci-mod-admin-full’ from luci
Installing package ‘luci-base’ from luci
Installing package ‘luci-lib-nixio’ from luci
Installing package ‘luci-lib-ip’ from luci
Installing package ‘luci-lib-jsonc’ from luci
Installing package ‘luci-theme-bootstrap’ from luci
Installing package ‘luci-app-firewall’ from luci
Installing package ‘luci-proto-ppp’ from luci
Installing package ‘luci-proto-ipv6’ from luci
kasi@Vostro:/Sourcefiles/git/lede$

Luci modules installed into the config can be enabled separately from the menuconfig which we will be doing below. As we have updated the feeds and installed luci using the above commands we now need to select them from the menuconfig menu.

kasi@Vostro:/Sourcefiles/git/lede$ make menuconfig

From the menu first check whether Luci option is listed as below.

1_luci
Top Level — Luci option

If Luci and its related modules can be seen in the menu then they can be enabled/disabled as per the need. For simplicity’s sake all modules has been enabled (Luci->collections-> then select luci there) as below.

2_luci_inside_collections
All Luci modules selected

Now its time to save the config and exit this menu.

We can now start the build with make command, This build will be much more quicker than the initial build which was done in the previous blog. When the build is complete the images will be available in “bin/targets/brcm2708/bcm2710/” (pls check the previous blog for more details).

kasi@Vostro:/Sourcefiles/git/lede$ ls -lh bin/targets/brcm2708/bcm2710/
-rw-r–r– 1 kasi kasi 633 Jul 10 15:26 config.seed
-rw-r–r– 1 kasi kasi 2.9K Jul 10 15:28 lede-brcm2708-bcm2710-device-rpi-3.manifest
-rw-r–r– 1 kasi kasi 8.1M Jul 10 15:28 lede-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz
drwxr-xr-x 2 kasi kasi 4.0K Jul 7 23:26 packages
-rw-r–r– 1 kasi kasi 495 Jul 10 15:28 sha256sums
kasi@Vostro:/Sourcefiles/git/lede$

Unzip & load into Micro SD card

As we have successfully built the LEDE image for RPI3 we can now unzip it and load it into an Micro SD card. This is a similar to what we have done before.

kasi@Vostro:/Sourcefiles/git/lede$ cd bin/targets/brcm2708/bcm2710/

kasi@Vostro:/Sourcefiles/git/lede/bin/targets/brcm2708/bcm2710$ gunzip lede-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz

kasi@Vostro:/Sourcefiles/git/lede/bin/targets/brcm2708/bcm2710$ sudo dd if=lede-brcm2708-bcm2710-rpi-3-ext4-sdcard.img of=/dev/mmcblk0 bs=4M

kasi@Vostro:/Sourcefiles/git/lede/bin/targets/brcm2708/bcm2710$ sync

After successfully executing the above command we can insert this MicroSD card into RPI3 and power it up.

Browser Access

Now how can we access RPI3 through browser. It doesn’t have an IPv4 address yet.

No problem, we are going to assign one to it. Let us access the device through SSH as said in the previous blog  using IPv6 link local address. Since we are now able to reach the device through SSH let us assign an IPv4 address to the device. Before doing that as we have directly connected RPI3 to the host machines Ethernet port let us first assign a static IPv4 address to the host machines Ethernet interface then assign an IPv4 address to RPI3 Ethernet interface which should be also in the same range.

For example, in the host machine for Ethernet interface we have assigned “192.168.10.2” IPv4 address statically. As we have already sshed into RPI3 (through IPv6 address) let us go ahead and assign a static address for the ethernet interface which is in the same range as above. For some reason ethernet interface was bridged in RPI3 and we need to assign IPv4 address to the bridge interface in RPI3 rather than the actual Ethernet interface. Pls see below for the exact command.

br_lan_address
br-lan interface assigned with 192.168.10.3 IPv4 address

We have actually assigned “192.168.10.3” to the bridge (br-lan) interface of RPI3. We can check the connectivity between the host machine and RPI3 with a simple ping test. If ping works then we can access RPI3 using its bridge interface’s IPv4 address from the host machine using a web browser. 

luci_1
Login/Main Page of RPI3 running LEDE with LuCI

Just press enter on the above page and you will be taken to the below page.

luci_2.png
Status Page

The webGUI has a lot of options which can be tuned according to our needs. For example, SSID of RPI3 has been changed from LEDE to RPI3LEDE as below

luci_3
WIFI in RPI3

So many options and configurations are available in the LEDE build and we can also add our packages into the build as it is very simple to do so.

Hope these two blogs/posts helped you to configure and load LEDE into RPI3. Same procedure could be used for other targets also if supported by LEDE.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s