beyondscreen / node-rpi-ws281x-native

native bindings to drive WS2811 (or WS2812) LED-Controllers on a Raspberry Pi
MIT License
224 stars 101 forks source link

Update submodule reference to a newer version #134

Open Simontaga opened 1 year ago

Simontaga commented 1 year ago

Update submodule reference.

This also resolves a few issues regarding hardware revisions, since this version of the submodule allows support for more hardware revisions.

This should solve the following issues #130 , #127

I have been using this fix on multiple Raspberry Pi's which previously did not have their hardware revision included in the older submodule.

Puetz commented 10 months ago

Hey @Simontaga ,

I just got a raspberry pi 5 and installed your version as instructed via npm install @simontaga/rpi-ws281x-native. I'm still getting the "Error: Hardware revision is not supported" message. Could you please adjust it, so that it also works for a pie 5? I would really appreciate it.

I never installed the "old" original version because I looked at the open issues and PRs first and was hoping that your fix would work on a pie 5.

My hardware:

Hardware    : BCM2835
Revision    : c04170
Model       : Raspberry Pi 5 Model B Rev 1.0

Cheers, Thomas

Simontaga commented 10 months ago

@Puetz I did some digging for you, on how you could possibly add it to the rpi_ws281x library.

My assumption is that if you are able to define the correct parameters for the RPI 5 this could work. I do not have a Pi 5 at hand so I can't test it myself.

The defined boards are in an array, you'll need to find and define the base addresses and your revision number and add the board to the list. https://github.com/jgarff/rpi_ws281x/blob/master/rpihw.c https://github.com/jgarff/rpi_ws281x/blob/master/rpihw.h

The following comment on this issue seems to describe on how the base addresses could be found, I hope this still works out of the box: (Looks like the output consists of both the peripheral and "videocore" base addresses ) https://github.com/jgarff/rpi_ws281x/issues/105#issuecomment-232308231

I hope this helps! :)

Puetz commented 10 months ago

Hey @Simontaga ,

I used the coding snippet to get the addresses but then I realized that the constants for the hardware type are used throughout the entire project and other parameters like frequencies are determined based on that.

So I guess I have to wait until they support a Pie 5 since I don't know C and have no clue about hardware.

Thanks a lot for your quick reply!

ThatDevTim commented 9 months ago

@Simontaga , I just got a new Raspberry Pi Model 3 B+ and was getting a hardware revision error, so I decided to try your fork. The only problem is I still get the error!

/home/control/project/node_modules/@simontaga/rpi-ws281x-native/lib/ws281x-native.js:160
  bindings.init();
           ^

Error: Hardware revision is not supported`

The original rpi-ws281x-native package works fine on my 3 B+ revision 1.3, but not on my new 1.4 revision. Do you have any suggestions or places you think I might have gone wrong?

Hardware      : BCM2835
Revision        : a020d4
Model           : Raspberry Pi 3 Model B Plus Rev 1.4

Edit: I tried other forks to no avail and google/other forums where helping me get anywhere

Thanks in advance, Tim