Setting up USB WiFi dongle on Pine64

Daniel Cohen
3 min readMar 2, 2019

--

The Pine64 is a great device for a very low price, I wanted to use it to run OctoPrint for my 3D Printer, only problem is I don’t have an accessible Ethernet port close to the printer, and the Pine64 has it all but one thing, built in WiFi support. so in order to overcome this limitation I got the cheapest USB WiFi adapter I could find and went through the process of setting it up. I have documented this process for others who may have the same issues as me.

Pine A64 with TL-WN725N wireless adapter

My Setup

  • I used a Pine A64 512mb board, which I got from Kickstarter way back
  • Reliable 2A power supply, My Original Samsung Galaxy s8 charger did a great job.
  • WiFi Dongle: tp-link TL-WN725N V3

Create a fresh Linux boot drive

So we’ll start by flashing a base image on and SD Card so we can have a fresh start
Download Linux base image, I Used Xenial Base Image [20161218–1] by longsleep.
Take Note of the version, if you use something else your results may vary.

Get balenaEtcher, it is free, open-source and easy to use,
Choose the image archive file, Choose SD card and Flash!

Note: There is no need to unzip the archive & no need to format the SD card, belenaEtcher does that for you.

belenaEtcher — choose image, SD card, and flash

Setup Environment

insert the SD card into the Pine64 board, connect ethernet, connect power and wait for it to boot up
default user: ubuntu, password: ubuntu

1. First thing is to change the default password, type passwd and follow the instructions
2. next we need to resize the root partition so we can use the space not used by the operating system: sudo /usr/local/sbin/resize_rootfs.sh
3. update package indexes: sudo apt-get update
4. upgrade versions of all packages currently installed: sudo apt-get upgrade

Setup the Driver

Now that we have a clean install of our operating system we can move on to setting up the Dongle driver

  1. first we need to install some dependencies sudo apt-get install git build-essential network-manager
  2. Make sure we’re in the default home directory: cd ~
  3. Get the driver source code: git clone https://github.com/lwfinger/rtl8188eu
  4. Go into the directory we just cloned: cd rtl8188eu
  5. OPTIONAL: if you want the exact version I used while writing this use git checkout 9a56f32
  6. build the driver: make all
  7. install the driver: sudo make install
  8. Disconnect ethernet cable
  9. Reboot the system: sudo reboot

Connect to WiFi

so now we have an installed driver and we’re ready to connect to our WiFi network
1. To see list of interfaces ifconfig -a, The dongle should show up as wlx followed by the mac address of the device e.g wlxXXXXXX
2. Turn on the WIFI Dongle: nmcli r wifi on
3. To see list of available WiFi hotspots: nmcli f wifi list
4. Connect to network: nmcli d wifi connect SSID password PASSWORD(SSID is the name of your wifi hotspot)
5. Make sure it works: ping 1.1.1.1

And that’s it! now you have a wireless Pine64 board!

--

--