You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using PWM results in a fatalerror, Fatal error: ioctl on mailbox failed!. This happens for all PWMs
Looking into the code, it appears IOCTL_MBOX_PROPERTY is wrong. Its currently hard coded to 0xc0046400
However, with this now fixed, it's now crashing with bus error, specifically crashing around PWM.swift#414 where its trying to copy data.
This is where I've hit a roadblock. Not sure what to do to keep debugging.
Currently, i'm looking to use the rpi-ws281x c library directly in Swift as an alternative for my current project, as I've tested and it works just fine with Python bindings. Would love to have a pure swift soln working in 64bit OS's though
The text was updated successfully, but these errors were encountered:
I have the same problem on a RaspberryPi Zero 2 W running Swift 5.8 on Ubuntu 23.04. Fixing the IOCTL_MBOX_PROPERTY, as above, I also get "Bus error" when copying memory.
It has been a long time since the last update to SwiftyGPIO. Is it still being monitored/updated? Has it been superseded by another package? I would love to get my NeoPixels working!
Board Type
RaspberryPi 4 4GB
Operating System
Raspian Bullseye (64bit)
Swift Version
5.6.1 Release (Official, aarch64-unknown-linux-gnu)
Description
Using PWM results in a fatalerror,
Fatal error: ioctl on mailbox failed!
. This happens for all PWMsLooking into the code, it appears
IOCTL_MBOX_PROPERTY
is wrong. Its currently hard coded to0xc0046400
From the C version they call
_IOWR(100, 0, char *)
which you have commented out, which results in avalue of0xc0086400
sincechar *
size is different.Changing the hard coded value works**, it gets past the fatal error just fine, Heres some code to have it be generic regardless of OS
However, with this now fixed, it's now crashing with
bus error
, specifically crashing around PWM.swift#414 where its trying to copy data.This is where I've hit a roadblock. Not sure what to do to keep debugging.
Currently, i'm looking to use the rpi-ws281x c library directly in Swift as an alternative for my current project, as I've tested and it works just fine with Python bindings. Would love to have a pure swift soln working in 64bit OS's though
The text was updated successfully, but these errors were encountered: