motioneyeos icon indicating copy to clipboard operation
motioneyeos copied to clipboard

Add support for Raspberry Pi Zero 2 W

Open jawsper opened this issue 3 years ago • 74 comments

  • Updates for: kernel, rpi-firmware, rpi-wifi-firmware, v4l2loopback (needed for kernel 5.7+)

jawsper avatar Oct 30 '21 17:10 jawsper

I would like to use this with my Zero 2 W, is there a way I can compile a image myself. Or can someone just approve this PR and make a new release 🙃

vleeuwenmenno avatar Nov 29 '21 23:11 vleeuwenmenno

@vleeuwenmenno https://github.com/ccrisan/motioneyeos/wiki/Building-From-Source Issue: the version of buildroot in the source is 2 years old, and doesn't know about PiZero2W https://github.com/ccrisan/motioneyeos/issues/2827#issuecomment-967737252 seems to mostly work, but not 100% tested. YMMV

starbasessd avatar Nov 29 '21 23:11 starbasessd

I downloaded @jawsper image make sure you name wifi config ".conf" most important part. any word on when this merge will happen?

FriendlyNGeeks avatar Dec 08 '21 06:12 FriendlyNGeeks

I successfully installed your img and it successfully booted my Pi Zero 2W into motioneyeOS (eventually after I creating the wpa_supplicant.conf file and ssh correctly!) However I stupidly click the "Check For Updates" and of course it downloaded and overwrote your setup installation and would not boot up afterwards! I can easily re-install but I guess we need this fix checked out and updated to the main repository soon. Thanks for your work. :-) Oh after rebooting and changing too a static IP - I lost the date and time from the NTP. This might be due to my setup but it was working under DHCP.

MarkJC67 avatar Dec 10 '21 20:12 MarkJC67

@MarkJC67 It is always better to have your DHCP server issue a static (reserved) IP address, less chance of 'messing things up'. As to 'updates', that's a problem on @jawsper 's side. (If it were me, I'd disable it.) As to Time settings, what are you using? Failure to connect to an internet time source usually indicates a bad gateway setting, bad subnet mask setting, or a bad DNS setting. It would explain it if you were able to get a time sync with DHCP, that one of the above is bad. If you insist on setting static ip on the Pi, use the settings here: https://github.com/ccrisan/thingos/wiki/static_ip.conf static_ip.conf example:


STATIC_IP="192.168.42.1/24" STATIC_GW="192.168.42.1" STATIC_DNS="192.168.42.1"


Change as appropriate for your network Place in the /boot partition along with wpa_supplicant.conf and ssh or ssh.txt files

starbasessd avatar Dec 10 '21 20:12 starbasessd

I downloaded the release image and wifi seems to be missing. WLAN0 interface is missing. I can use a USB network adaptor and boot. The only network interfaces present are lo and eth0.
The boot log looks like this:

---- booting motionEyeOS unknown ----

  • Detecting disk device: /dev/mmcblk0
  • Creating data partition: done
  • Formatting data partition: done
  • Mounting data partition: done
  • Copying data skeleton: done
  • Mounting filesystems: done
  • Mounting overlay filesystems: done
  • Setting empty root password: done
  • Copying version file: done
  • Setting UTC timezone: done
  • Loading kernel modules: done
  • Setting hostname: done
  • Configuring CPU frequency: done
  • Starting syslogd: done
  • Loading device-tree overlays: done
  • Starting throttle watcher: done
  • Starting eudev: done
  • Starting watchdog: done
  • Starting rngd: done
  • Preparing AP interfaces: none
  • Starting wpa_supplicant: no device
  • Configuring wireless network: no device
  • Configuring wired network: no device ---- shutting down motionEyeOS unknown ----

there is nothing in dmesg or messages that indicate anything failed.

Any clues as to where to begin?

rickblair avatar Dec 31 '21 20:12 rickblair

@rickblair There is a build that works here: https://github.com/ccrisan/motioneyeos/issues/2827#issuecomment-967737252 The issue for any 'official release' is that they are pre-release of the PiZeroW2, and buildroot doesn't support the other chips used on it.

starbasessd avatar Dec 31 '21 20:12 starbasessd

Perfect thanks!

Sent from my iPhone

On Dec 31, 2021, at 12:56 PM, starbasessd @.***> wrote:

 @rickblair There is a build that works here: #2827 (comment) The issue for any 'official release' is that they are pre-release of the PiZeroW2, and buildroot doesn't support the other chips used on it.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

rickblair avatar Dec 31 '21 22:12 rickblair

Created a new release updating rpi-firmware and rpi-wifi-firmware to support Pi Zero 2W revision 2.1 https://github.com/jawsper/motioneyeos/releases/tag/20220119-dev

jawsper avatar Jan 19 '22 18:01 jawsper

@herdier0 Did you post then delete your post?

starbasessd avatar Jan 21 '22 21:01 starbasessd

I did, I was having this exact problems until I realized that my SSID was missing a character... Spent hours trying to understand the problem, to realizing that it was my totally my fault. Anyways, the 20220119 works! My RPi Zero 2 is revision 3.16

Herdeir0 avatar Jan 22 '22 09:01 Herdeir0

So, how can we properly update to 20220119-dev if update button is wrong?

Gonioul avatar Feb 15 '22 23:02 Gonioul

@Gonioul Unfortunately, since it isn't a part of the Official issues, you need to do a backup, re-image, and restore data.

starbasessd avatar Feb 15 '22 23:02 starbasessd

Also, if the older version works on your Zero 2, there is no need to upgrade either

jawsper avatar Feb 15 '22 23:02 jawsper

I have the same issue as rickblair: https://github.com/motioneye-project/motioneyeos/pull/2829#issuecomment-1003449550

New to all this, and no coding background. I have been able to get motioneyeos working on my 3b and 3b+ by just flashing the image and booting up those.

I have tried both images from jawsper, 2nd last gives the same as rickblair, latest gives this:

*Starting rngd: done *Preparing AP interfaces: ap0 *Configuring wired network: no device panic: rebooting in 40 seconds (caused by network)

Anything i can do to make the wifi work on the zero 2 w ?

Thanks in advance!

Rtitude avatar Mar 25 '22 20:03 Rtitude

@Rtitude did you include / add your wpa_supplicant.conf file to the /boot partition to activate wifi before inserting and starting the PiZero2W?

starbasessd avatar Mar 25 '22 22:03 starbasessd

@Rtitude did you include / add your wpa_supplicant.conf file to the /boot partition to activate wifi before inserting and starting the PiZero2W?

I was 100% sure i did, turns out with trying different things i forgot, new flash and adding the wpa file it works now. Thanks for pointing out my obvious mistake!

Rtitude avatar Mar 26 '22 11:03 Rtitude

@jawsper Could you update the commits to use latest stable RPi kernel with Linux 5.15, please?

MichaIng avatar Apr 20 '22 10:04 MichaIng

Done, didn't test it, here's an image: https://github.com/jawsper/motioneyeos/releases/tag/20220421-alpha

jawsper avatar Apr 21 '22 14:04 jawsper

Great, many thanks. Sadly I don't have an RPi 3 or Zero 2 W to test. I don't expect issues, but would be great if someone could do a quick test before we merge.

MichaIng avatar Apr 22 '22 11:04 MichaIng

Done, didn't test it, here's an image: https://github.com/jawsper/motioneyeos/releases/tag/20220421-alpha

zero 2 W

[root@meye-ba9db0ec ~]# cat /etc/version OS_NAME="motionEyeOS" OS_SHORT_NAME="motioneyeos" OS_PREFIX="meye" OS_VERSION="20220421-alpha"

everything works fine, thnks, but should it be 5.15?

[root@meye-ba9db0ec ~]# uname -r 5.10.76-v7

klavman avatar Apr 23 '22 10:04 klavman

Hmm indeed, tested it myself too now... I'll go see where I went wrong :sweat_smile:

jawsper avatar Apr 23 '22 10:04 jawsper

Ah right I did update the defconfig, but my local config overwrote that when making the image...

(Edit: doing a proper clean build now, will actually test it this time and publish it soon)

jawsper avatar Apr 23 '22 10:04 jawsper

Hmm it's not currently working after updating to 5.15.34 (also updated rpi-firmware), it can't find the wifi adapter anymore...

jawsper avatar Apr 23 '22 12:04 jawsper

Not sure how the userland firmware parts are implemented in motionEyeOS, i.e. on Debian and Raspberry Pi OS one uses the firmware-brcm80211 APT package. Also assure that the bootloader is updated.

And I'd also update everything for all RPi models, as otherwise there may be incompatibilities between rpi-firmware and kernel.

MichaIng avatar Apr 23 '22 12:04 MichaIng

That firmware comes via this repo: https://github.com/LibreELEC/brcmfmac_sdio-firmware-rpi, I also tried the repo linked in the readme from RPI-Distro, but that also doesn't find the wifi. I tried the same image on a regular Pi 3, also does not work anymore...

jawsper avatar Apr 23 '22 14:04 jawsper

Not sure about installed userland tools, e.g. does the ip command exist and ip l doesn't show the network interface either? As always, then dmesg should give a hint.

MichaIng avatar Apr 23 '22 16:04 MichaIng

got "panic: rebooting in 40 seconds (caused by network)" on my zero 2 w, and I'm pretty sure I created a wpa_supplicant.conf at the boot partition, the same path with config.txt, before the first boot. and this wpa_supplicant.conf file always got deleted after the first boot, anyone has a clue?

eggerr avatar Jun 19 '22 01:06 eggerr

@eggerr You don't say what image you are using, for a PiZero2W you have to use Jawspers fork here {special](https://github.com/motioneye-project/motioneyeos/issues/2875) not the Pi4 or PiZero images in Releases.

starbasessd avatar Jun 19 '22 06:06 starbasessd

https://github.com/jawsper/motioneyeos/releases/tag/20220421-alpha @starbasessd Sorry, I was using 20220421-alpha is this the right one to use?

update: I tried #2875 too, same. now I'm trying to add ext4 support to my mac, maybe I can update the wifi config file directly.

eggerr avatar Jun 19 '22 07:06 eggerr