Wifi debian raspberry pi

Installing Debian ARM64 on Raspberry Pi 3 with WiFi

Most users are probably using Raspbian on their Raspberry Pi 3. However, Raspbian is designed for all Raspberry Pi devices, back to the original Raspberry Pi, which is ARMv6 with an FPU. This does not take advantage of the 64-bit support on the ARMv8 CPU on the Raspberry Pi 3.

Debian has offered ARM64 support for a while, and being the base distribution for Raspbian, is quite similar. Conveniently, there is a pre-built Debian image for Raspberry Pi 3. You can download it and copy it to a SD card, and it should work out of the box.

On Linux, the simple dd command showed on the Debian Wiki works. On other platforms, notably Windows, Etcher is reputed to work well and has an easy interface.

The one flaw with this image is that the WiFi does not work.

Update: The 20180108 image now works with WiFi out of the box. The following instructions are no longer necessary.

To make WiFi work, you will have to recompile the kernel. You can follow the instruction below to cross compile the kernel on amd64, or you can use my .deb package of a kernel that works with the WiFi chip on the Raspberry Pi. You are suggested to build your own kernel, however, so that you can have full confidence in its authenticity.

In any case, you have get the linux-image file, which is linux-image-4.13.0-1-arm64_4.13.4-2_arm64.deb in this case, somehow, onto your Raspberry Pi, and you can run the following command to install the kernel and reboot:

dpkg -i linux-image-4.13.0-1-arm64_4.13.4-2_arm64.deb 

Detailed instructions to build Debian kernel 4.13.4-2 for arm64

The basic idea of cross compiling the kernel can be found on the Debian Wiki. You will just have to add CONFIG_BRCMFMAC_SDIO=y to debian/config/arm64/config before the make setup step.

Читайте также:  Пароль от wifi dns

This is an example that you can adapt to your own needs:

sudo apt install fakeroot git kernel-wedge quilt ccache crossbuild-essential-arm64 mkdir ~/build-kernel cd ~/build-kernel wget https://cdn-aws.deb.debian.org/debian/pool/main/l/linux/linux_4.13.4.orig.tar.xz git clone -n https://anonscm.debian.org/git/kernel/linux.git debian-kernel cd debian-kernel git checkout -b buster debian/4.13.4-2 export $(dpkg-architecture -aarm64) export PATH=/usr/lib/ccache:$PATH export DEB_BUILD_PROFILES="nopython nodoc pkg.linux.notools" export MAKEFLAGS="-j$(($(nproc)*2))" fakeroot make -f debian/rules clean fakeroot make -f debian/rules orig fakeroot make -f debian/rules source echo CONFIG_BRCMFMAC_SDIO=y >> debian/config/arm64/config fakeroot make -f debian/rules.gen setup_arm64 fakeroot make -f debian/rules.gen binary-arch_arm64 

The completed .deb package can be found in ~/build-kernel/linux-image-4.13.0-1-arm64-dbg_4.13.4-2_arm64.deb .

Firmware

The image is also missing the firmware file brcm/brcmfmac43430-sdio.txt . This file can be obtained from Raspbian. You can download the .deb file for firmware-brcm80211 and extract /lib/firmware/brcm/brcmfmac43430-sdio.txt and put it onto your Debian install.

The following command downloads this file for your convenience:

wget https://dl.quantum2.xyz/rpi3/brcmfmac43430-sdio.txt -O /lib/firmware/brcm/brcmfmac43430-sdio.txt 

Reboot and WiFi should work. Try iwlist wlan0 scan . Happy hacking!

You may also be interested in…

I’ve introduced my own mirroring service for open source software at mirror.quantum5.ca. Here’s how it works.

A journey through setting up PTP with both hardware and software timestamping to broadcast the PPS signal I obtained earlier.

A journey through hooking the PPS timing signal of a GPS receiver into a serial port to make a stratum 1 NTP server.

About me

My name is Guanzhong Chen, also known by my username, quantum .

I am a software developer at Stripe, a software engineering graduate from the University of Waterloo, and co-founder of DMOJ, the most popular programming contest platform in Canada.

Читайте также:  Send file to android wifi

Support me

If you like my content and would like to show your appreciation, feel free to support me and offset some of my costs:

Источник

How to set up Wi-Fi on Debian running on the Raspberry Pi 4

How to set up Wi-Fi on Debian

First off, as a prerequisite it is needed to have a CLI access to the Debian OS. It can be done using a keyboard and a screen connected to the Raspberry Pi, or using a SSH connection. If you have followed the post of how to install Debian On a Raspberry Pi 4, you should be able to access with SSH using the Ethernet (RJ45) port.

Also, you should have the SSID and the password of your Wi-Fi connection, and it should be enabled the DHCP protocol in your router.

Initial situation#

In the initial situation we have 3 interfaces defined: lo , eth0 (the only one with IP address), and wlan0 , the protagonist of this post.

root@medusa:~# ip address 1: lo: 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: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether e4:5f:01:d9:eb:3a brd ff:ff:ff:ff:ff:ff inet 10.0.4.210/24 brd 10.0.4.255 scope global dynamic eth0 valid_lft 83280sec preferred_lft 83280sec inet6 fe80::e65f:1ff:fed9:eb3a/64 scope link valid_lft forever preferred_lft forever 3: wlan0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether e4:5f:01:d9:eb:3b brd ff:ff:ff:ff:ff:ff root@medusa:~# 

Configure the WLAN interface (Wi-Fi)#

To configure the Wi-Fi interface, it is needed to know the SSID of your Wi-Fi connection, and the password.

Читайте также:  Нужен вай фай антенну

Next step is to edit the wlan0 file interface:

vi /etc/network/interfaces.d/wlan0 

And left the next configuration without comments and with the correct values (instead of my-network-ssid and s3kr3t_P4ss):

 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid my-network-ssid wpa-psk s3kr3t_P4ss 

Note I have not include the iface wlan0 inet6 dhcp line because I don’t have IPv6 active in my LAN. As you should have the DHCP protocol active, your router should assign you a new IP address.

Reboot#

And finally it is recommended to reboot the system to apply the changes. Maybe there is another way to apply the changes but I haven’t try.

Wi-Fi connectivity ready#

After the reboot, the system should now be connected to the Wi-Fi. It can be check using the ip address command.

root@medusa:~# ip address 1: lo: 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: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether e4:5f:01:d9:eb:3a brd ff:ff:ff:ff:ff:ff inet 10.0.4.210/24 brd 10.0.4.255 scope global dynamic eth0 valid_lft 83280sec preferred_lft 83280sec inet6 fe80::e65f:1ff:fed9:eb3a/64 scope link valid_lft forever preferred_lft forever 3: wlan0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether e4:5f:01:d9:eb:3b brd ff:ff:ff:ff:ff:ff inet 10.0.4.215/24 brd 10.0.4.255 scope global dynamic eth0 valid_lft 83280sec preferred_lft 83280sec inet6 fe80::e65f:1ff:fed9:eb3b/64 scope link valid_lft forever preferred_lft forever root@medusa:~# 

As you can see, now wlan0 interface has the IP address assigned and the interface is working.

Источник

Оцените статью
Adblock
detector