Using a wifi adapter

So after a little tinkering, I figured out that the dongles only worked when trying to hop onto a 2.4 Ghz channel, my 5 Ghz channel gave a error with sched scan. I think this has to do with setting the freq ranges by country but I didn’t experiment with that.

At any rate, I got all three adapters to work with Owen’s commands and without having to remount the root directory in read/write mode.

To get the party started, follow the directions below:

wpa_supplicant -D nl80211 -i wlan0 -c <(wpa_passphrase "Wifi name" "Wifi password") &```

After that is running, you may need to barter a DHCP lease from your router with:

 `dhcpcd wlan0`  

But, you should only need this once if you use the same wireless adapter.

Confirmed wireless adapters that work:

- [Official Raspberry Pi Wifi Adapter](https://www.adafruit.com/products/2638?gclid=COWunsHQhMsCFQsDaQodrIcI-A)
- [Edimax EW-7811Un](http://www.amazon.com/Edimax-EW-7811Un-150Mbps-Raspberry-Supports/dp/B003MTTJOY)
- [Tenda W311M](http://www.amazon.com/Tenda-W311M-150Mbps-Wireless-Adapter/dp/B006GCYAOS)

Hope this helps!
2 Likes

This is great info! Thanks! I have the Edimax, and also have used the original WiPi successfully.

Thanks for all this info! Works fine here now.

I tried your setup help and could easily get everything to work with my Edimax adapter. However when I restart Organelle nothing happens and the Wifi adapter doesn’t get recognized. What am I doing wrong?
Or do I have to type all the setup in again after each restart?

Yep, I believe you’ll have to bring the interface up each time you reboot, modidy the wpa_supplicant.conf, or write a quick script that brings it up on boot.

I could probably cobble together a quick bash script that does this when I have some free time.

If anyone is interested in scripting this, you can do the following:

wifi.conf

ctrl_interface=/var/run/wpa_supplicant
network={
    ssid="your-network"
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="your-network-password"
}

wifi.sh

#!/bin/sh
ip link set wlan0 up
wpa_supplicant -D nl80211 -i wlan0 -c wifi.conf &
dhcpcd wlan0

Then, just run ./wifi.sh, or make it run automatically on boot if you wish.

This is great, thanks for sharing.

I’ve been experimenting a bit with WiFi and testing out various WiFi adapters. I’ve found this one works really well:

It is the same as the WiPi adapter which also works well

It uses a common Ralink 5370 chip. Not all adapters are created equal, and some are very cheap… but these two have worked well.

1 Like

hi folks

i am about to embark on a linux project with my 2nd organelle~ and i was wondering what if/any wifi adapters may work from somehwere like Ye olde Best Buy Shoppe.

http://www.bestbuy.com/site/searchpage.jsp?id=pcat17071&st=usb+wifi+adapter

Ye Ol’ BestBuyShack actually has a way of sorting USB WiFi adapters that work on linux. I bet you’ll find something here that works:

http://www.bestbuy.com/site/shop/wireless-adapters-for-linux

actually i didn’t i found an OLD netgear 54Mbs WIFI adapter and it works
I am new to arch linux though, how do i update my repositories without a full system upgrade?
I do not want to break anything

Have you guys synced up tempo with Ableton Link with any of these wifi adapters?

not yet but there’s an external for it that i am going to toll out soon, WIFI works so it should not be a big deal

I got the Ableton Link external working a while back, but haven’t done much with it. It worked well so far, staying perfectly in sync with rest of devices on network. Here is the external:

1 Like

there you go!
including it in patches should be a button or wake when it sees the wifi

to get your wifi (or other network) connected at boot you can use netctl

what I did was:

  • ~/script/remount-rw.sh
  • use above to get an initial wifi/internet connection.
  • edit /etc/ssh/sshd_config, change PermitRootLogin to yes
  • change root passwd, so I could login remotely.

then

pacman -Syy
pacman -S dialog
wifi-menu -o   
netctl enable <profile created>

basically this, updates the pacman database, installs the dialog package (needed by wifi-menu), allows you to enter the wifi setup, then netcrl enable uses the created profile and boot time.
(if you have multiple wifi or ethernet you can use netctl to select different network profiles)

1 Like

that all worked for me but I also needed to run dhcpcd wlan0

I think this is what I did to fix that (I did some other stuff that I think was pointless so missing that out):

remounted file system as rw (./scripts/remount-rw.sh)
systemctl enable dhcpcd
then
cd /etc/systemd/network
cp eth0.network wlan0.network
edited wlan0.network to change the name to wlan0

rebooted and test - worked!

the stuff I did that I think was pointless was the last post here https://unix.stackexchange.com/questions/303599/arch-linux-dhcpd-wont-start-on-boot-cannot-find-subnet-declaration

in passing:

how cool is it that my new little gadget has vim installed :wink:

this was my first proper encounter with systemd - I normally get my employees to do this kind of thing these days (for work stuff obviously) :slight_smile:

1 Like

little tip - guessing most of the advanced users here know this but I’m a fan of explicit instructions :slight_smile: :-

if you have your wifi working and install rsync you can just copy stuff directly to the organelle rather than moving the usb drive all the time:

./scripts/remount-rw.sh
pacman -S rsync

you can then rsync from your local machine:

cd
rsync -rltDv organelle:/usbdrive/Patches/

the flags stop it trying to set the owner and group which since I’m logged in as root rysnc doesn’t like

I’ve got the organelle setup in my .ssh/config so it uses user ‘root’ and sets my x forwarding so you may need to tweak the rsync to add a user etc depending on how you have it setup

you still need to select ‘reload’ on the main menu for it to pick up patches of course

@oweno
so Ive been test TB22tb9 , to check that a vanilla organelle can now access X/ssh without resorting to using an HDMI display for initial setup
… so the goal is: fresh organelle, insert wifi card, run startwifi, be able to login/run X remotely
the good news is this now works :slight_smile:

but whilst doing this, I had a pretty frustrating time, getting startwifi to work, as theres absolutely no feedback as to whats going on… so Ive improved the start wifi script (attached)
it nows gives feedback to the oled whilst its running, and also produces a logfile for each commend in /usbdrive/wifi_log.txt, which gives you a chance to check when theres errors (without having to attach to a tv :))

(I also fixed an issue: you need #!/bin/bash at the start as <( … ) is specific to the bash shell)

StartWifi.zip (509 Bytes)

still some room for improvement:
a) check return codes, so the oled (OK) means more than the command ran
b) display IP address at the end.
c) I also think probably we are better with a wifi config file, such that users cannot accidentally ‘damage’ the script whilst entering their username / passwd.

anyway, perhaps take a look and decided if you would like to update the C&G version

Thanks for this improved script, much better to see what is going on! I remember trying to get the thing online when I didn’t have an HDMI cable, only to finally realize I had edited the file with TextEdit on a mac and it changed the quote characters around the password in the wpa_supplicant command to the unicode ones. this would be alleviated by your improvement ©.

what do you think a good mechanism for returning a general ‘network connectivity’ status? I use this following script to spit out the IP address to OLED using some fragment I found. It returns the IP address when up, but I don’t recall what it does when not online.

the two scripts could be combined, so if the network is already up it just displays the IP (and ideally ssid, hostname, whatever else), otherwise it does the connection sequence.

IP Address.zip (1.1 KB)

or might be better for the wifi connect script to also use netctl and wifi-menu (this one is leftover from early Organelle proto running Yocto linux).

I realized wifi-menu is a shell script that makes calls to the dialog command for selecting a network and entering password. These calls could be replaced with scripts that did the same thing on the OLED: select from a list of networks, and enter the password using the encoder (annoying, but only have to do it once, or it could check for a file on the usb if you wanted to just put password there).