How to connect wifi network from raspberry pi 2 (snappy)

Kim Seokjun

I've set up new raspberry pi 2 with snappy core. And I couldn't find how to connect wifi network from snappy terminal.

My wifi dongle working correctly but there is no iwconfig in snappy core. Wlist not found too. Anyone can help me?

Thanks in advance.

Burly Ares

So I just received my Raspberry Pi 3 Model B in the mail and installed Ubuntu Snappy Core 16 in the recommended way. I performed the initial setup via HDMI and usb keyboard, ethernet, & DHCP. Then I created my ssh connection over ethernet and disconnected the monitor and keyboard. From there, I wanted to connect my device to WiFi and stumbled upon this post.

I like to try things without extra installations or workarounds, so I consulted Installation Tips as recommended above and saw that WPA_Supplicant was supposed to be pre-installed. With very little meddling and less effort than the Tips suggested, I found that you can configure the wifi by simply adding a config file consisting of four lines to the default location searched by wpa_supplicant and nothing else. Though it was asked a while ago about a Raspberry Pi 2 I see from recent comments that it might still be relevant and it was so simple I am inclined to share.

I know this answer looks long, but it is very simple and detailed with pictures. Anyone who has a basic knowledge of Terminal and was able to set up their raspberry Pi initially will be able to follow it.

Tl;Dr

  • Setup your Rasberry Pi and establish a LAN connection via SSH
  • Shutdown your Raspberry Pi with sudo shutdown -P now
  • Plug your SD card into a linux distro
  • In a text editor add a config file called "wpa_supplicant.conf" to the /writable/system-data/etc/ folder on the Writable partition of the SD card
  • I did this by creating the conf file on my desktop and then using sudo cp to move it to the correct directory
  • The config file should be:
    network={
    ssid="Typhon Secure" Use your network SSID
    psk="*******" Use your network Passkey
    }
  • Note: This works for Hidden Networks as well
  • Eject your SD, plug it into your Pi, boot your Pi; it should connect to your WiFi

My tutorial begins from the point of having an ssh connection via ethernet, which can be achieved by following the instructions at Ubuntu Core Get Started Raspberry Pi 2/3.

Connected via SSH

Then type wpa_supplicant and you will see that it does not need to be installed as it is pre-built into Snappy Core. As you'll see in the below images, just running wpa_supplicant will return a lot of options, but notice the last line:

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf

What this tells you is first the Driver, then the Interface, then the location that it is looking for the interface file: -c/etc/wpa_supplicant.conf

WPA_Supplicant WPA_Supplicant Continued

Now that I knew where the configuration file needed to be, I shutdown the Raspberry Pi with sudo shutdown -P now and once it shutdown; disconnected the power and inserted the SD into a linux box with Fedora. Somehow the file system shows differently so you'll find the location where wpa_supplicant.conf needs to be location is at writable/system-data/etc and the SD card mounted in /run/media/cregger/ for me, so you'll see my file path is /run/media/cregger/writable/system-data/etc/.

Nano Location

I used nano to create a new file called "wpa_supplicant.conf" with the following four lines:

network={ ssid="Typhon Secure" (My network SSID) psk="*******" (Obviously the asterisks represent my WiFi passkey) } Don't forget to terminate.

Note that this works for hidden networks with no extra configuration. My network has a hidden SSID and I changed nothing. It has WPA-PSK 2 security; pretty standard fare. Config Example

You'll notice that I saved it to the desktop. I then copied it to the proper location with terminal as it is owned by root.

Copy to SD card

Then eject your SD card from Linux, plug it back into your Raspberry Pi, plug your power source back into your Raspberry Pi; let it boot and it will seek your wifi.

You'll see in my case both Eth and Wlan have taken an IP Eth0 & Wlan0

I can now ssh via either LAN or WLAN

Double connection

I know this was long, but I hope it was helpful in helping you to keep from mucking up your FS and installing a bunch of needless applications.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to connect wifi network from raspberry pi 2 (snappy)

From Dev

How to install apache on a Raspberry Pi 2 Ubuntu Snappy Core?

From Dev

How can I install Ubuntu with APT (not Snappy) on the Raspberry Pi 2?

From Dev

how to connect to WPA2 enterprise WiFi in Ubuntu Core Raspberry Pi 3

From Dev

Connect to wifi using Python on Raspberry Pi

From Dev

Connect raspberry pi 4 with ubuntu server to wifi

From Dev

controlling windows machine from raspberry pi 2 over network

From Dev

How to find Raspberry Pi on Network

From Dev

How to share a folder on Ubuntu to Raspberry Pi 3 over local WiFi network?

From Dev

Raspberry Pi 3 - Local Static Network - Wifi and Ethernet

From Dev

Using a Raspberry Pi from another network

From Dev

Connect to iphone hotspot from raspberry pi

From Dev

Connect to rails server remotely from raspberry pi

From Dev

Which camera to connect with Raspberry pi2

From Dev

How to enable network with a raspberry pi emulated on qemu?

From Dev

How to remote connect MySQL on Raspberry Pi?

From Dev

Connect Raspberry Pi to iPhone without existing Wi-Fi network

From Dev

Is Snappy Core available for Raspberry Pi 3/4?

From Dev

Cannot install Docker on Ubuntu Snappy on Raspberry Pi

From Dev

Can't connect via LuCI or SSH from WAN side network to Raspberry Pi 1B running OpenWRT 14.07

From Dev

windows IoT compatible wifi dongle not recognised on raspberry PI 2

From Dev

Raspberry PI 3: Wireless hotspot (from WiFi to WiFi instead of ethernet to WiFi)

From Dev

How to setup of Raspberry Pi 3 onboard WiFi for Ubuntu Server with 'netplan'?

From Dev

How to setup of Raspberry Pi 3 onboard WiFi for Ubuntu Server with 'netplan'?

From Dev

Manage Wifi connections on Raspberry PI

From Dev

Raspberry Pi WiFi Repeater Issues

From Dev

How can I connect to a specific wifi network?

From Dev

How to connect to hidden wifi network using nmcli

From Dev

How can I connect to a specific wifi network?

Related Related

  1. 1

    How to connect wifi network from raspberry pi 2 (snappy)

  2. 2

    How to install apache on a Raspberry Pi 2 Ubuntu Snappy Core?

  3. 3

    How can I install Ubuntu with APT (not Snappy) on the Raspberry Pi 2?

  4. 4

    how to connect to WPA2 enterprise WiFi in Ubuntu Core Raspberry Pi 3

  5. 5

    Connect to wifi using Python on Raspberry Pi

  6. 6

    Connect raspberry pi 4 with ubuntu server to wifi

  7. 7

    controlling windows machine from raspberry pi 2 over network

  8. 8

    How to find Raspberry Pi on Network

  9. 9

    How to share a folder on Ubuntu to Raspberry Pi 3 over local WiFi network?

  10. 10

    Raspberry Pi 3 - Local Static Network - Wifi and Ethernet

  11. 11

    Using a Raspberry Pi from another network

  12. 12

    Connect to iphone hotspot from raspberry pi

  13. 13

    Connect to rails server remotely from raspberry pi

  14. 14

    Which camera to connect with Raspberry pi2

  15. 15

    How to enable network with a raspberry pi emulated on qemu?

  16. 16

    How to remote connect MySQL on Raspberry Pi?

  17. 17

    Connect Raspberry Pi to iPhone without existing Wi-Fi network

  18. 18

    Is Snappy Core available for Raspberry Pi 3/4?

  19. 19

    Cannot install Docker on Ubuntu Snappy on Raspberry Pi

  20. 20

    Can't connect via LuCI or SSH from WAN side network to Raspberry Pi 1B running OpenWRT 14.07

  21. 21

    windows IoT compatible wifi dongle not recognised on raspberry PI 2

  22. 22

    Raspberry PI 3: Wireless hotspot (from WiFi to WiFi instead of ethernet to WiFi)

  23. 23

    How to setup of Raspberry Pi 3 onboard WiFi for Ubuntu Server with 'netplan'?

  24. 24

    How to setup of Raspberry Pi 3 onboard WiFi for Ubuntu Server with 'netplan'?

  25. 25

    Manage Wifi connections on Raspberry PI

  26. 26

    Raspberry Pi WiFi Repeater Issues

  27. 27

    How can I connect to a specific wifi network?

  28. 28

    How to connect to hidden wifi network using nmcli

  29. 29

    How can I connect to a specific wifi network?

HotTag

Archive