Search This Blog

Showing posts with label WiFi. Show all posts
Showing posts with label WiFi. Show all posts

Tuesday, 29 August 2017

Raspbian scratch wlan static IP configuration

After LOTs of reading, getting my Pi A+ onto a static IP was actually straightforward.  From a clean scratch lite install (i.e. NOT a jessie upgrade).

Get this thing working using DHCP:

network={
    ssid="MySSID"
    psk="pa$$word"
}
reboot

use $ ip link show to check what the interface is called.  Mine was wlan0

Consider using a DHCP reservation on the DHCP server.  This is a problem if you're running an ASA as your DHCP server as it doesn't appear to support this...

Edit the DHCP Client Daemon config to force a static address:

interface wlan0
static ip_address=192.168.1.123/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
192.168.1.1 is the gateway address of my inside segment

reboot


There's a great thread about this here



Also, you may need to enable SSH for scratch.  This worked for me:

sudo touch /boot/ssh

Thursday, 7 January 2016

Raspberry Pi Zero WiFi adapter

Having got my shiny new Pi Zero up and running I figured it would be nice to get it talking to the WiFi without the (relatively speaking) huge USB and WiFi dongle adaptor hanging out of one side.

This is the "finished" product:


I left the HDMI adaptor in for scale, although I now simply communicate with it over the network using SSH.  The heat shrink on the actual WiFi board isn't as neat as I would have liked, but this was my first go at building one.  In future I'll use a micro USB adaptor with an elbow on it and shorten the cable so it can sit parallel with the edge of the Pi.  I might also consider soldering the WiFi adaptor straight to the Pi - the board I have here fits neatly over the Pi logo without impeding the GPIO headers (if they were installed of course).

The build wasn't any more complex that you'd think, although it was very fiddly.  I bought one of these from eBay for £2.50:

I very carefully levered the plastic bit off and the circuit board slid out of the metal housing with no resistance.



Unfortunately this is the only picture I took that came out OK.  Approximately half of the board it under the tape (I had it stuck down so I could solder it).

I then hacked up an old cable I had lying around, spent a little while figuring out what cable when to which connector and soldered it all together.

 

Finally I used some heat shrink to make it relatively robust and electrically insulated.  I've not tested it outside my office, but it's working as well as it was when it was in it's original state and plugged into the Micro to standard A size USB adaptor.

Sunday, 3 January 2016

Raspberry Pi A+ Digitazz WiFi settings

These settings seem to work OK on my Pi A+ with a cheap WiFi dongle (WIFI 150MBPS WIRELESS ADAPTOR 802.11 B G N LAN NETWORK MINI USB DONGLE ADAPTER)

/etc/network/interfaces

auto lo
iface lo inet loopback

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

 (yeah, I know, there are probably better ways of doing this...)

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="XXXXXX"
        psk="XXXXXX"
}

Sunday, 14 September 2014

Raspberry Pi Edimax EW-7811Un USB WiFi Adapter

So, I wanted to get my Raspberry Pi working wirelessly.  I purchased an Edimax EW-7811Un USB WiFi Adapter which proved to be tricky to configure.  Friends have had success with other cheap USB devices too, but this one works OK.  I eventually got it working, so here are some brief notes.

This is the box it came in:



This is what it looks like:

I found a really good site - there are loads more details there:

http://www.savagehomeautomation.com/projects/raspberry-pi-installing-the-edimax-ew-7811un-usb-wifi-adapte.html

If you're a complete Linux noob (like me), there are loads of interesting things to learn from that page.

This is my config.  I ONLY have config in /etc/network/interfaces - I've NOT used the wpa_supplicant.conf file.

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
wpa-ssid YOURSSIDHERE
wpa-psk YOURPASSWORDHERE
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

iface default inet dhcp



And that's it!  You'll need to enter the WPA details for your network - these are whatever you set in your access point (if you're not sure what I mean, you really need to go play with your router and/or access point and learn this stuff first).

The IP settings here are for a Sky router that defaults to a 192.168.0.0/24 subnet, but you can adapt these numbers for your own network.  If you're not sure what subnet your network uses, do an "ipconfig" (or ifconfig if you're linux) and figure out what's being used on a computer that's already working OK.  If you're not sure what I'm on about here, then I'd suggest Googling around IPv4 subnets first :)

Hope this helps!