Closed whaleygeek closed 3 years ago
@skpang FYI, I will be doing some work on this soon, you might want to try it out at your end with latest Pi when it is done, and link through to the drivers from your product pages and list Raspberry Pi as a supported platform with sample code:
http://skpang.co.uk/catalog/hf-rfid-module-sl030-33v-i2c-p-1065.html
http://skpang.co.uk/catalog/sl030-interface-cable-for-raspberry-pi-p-1222.html
I suggest you put a 'watch' on this repo so that you get future updates, as I plan to bring this right up to date and support all the latest Pi platforms, as I want do do some projects with it again.
Will also update to Python3 as part of this work: see https://github.com/whaleygeek/SL030/issues/2
The minimum quick-fix bit of this work is scheduled for 17/11/2020
Rebuilt .so from src, verified hardware still works on Pi model B V1 - OK
Brought in contributed root priv fix from pyenergenie repo here: https://github.com/whaleygeek/pyenergenie/commit/e4635e3ad9550f6dfc14eebc9537cdfaa202eb22
Rebuilt embedded .so library and tested on a RPI3B V1.2 - works fine with this .so: https://github.com/whaleygeek/SL030/commit/55dd0f4f8d2c602107e151541a466128a3ca309f
Confirmed code runs on PiZero V1.2 with latest RaspberryPi Desktop OS. Confirmed runs as non root user. Confirmed runs in both Python2 and Python3. Confirmed runs on RPIB V3 1.2 on latest RaspberryPi OS Lite (no desktop)
Tested RaspberryPi OS Lite (no desktop) on PiZero V1,2 - works OK.
observed that Python3 on RaspberryPi OS Lite will not import RPi.GPIO but python2 will. Odd. Python3 on RaspberryPi OS Desktop (without recommended software) works fine. Must be a packaging problem with the Raspberry Pi Lite OS.
Using RaspberryPi OS Lite 20/08/2020
no RPi.GPIO in /usr/lib/dist-packages/python3
sudo apt-get install python3-pip pip3 install RPi.GPIO
re-ran python3 rfid_example.py and it works.
Just waiting for the pirates to deliver my PiZeroW and I will test it on that.
Tested with PiZeroW RaspberryPiOSLite (10/08/2020) Python3 - works fine.
cc @skpang
Note, to setup wifi network access from the CLI follow these instructions: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
The SSID is case sensitive. Make sure you follow the wpa passphrase instructions to generate an encrypted password, rather than storing the password in plain text (as raspi-config does by default)
I want to bring this repo up to date so it runs on the latest Pi devices, as I have a project in mind. Logging this as an issue, so that others can follow along at home. The first 2 items are the most important, the other items may happen at the same time, or later, depending on how involved they are.
merge updated gpio embedded driver from the github.com/whaleygeek/pyenergenie driver (specifically the newer Pi's have the peripherals mapped at different memory addresses, and the best way to make this portable is read the memory address from the device tree file in /sys)
test it on a PiZero, as that is the intended platform for the next project
if I feel like it, look at https://github.com/whaleygeek/softbus and turn it into an upstream supply of these useful little driver building blocks to all other repos (so updates are easier)
if I feel like it, investigate whether latest OS now has a libbcm that can provide C access to gpio, I2C, SPI with a defined API (as when all this code was written, there wasn't a standardised C API to all this stuff that was packaged and included with the OS) so I had to roll my own based on Gert's code from the Gertboard. Might as a result of this provide a link through to the hardware based SPI/I2C drivers for those that don't need zero-install use but do need higher speed.