Page 1 of 1

Problems writing to /dev/spidev after new OS

Posted: Tue Mar 26, 2019 9:56 pm
by markvr
I have Java and Python programs that control WS2801 lights by just writing to /dev/spidev0.0

This is convenient, because I don't need extra python or Java libraries, and USED to work fine(!) on an old version of raspian. I've wiped the SD card (doh!) to install the latest version of raspbian, so not quite sure what version it was, but probably about 2017.

Anyway, now the same programs don't work, the LEDs flicker a bit but not controlled.

What DOES work is the adafruit examples: https://github.com/adafruit/Adafruit_Python_WS2801.git

I've read quite a lot about changes to SPI modules (and got a bit lost in it all) and suspect the bus speed might now be wrong?
Mainly from this thread: https://github.com/raspberrypi/linux/issues/2165

Is there anyway to set the old bus speed back just from the OS? i.e. a boot parameter somewhere? All the examples I've read are using the Python spidev library to set this, but nearly all my code is (a) in Java, and (b) already used to work...!

The docs (https://www.raspberrypi.org/documentati ... /README.md) talk about setting the bus speed, but don't explain how to do it.

Any advice would be great thanks!