New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WTF! No WiFi support on the Raspberry Pi 3? #60

Closed
bkarpe opened this Issue Jul 4, 2017 · 19 comments

Comments

Projects
None yet
@bkarpe
Copy link

bkarpe commented Jul 4, 2017

I just wasted a whole day of my life that I'll never get back. How could you not include WIFI support? I guess it's back to Raspbian.

@StefanScherer

This comment has been minimized.

Copy link
Member

StefanScherer commented Jul 4, 2017

HypriotOS has the UART enabled to be able to connect a USB2Serial cable to watch and debug headless booting.
Unfortunately Raspberry Pi org decided to put onboard WiFi and UART on the same pins. So you have to turn UART off in /boot/config.txt

I have tested a Pi Zero a couple of weeks ago and had no HDMI adapter so I was forced to boot it headless.
Run our flash script that does the change automatically to have a wireless out-of-the-box experience on first boot.

flash --bootconf config-no-uart.txt --config wifi.yaml hypriotos-rpi-v1.4.0.img.zip
  • config-no-uart.txt
hdmi_force_hotplug=1
enable_uart=0

# camera settings, see http://elinux.org/RPiconfig#Camera
start_x=1
disable_camera_led=1
gpu_mem=128

# Enable audio (added by raspberrypi-sys-mods)
dtparam=audio=on
  • wifi.yaml
hostname: black-pearl
wifi:
  interfaces:
    wlan0:
      ssid: "MyNetwork"
      password: "secret_password"

Hope that helps with your project.

@StefanScherer

This comment has been minimized.

Copy link
Member

StefanScherer commented Jul 8, 2017

Added these steps to our FAQ

@stkatie

This comment has been minimized.

Copy link

stkatie commented Sep 20, 2017

Hi Stefan. Raspberry pi3 will not init wlan0 for wifi unless the ethernet cable is plugged in and connected to the network. The Pi will be eventually assigned two IP addresses, both of them work. If there's no ethernet, the wlan will not be brought up and there's no IP. This is concerned Raspberry pi3 not the Raspberry pi0.

The config.txt is default, with or without enable_uart=0
/boot/config.txt:

hdmi_force_hotplug=1
enable_uart=0

start_x=1
disable_camera_led=1
gpu_mem=128

dtparam=audio=on

The WLAN config file
/boot/device-init.yaml:

hostname: black-pearl

wifi:
interfaces:
wlan0:
ssid: "<router_ssid>"
password: ""

The Ethernet config file
/etc/network/interfaces.d/eth0:

allow-hotplug eth0
iface eth0 inet dhcp

It seems that this issue has been replicated by a number of users. Where do you think I should look first trying to fix that?
thanks!

@dominikschubert

This comment has been minimized.

Copy link

dominikschubert commented Nov 14, 2017

Should be reopened. There is no wlan0 interface when running ifconfig on a clean HypriotOS install on Raspberry Pi 3

Was wondering why it wouldn't connect to the WiFi network

@StefanScherer

This comment has been minimized.

Copy link
Member

StefanScherer commented Nov 29, 2017

@dominikschubert Please read the full ticket.

I've tried that today. You have to modify the /boot/config.txt´ and change the UART setting to enable_uart=0.

UART is turned on by default to investigate the boot with an USB Serial cable and Raspberry Pi 3 uses either WiFi or UART on the same pins.

Let me know if you then can have your wireless RPi3 running.

@jakkrits

This comment has been minimized.

Copy link

jakkrits commented Dec 2, 2017

I'm having the same problem. Still can't get wireless running after setting uart=0.

@davidsoloman

This comment has been minimized.

Copy link

davidsoloman commented Dec 7, 2017

I am also having the same problem after setting "enable_uart=0". Is there any fix for this problem?

@firecyberice

This comment has been minimized.

Copy link
Member

firecyberice commented Dec 7, 2017

With our latest release of HypriotOS there is no device-init anymore see Breaking Changes in the release notes. But here is an example how to use cloud-init instead.

@goughjt

This comment has been minimized.

Copy link

goughjt commented Dec 13, 2017

I was able to get wifi to work on boot with HypriotOS v1.7.1 and Raspberry Pi 3 so I'm going to share how I did it:

flash --bootconf ./boot-config.txt --userdata ./user-data.yml --hostname <hostname> https://github.com/hypriot/image-builder-rpi/releases/download/v1.7.1/hypriotos-rpi-v1.7.1.img.zip

The flash command is installed from https://github.com/hypriot/flash, of course.

The boot-config.txt and user-data.yml files can be found here:
https://gist.github.com/goughjt/9a7e9b66217bda54893cb1474fa0968e
and here:
https://gist.github.com/goughjt/b121832bf6371b69794c2ecb43310be1

In the flash command you will have to provide your own <hostname> and in user-data.yml you will have to provide your own <hostname>, <username>, <ssid>, <psk> and <ssh-rsa-contents>. If you don't know how to make the <ssh-rsa-contents> then you need to $ man ssh-keygen. Good luck, me hearties.

EDIT: This actually only works for me if I first ssh onto the Pi using a wired ethernet cable. For some reason, doing this makes the pi look for the wifi network.

@davidcittadini

This comment has been minimized.

Copy link

davidcittadini commented Dec 20, 2017

I tried that on my RPi3 with with HypriotOS v1.7.1 and I can see wlan0 if I perform an ifconfig. I can see all the WiFi networks if I perform a iwlist wlan0 scan. However, the inet addr details for wlan0 are not complete, they are blank

@goughjt

This comment has been minimized.

Copy link

goughjt commented Dec 20, 2017

@davidcittadini How long did you wait? For some reason it sometimes takes a new pi a few minutes to connect to the wireless network. I don't know why.

@davidcittadini

This comment has been minimized.

Copy link

davidcittadini commented Dec 20, 2017

@goughjt About 12 hours ¯_(ツ)_/¯ . I am going to try another distribution and see if that makes a difference.

@goughjt

This comment has been minimized.

Copy link

goughjt commented Dec 21, 2017

@davidcittadini OK, good luck. If I ever encounter the same problem and find a solution, I will certainly post it here. I hope you find a way.

@andrejcesen

This comment has been minimized.

Copy link

andrejcesen commented Dec 27, 2017

@davidcittadini Facing the same problem... found out anything perhaps?

@davidcittadini

This comment has been minimized.

Copy link

davidcittadini commented Dec 31, 2017

@andrejcesen Unfortunately I am not going to get back to this problem for a month or so. However, thinking about it, I think that there is an 80% chance that if I change the WiFi router encryption from WPA2/WPA to WPA2 only that it may solve the solution. Try it an let me know if that actually works.

@dpatrascu

This comment has been minimized.

Copy link

dpatrascu commented Dec 31, 2017

I am using RPi3 with with HypriotOS v1.7.1 and I can't see wlan0 but the following solution work for me.

  1. After flashing the image on micro SD card, open in Windows the file user-data and uncomment the following lines as in the picture below (I use "visual studio code" as editor for easy view):

hypriot_wifi

  1. In the file config.txt I changed the setting to enable_uart=0
    After inserting the card in RPi3, the wifi is available.
@andrejcesen

This comment has been minimized.

Copy link

andrejcesen commented Jan 2, 2018

Ok, so I managed to get it working without a hitch by using DieterReuter’s build. Seems to be some kind of a problem with Hypriot’s usage of user-data.

@ulm0

This comment has been minimized.

Copy link

ulm0 commented May 26, 2018

After a lot of attempts to get Wifi working with user-data interface is still down

$ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:d5:07:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.32/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::d604:d6a:8d0f:cfa4/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:27:eb:80:52:09 brd ff:ff:ff:ff:ff:ff

cloud-config:

#cloud-config
hostname: Millennium-Falcon
manage_etc_hosts: true
users:
  - name: pirate
    gecos: "Hypriot Pirate"
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash
    groups: users,docker,video,input
    plain_text_passwd: hypriot
    lock_passwd: false
    ssh_pwauth: true
    chpasswd: { expire: false }
# locale: "en_US.UTF-8"
# timezone: "America/Santiago"
# package_update: true
# package_upgrade: true
# package_reboot_if_required: true
package_upgrade: false
# packages:
#  - ntp
write_files:
  - content: |
      allow-hotplug wlan0
      iface wlan0 inet dhcp
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
      iface default inet dhcp
    path: /etc/network/interfaces.d/wlan0
  - content: |
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      network={
      ssid=[NETWORK]
      psk=[REDACTED]
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP
      auth_alg=OPEN
      }
    path: /etc/wpa_supplicant/wpa_supplicant.conf
runcmd:
  - [ systemctl, restart, avahi-daemon ]
  - [ ifup, wlan0 ]
bootcmd:
  - [ ifup, wlan0 ]

No wifi config is written to disk.

@Bootsektor

This comment has been minimized.

Copy link

Bootsektor commented Jun 30, 2018

so it is still broken? no config is written to disk !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment