Setting up Wifi on Zynthian


#1

Hey guys–

I have a Raspberry Pi 3 Model B V1.2, and didn’t want to bother with ethernet, so this is what I did to get my Zynthian setup to be accessible over Wifi. I’ll go ahead and note that my “box” doesn’t have any hardware other than RPi and a USB <-> MIDI cable connected to my keyboard, which I’ve mentioned in other places in the forum.

By default, the Gorgona Image does not include either the firmware for the onboard bcm Wifi of the RPi 3, nor does it have wpasupplicant, which is a Linux package that is required to configure a Wifi network adapter beyond the basics like IP address (notably, it needs to know the network ID you’re connecting to and the preshared key or password).

If you already have your Zynthian Box (RPi) connected to Ethernet, you can skip the steps for loading stuff into your SD card–you already have Internet and can just run

$ apt-get update; apt-get install -y wpasupplicant firmware-brcm80211

Apt will go and get all these dependencies for you. But if you are lazy, like me, you don’t want to have to go all the way over to your router to plugin your Pi :wink: If you’re lazy like me, you can follow these steps to load the required files onto your Zynthian SD Card:

If you plug your SD card into your card reader on your Mac or PC, you can see only the boot partition, but this is fine enough for our purposes. Once you copy something onto this “view” of the SD card, it becomes accessible to the Pi in the location /boot, so this is a great way of importing package dependencies that you don’t have yet, when you don’t have Internet. After writing this, I realized that Windows users may not actually be able to see the device at all–I leave it as an exercise to the reader to make sure you can read the SD card but it shouldn’t be too difficult. Linux users may actually be able to mount the whole card instead of just the /boot partition. Great, just copy the files in wherever you’d like them.

So, I went and grabbed the Firmware for the onboard wifi card. You’ll want to pick the mirror that’s geographically closest to you. I downloaded the .deb file onto the SD card and then booted up my Zynthian “box”, and then it’s

$ cd /boot
$ dpkg -i firmware-brcm80211.deb

This will use the Debian Package installer without going through apt-get or aptitude or anything that requires an Internet connection. A word to the wise: make sure you use the RPi to delete these files when you are done (rm firmware-brcm80211.deb) – if you delete them on your mac, like I did, it creates a .Trashes directory and keeps filling up space until you run out :wink:

As you can see, this pattern can be followed for the other .deb files that are needed for installing wpasupplicant, which I link to here:

Note that the order of installation does matter here, because some of these packages are dependent on others. Mostly, wpasupplicant is dependent on the others (and no, they are not on the image by default), and Libnl-gen-1-3-200 is dependent on Libnl-3-200.

Once you’ve got these babies installed, you reboot, and you should see your Wifi card appear as wlan0, which is the default name/number for a wireless card in Linux. From there, all you need to do is edit /etc/network/interfaces in your favorite text editor and add these lines:

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
	wpa-ssid "NETWORKID"
	wpa-psk "PRESHAREDKEY"

This is assuming you use WPA-PSK and that your home network is named NETWORKID and your preshared key is PRESHAREDKEY. Customize to your situation.

Anyway, after that, you can either reboot the Pi or just do ifup wlan0 and you should be on the internet without using pesky Ethernet cables!

Note for RPi2 Users: You can follow this process to also get your RPi 2 up and running on Wifi–but you’ll need a USB Wifi Dongle. I originally had an RPi 2 and had to go download the Firmware-Ralink package for that Dongle. Look for your manufacturer’s drivers out there on the Interwebs and then you can copy the .deb file onto the boot partition as I explained above.

Hope you enjoy.


WiFi configuration menu
WiFI interface not loading on Pi 3 B+
Wifi setup problems
Working with pure data
Text editor installed
#2

This looks great & I’ll try it out tonight! I’d realised that the Zynthian image was missing wpasupplicant but was too busy to try & get it working myself.


#3

Is any way to use more than one wi-fi ssid/password for using zynthian in different networks without file editing?


#4

@quadrica – it depends on whether you mean “in different networks” that you already know about, or different networks, meaning when you first connect to a brand new network that the Pi never knew about. If you have two Wifi Networks (or three) that you already know about and you know their SSIDs and the PSK, you can look to this forum post to see how to set up wpasupplicant to do it (in short, you just add two network blocks in the wpasupplicant config, which you’d need to use in lieu of /etc/network/interfaces probably).

If you’re trying to make it so that new networks pop up on your screen when you go to a new place, you’re probably looking for some sort of desktop UI for wifi kinda like Network Manager, but that requires installation of a full desktop environment for Linux. You could do that, of course. After you install openbox, like I suggested above, check out this post:


Which talks about how to install a Network Management GUI into a Linux desktop UI.

The other alternative is for there to be some sort of Wifi management tool built in to the Zynthian UI, which has been asked about before:


#5

Thanks for the explanation, @programsam!
WIFI support will be integrated in the next Zynthian image release! :wink:

Best Regards


#6

As in, from the Zynthian UI? That’d be so slick! Question is how you’d enter PSKs? I’m sure you’ll figure something out


#7

The “Zynthian Web Configuration Tool” is in the way. It will allow to:

  • Configure system password
  • Configure WIFI
  • Configure Hardware: wiring layouts, soundcard, display, etc.
  • Configure UI: colors, fonts, sizes, etc.
  • Edit snapshot’s names
  • Manage library for the different engines => soundfonts, plugins, presets, etc.

Initially, not all this functionality will be available, but i’m designing a clean API so everybody can contribute to improve this configuration/admin tool :wink:

Kind Regards!


#8

EXCELLENT! Looking forward to it!


#9

Sounds really good this big improvement!! Zynthian is becoming a “big boy” among open source synths in the world. Thanks to @jofemodo, @C0d3man and other active contributors.

Regards, Jose


#10

Basic WIFI support is included in the last software update:

https://discourse.zynthian.org/t/zynthian-software-upgrade-the-new-version-is-ready-for-updating/626

The Web GUI configurator tools is on the way …


#11

This is great! A post must be 20 characters.


#12

Thanks very much for this solution. Worked perfectly!


#13

I just got picked up because my reply didn’t look like a proper sentence. . . .

Now how can we work on a zynth forum without being able to say

ooOOOOOHHHhhhooooo…

?


#14

The reason might be that it prevents people to spam the forum with posts hat can be expressed with a simple like. :stuck_out_tongue:


#15

Well given most of my posts are perilously close to spam anyway, you can understand my concern!