rusted_planet
Posts: 2
Joined: Wed Mar 15, 2017 6:34 pm

Kali Linux Raspberry Pi Zero W - bluetooth

Wed Mar 15, 2017 9:32 pm

I am installing Kali Linux on my pi zero w. Everything works fine except bluetooth. I verified with the raspbian image that the bluetooth hardware is working. I am just having trouble getting it working with Kali. Does anyone have a list of what packages i for sure need installed, what modules i need loaded and what services i need started. I tried to mirror what was running on the rapbian image, but that didn't work so i am missing something.

Other than that, after a little bit of updating love from the standard Kali pi image, it boots, i got the wifi working and everything works, except bluetooth. hcitool dev shows no devices found. I am also rolling the latest firmware and kernel rpi-update could find (march 2nd or 12 i believe, a bit newer than the stuff on the rasbian image).

Thanks,
Sean

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Wed Mar 15, 2017 10:13 pm

You probably need to build BlueZ from source with the same or similar patches as used in the Raspbian BlueZ packages distributed by the RPF repo. You'll probably also need a firmware file (/lib/firmware/BCM43430A1.hcd) if you don't have that already. Then there is also the hciuart.service systemd unit file. I may be forgetting something else.
Last edited by ktb on Wed Mar 15, 2017 10:27 pm, edited 1 time in total.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Wed Mar 15, 2017 10:23 pm

rusted_planet wrote:I am installing Kali Linux on my pi zero w. Everything works fine except bluetooth. I verified with the raspbian image that the bluetooth hardware is working. I am just having trouble getting it working with Kali. Does anyone have a list of what packages i for sure need installed, what modules i need loaded and what services i need started. I tried to mirror what was running on the rapbian image, but that didn't work so i am missing something.

Other than that, after a little bit of updating love from the standard Kali pi image, it boots, i got the wifi working and everything works, except bluetooth. hcitool dev shows no devices found. I am also rolling the latest firmware and kernel rpi-update could find (march 2nd or 12 i believe, a bit newer than the stuff on the rasbian image).

Thanks,
Sean
Welcome, Kali Linux should offer support for their Operating System: https://forums.kali.org
Take what I advise as advice not the utopian holy grail, and it is gratis !!

drdoolittle
Posts: 2
Joined: Wed Mar 15, 2017 11:53 am

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Thu Mar 16, 2017 1:07 pm

May I ask which image you are using? The one from Offensive Security (called 'Raspberry Pi', about 1,5 GB) doesn't boot on my zero w - I only get the colored square when the Pi is switched on.

rusted_planet
Posts: 2
Joined: Wed Mar 15, 2017 6:34 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Sat Mar 18, 2017 3:29 pm

Yeah i am using the offensive security one. It wont boot because of the firmware, this is what i did:

1)i installed kali on the sd card.

2)put the sd card in another pi using a usb to microsd adapter (i had gentoo installed, but you only need an image that has rpi-update, rasbian would be the best i think)

3)Then mount the 2 partitons from the card under /mnt and /mnt/boot
mount /dev/sda2 /mnt/
mount /dev/sda1 /mnt/boot/

4)rpi-update the kali image
ROOT_PATH=/mnt BOOT_PATH=/mnt/boot rpi-update

5)change root to the kali image
chroot /mnt/ /bin/bash

6)update the thing
apt-get update
apt-get upgrade

7)install the wireless driver
apt-get install firmware-brcm80211

8)copy /lib/firmware/brcm/brcmfmac43430-sdio.txt from a rasbian image to /lib/firmware/brcm/brcmfmac43430-sdio.txt on kali

9)edit /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "mysupercoolssidofdoom"
wpa-psk "mysupercoolpasswordofdoom"

10)exit the chroot, umount the partitons and eject the card

That will get you kali on the pi zero w with wireless networking. But i cannot get bluetooth to work, and i soooooooo want to use my bluetooth keyboard with it. Sorry about my formatting typing this on my phone.

Sean

Edit: It is the Offensive Security image kali-2.1.2-rpi (not the 2/3 one or the tft one), just wanted to clarify. Don't know if i should link, i will a moderator can remove the link if i am not suppose to.
https://images.offensive-security.com/a ... rpi.img.xz

re4son
Posts: 3
Joined: Sun May 01, 2016 2:59 am

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Tue Mar 21, 2017 8:12 am

I have updated my Re4son-Kernel to support the Raspberry Pi Zero W with Bluetooth and wifi out of the box.

You can find it here:

https://www.whitedome.com.au/re4son/re4son-kernel

The package includes a new 4.4.50 kernel optimised for kali with TFT support and wifi injection patch, firmware, tweaked udev rules, patched bluez & pi-bluetooth.

The site also includes kali images with the kernel installed.

Hope that helps,
Re4son

Ongelma
Posts: 113
Joined: Wed Dec 03, 2014 6:46 am

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Tue Mar 28, 2017 6:09 am

re4son wrote:I have updated my Re4son-Kernel to support the Raspberry Pi Zero W with Bluetooth and wifi out of the box.

You can find it here:

https://www.whitedome.com.au/re4son/re4son-kernel

The package includes a new 4.4.50 kernel optimised for kali with TFT support and wifi injection patch, firmware, tweaked udev rules, patched bluez & pi-bluetooth.

The site also includes kali images with the kernel installed.

Hope that helps,
Re4son
Hello.

Is there something else different in this kali package with re4son kernel? I have my old Pi Zero with camera connector and this new Pi Zero W. The older one is running the official build from offsec site and the new one is running you're re4son kali. The new pi zero w seems a lot slower than the older one with official kali.

EDIT: I think i found the answer to this myself... see here:http://forums.pimoroni.com/t/pi-zero-w- ... first/4117

A bug that makes the new zero w run in 700mhz rather than 1ghz as it should. After apt-get update and upgrade this should be fixed. Im trying it now.

EDIT2: Can confirm, its as fast as the old one after update, upgrade, reboot. Also, before the update, upgrade cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq gave me output:700000, after update, upgrade, and reboot, it gave me 1000000.

Napples
Posts: 2
Joined: Mon Mar 13, 2017 8:16 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Thu Mar 30, 2017 12:07 pm

rusted_planet wrote:Yeah i am using the offensive security one. It wont boot because of the firmware, this is what i did:

1)i installed kali on the sd card.

2)put the sd card in another pi using a usb to microsd adapter (i had gentoo installed, but you only need an image that has rpi-update, rasbian would be the best i think)

3)Then mount the 2 partitons from the card under /mnt and /mnt/boot
mount /dev/sda2 /mnt/
mount /dev/sda1 /mnt/boot/

4)rpi-update the kali image
ROOT_PATH=/mnt BOOT_PATH=/mnt/boot rpi-update

5)change root to the kali image
chroot /mnt/ /bin/bash

6)update the thing
apt-get update
apt-get upgrade

7)install the wireless driver
apt-get install firmware-brcm80211

8)copy /lib/firmware/brcm/brcmfmac43430-sdio.txt from a rasbian image to /lib/firmware/brcm/brcmfmac43430-sdio.txt on kali

9)edit /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "mysupercoolssidofdoom"
wpa-psk "mysupercoolpasswordofdoom"

10)exit the chroot, umount the partitons and eject the card

That will get you kali on the pi zero w with wireless networking. But i cannot get bluetooth to work, and i soooooooo want to use my bluetooth keyboard with it. Sorry about my formatting typing this on my phone.

Sean

Edit: It is the Offensive Security image kali-2.1.2-rpi (not the 2/3 one or the tft one), just wanted to clarify. Don't know if i should link, i will a moderator can remove the link if i am not suppose to.
https://images.offensive-security.com/a ... rpi.img.xz
I've got kali running on the pi0w, updated drivers, changed my interfaces file... yet I can't get my wifi to work. Can you post your whole interfaces file (minus ssid/pw) so I can see if I made a silly mistake? Not sure where else my issue could be. You are talking about using the integrated wifi adapter and not an external one, right?

Thanks very much for getting me this far, though. I spent a couple days sifting through garbage guides until I found yours. Kali without tubes is still better than hanging at the rainbow screen forever :)

Ongelma
Posts: 113
Joined: Wed Dec 03, 2014 6:46 am

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Wed Apr 05, 2017 10:15 am

Napples wrote:
rusted_planet wrote:Yeah i am using the offensive security one. It wont boot because of the firmware, this is what i did:

1)i installed kali on the sd card.

2)put the sd card in another pi using a usb to microsd adapter (i had gentoo installed, but you only need an image that has rpi-update, rasbian would be the best i think)

3)Then mount the 2 partitons from the card under /mnt and /mnt/boot
mount /dev/sda2 /mnt/
mount /dev/sda1 /mnt/boot/

4)rpi-update the kali image
ROOT_PATH=/mnt BOOT_PATH=/mnt/boot rpi-update

5)change root to the kali image
chroot /mnt/ /bin/bash

6)update the thing
apt-get update
apt-get upgrade

7)install the wireless driver
apt-get install firmware-brcm80211

8)copy /lib/firmware/brcm/brcmfmac43430-sdio.txt from a rasbian image to /lib/firmware/brcm/brcmfmac43430-sdio.txt on kali

9)edit /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "mysupercoolssidofdoom"
wpa-psk "mysupercoolpasswordofdoom"

10)exit the chroot, umount the partitons and eject the card

That will get you kali on the pi zero w with wireless networking. But i cannot get bluetooth to work, and i soooooooo want to use my bluetooth keyboard with it. Sorry about my formatting typing this on my phone.

Sean

Edit: It is the Offensive Security image kali-2.1.2-rpi (not the 2/3 one or the tft one), just wanted to clarify. Don't know if i should link, i will a moderator can remove the link if i am not suppose to.
https://images.offensive-security.com/a ... rpi.img.xz
I've got kali running on the pi0w, updated drivers, changed my interfaces file... yet I can't get my wifi to work. Can you post your whole interfaces file (minus ssid/pw) so I can see if I made a silly mistake? Not sure where else my issue could be. You are talking about using the integrated wifi adapter and not an external one, right?

Thanks very much for getting me this far, though. I spent a couple days sifting through garbage guides until I found yours. Kali without tubes is still better than hanging at the rainbow screen forever :)
here is mine, working like a charm :)
File: /etc/network/interfaces/
auto lo

iface lo inet loopback
iface ethc0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid MyWifi
wpa-psk MyWifiPassword

This is a straight copy paste from file. Only thing changed is the name and password of my wifi.

sl0w
Posts: 2
Joined: Sat Apr 22, 2017 10:04 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Sat Apr 22, 2017 10:09 pm

Hi,

I followed rusted_planet instruction but I'm facing an issue on that step :
5)change root to the kali image
chroot /mnt/ /bin/bash
This command doesn't work it says "chroot: cannot execute /bin/bash: no such file or directory", could anyone help me ?

Thanks,
sl0w

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Sun Apr 23, 2017 3:46 am

What hardware and OS are you running those commands on? rusted_planet was apparently using Gentoo on a Pi:
2)put the sd card in another pi using a usb to microsd adapter (i had gentoo installed, but you only need an image that has rpi-update, rasbian would be the best i think)
I believe Raspbian comes with at least bash (/bin/bash) and dash (/bin/dash) installed by default. Depending on what system you're trying to run those commands on, you may have to install bash if you want to use those exact commands.

sl0w
Posts: 2
Joined: Sat Apr 22, 2017 10:04 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Sun Apr 23, 2017 10:43 am

I'm running this command on a Kali linux installed on my PC. I had to look but i confirm that my kali has /bin/dash and /bin/bash.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Kali Linux Raspberry Pi Zero W - bluetooth

Mon Apr 24, 2017 5:02 am

sl0w wrote:I'm running this command on a Kali linux installed on my PC. I had to look but i confirm that my kali has /bin/dash and /bin/bash.
Sorry, perhaps I didn't read carefully enough. The "chroot: cannot execute /bin/bash: no such file or directory" would seem to suggest that /bin/bash couldn't be found inside the chroot (in the RaspberryPi Kali image you should have mounted), not on the Kali installation on your PC/Pi. Sorry for the confusion. But the actual problem may be that you're trying to do this on an x86(_64) PC. I don't think that's possible using the exact commands rusted_planet posted. He did those steps on a Pi running Gentoo. You might look into using Qemu (qemu-user-static) to do something like that from an x86(_64) PC. How did you even do step 4 (rpi-update) of rusted_planet's instructions from an x86 PC?

Return to “Other”