Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring code up to date with support for latest Pi devices #1

Closed
whaleygeek opened this issue Nov 14, 2020 · 11 comments
Closed

Bring code up to date with support for latest Pi devices #1

whaleygeek opened this issue Nov 14, 2020 · 11 comments
Assignees

Comments

@whaleygeek
Copy link
Owner

whaleygeek commented Nov 14, 2020

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.

@whaleygeek
Copy link
Owner Author

@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.

@whaleygeek whaleygeek self-assigned this Nov 14, 2020
@whaleygeek
Copy link
Owner Author

Will also update to Python3 as part of this work: see #2

@whaleygeek
Copy link
Owner Author

The minimum quick-fix bit of this work is scheduled for 17/11/2020

@whaleygeek
Copy link
Owner Author

Rebuilt .so from src, verified hardware still works on Pi model B V1 - OK

@whaleygeek
Copy link
Owner Author

Brought in contributed root priv fix from pyenergenie repo here: whaleygeek/pyenergenie@e4635e3

Rebuilt embedded .so library and tested on a RPI3B V1.2 - works fine with this .so:
55dd0f4

@whaleygeek
Copy link
Owner Author

whaleygeek commented Nov 17, 2020

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)

@whaleygeek
Copy link
Owner Author

whaleygeek commented Nov 17, 2020

Tested RaspberryPi OS Lite (no desktop) on PiZero V1,2 - works OK.

@whaleygeek
Copy link
Owner Author

whaleygeek commented Nov 17, 2020

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.

@whaleygeek
Copy link
Owner Author

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.

@whaleygeek
Copy link
Owner Author

Just waiting for the pirates to deliver my PiZeroW and I will test it on that.

@whaleygeek
Copy link
Owner Author

whaleygeek commented Nov 17, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant