Use two wireless network interfaces on Raspberry Pi 3

Recently I have made some physical changes to my home network. Moved the WiFi router to a more central position to get better coverage, but that meant also my main media player running Xbian could no longer be connected via Ethernet cable, but had to switch to WLAN.

Well wireless adapter on Pi3 is ok for basic stuff, but it does not have good antenna to achieve better network quality or it could run at least 150Mbits which I required.

I remember I had couple of Realtek 300Mbit USB sticks bought long time ago that I was not using. Everything was OK when I switched from cable to WLAN1 (let’s call this my Realtek Card, WLAN0 is the built-in RPi3).

At that time my WLAN0 was disabled, since I was not using it by blacklisting the modules in /etc/modprobe.d/xbian.conf

alias char-major-89 i2c-dev

blacklist evbug
#blacklist brcmfmac
#blacklist brcmutil

As soon as I wanted to use both WLAN0 and WLAN1, my WLAN1 stopped working. Device was detected, module was loaded, but no wlan1 device was created.

I searched for such issue and found something similar with proposed fixes, so I tested it and surprisingly it works.

Main thing is the order of loading the kernel modules. Because if RPi3 built-in adapter loads first you will have an issue where wlan1 will not appear. You need to plug out / in the USB adapter to get it recognized or to remove and insert the kernel r8712u module.

Easiest way to fix the issue for me was to add these 3 lines to /etc/modules at the end of the file:

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.


This meant that my Realtek card will get detected before the built in one and therefore it will have the wlan0 name and wlan1 will be rpi3 adapter.

Because your device names are also created inĀ /etc/udev/rules.d/70-persistent-net.rules you need to make appropriate changes there to change built-in adapters name to wlan1 and USB adapter to wlan0:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# USB device 0x:0x (smsc95xx)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:04:64:20", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# Unknown net device (/devices/platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0) (brcmfmac_sdio)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:54:24:45", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

# USB device 0x:0x (r8712u)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:a1:b0:42:56:4c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

Reboot and you should have both adapters working with external one as wlan0 and built-in one as wlan1.

Vitality #3 by Albion Crew


In order to document all the stuff I have done during my C64 era, I am trying to collect all the works.

One of them is an article I wrote for a magazine done by Albion Crew from Poland.

It was long time ago. To be precise in 1997 I wrote an article for Vitality disk magazine for Commodore 64. It was about spectacular U2 concert in Sarajevo held couple of years after the war in Bosnia & Herzegovina.

If you want to read the whole artice I wrote you can download the magazine from this link.

Mirror link to CSDB.

128GB Samsung Micro SDXC EVO+ works on Sony Xperia Z2 LTE Tablet

I used to have 64GB micro SDXC card in my Xperia Z2 LTE tablet, but space became inadequate so I started to think about upgrading it. I needed more storage but according to GSMArena this tablet could handle up to 64GB. I did some research and saw that there are reports of users with 128GB cards.

I decided to test it since I really needed more space. In the past I was really satisfied with Samsung EVO+ sd cards 32/64GB capacity so I decided to try 128GB one from Samsung.

I ordered it from my favourite eBay seller sinceritytrading for $38.79 with free shipping. Here is the direct link to the card.


Card arrived in 6 days, which is a record so far since shop is located in Hong Kong and I am in Bosnia & Herzegovina. Sinceritytrading always had fast shipping but this was a record.

By default it is formatted to exFat so I inserted it in my tablet and it was recognized as 120GB card. I guess you always loose some space in the overhead GiB/GB calculations.

I decided to copy all content from my existing 64GB card to the new one using laptop. Old card was in laptop SD card slot with adapter, and tablet was connected via USB cable to the laptop. Copying went smoothly and pretty fast.

Samsung EVO+ even feels faster than my previous Toshiba 64GB card, especially when browsing trough album with 20MP photos it feels more responsive.

All in all I recommend this card for your tablet and can confirm it works out of the box.

High Performance USB stick formatting with ext4

To format my USB sticks that I use following set of commands:

Assuming my USB stick is recognized as sdc, and has a primary partition created this is the set of commands that I use:

# create ext4 filesystem without journal
mkfs.ext4 -O ^has_journal /dev/sdc1

# give your newly formatted partition a name
e2label /dev/sdc1 storage

# Use data mode for filesystem as writeback for better performance
tune2fs -o journal_data_writeback /dev/sdc1

# Disable reserved space on my 57GB drive it wastes 5% which is 3GB
tune2fs -m 0 /dev/sdc1