Closed dupuisv closed 3 years ago
Hello Phil,
https://www.dinoshop.ch/index.php?route=product/product https://www.dinoshop.ch/index.php?route=product/product&path=1392_2420_1392_2420&product_id=125883 &path=1392_2420_1392_2420&product_id=125883
So I can try.
Probably a release between 1.5 and 31.8 . I do not always do firmware update. Just for new Raspberry.
3.
Python (2.7.9)
import pifacedigitalio as piface
piface.init()
piface.digital_write(0, 1, 0)
Best regards
Reginald
De : Phil Elwell [mailto:notifications@github.com] Envoyé : dimanche 3 septembre 2017 09:14 À : Hexxeh/rpi-firmware rpi-firmware@noreply.github.com Cc : dupuisv info@dupuis-informatique.ch; Author author@noreply.github.com Objet : Re: [Hexxeh/rpi-firmware] Update from 4.9.35-v7 to 4.9.y - piface2 digital io no more detected (#159)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hexxeh/rpi-firmware/issues/159#issuecomment-326788573 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGmd2cC9nb3LwA7ZvKFAkYKNJrZ736LMks5selGugaJpZM4PK4Lo .
Reginald,
You will find a list of the firmware releases on the commits page. The long strings of characters on the right of each release are commit hashes - use the copy button to get the whole string, then on the Pi run sudo rpi-update <hash>
to install a particular version. As I write this sudo rpi-update
is equivalent to sudo rpi-update 19a13325227cb59d44dbf6d235b5965439413aa4
.
Thanks for the test - can you say what output you get when it is successful and when it fails?
Hello Phil,
I conduct a few test . Some kind of dichotomic search:
4.9.40 3202f1b16896029f9da1b074b0912177e8960b52 OK
4.9.41 b9becbbf3f48e39f719ca6785d23c53ee0cdbe49 OK
4.9.43 bf19fe7aa723ef8ddafdf8ca47a7205e35749ddc BAD
Traceback (most recent call last):
File "DoorControl.py", line 1173, in
main()
File "DoorControl.py", line 1018, in main
init_door()
File "DoorControl.py", line 558, in init_door
piface.init()
File "/usr/local/lib/python2.7/dist-packages/pifacedigitalio/core.py", line 166, in init
raise failed_boards[0]
pifacedigitalio.core.NoPiFaceDigitalDetectedError: No PiFace Digital board detected (hardware_addr=0, bus=0, chip_select=0).
Python 2.7.9
So It’s start to fail with firmware 4.9.43
Regards
Reginald
De : Phil Elwell [mailto:notifications@github.com] Envoyé : dimanche 3 septembre 2017 16:06 À : Hexxeh/rpi-firmware rpi-firmware@noreply.github.com Cc : dupuisv info@dupuis-informatique.ch; Author author@noreply.github.com Objet : Re: [Hexxeh/rpi-firmware] Update from 4.9.35-v7 to 4.9.y - piface2 digital io no more detected (#159)
Reginald,
You will find a list of the firmware releases on the commits page https://github.com/Hexxeh/rpi-firmware/commits/master . The long strings of characters on the right of each release are commit hashes - use the copy button to get the whole string, then on the Pi run sudo rpi-update
Thanks for the test - can you say what output you get when it is successful and when it fails?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hexxeh/rpi-firmware/issues/159#issuecomment-326807035 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGmd2YGBJzpgAwwPWPdQYj1q6bVzzH3wks5serI6gaJpZM4PK4Lo . https://github.com/notifications/beacon/AGmd2RtPoowdunYK0yuF1JC6OdOJJnk_ks5serI6gaJpZM4PK4Lo.gif
That commit included a change to the maximum SPI bus speed (see https://github.com/raspberrypi/linux/issues/2165) because 500KHz was unnecessarily restrictive. Unfortunately the spidev API doesn't separate the concepts of the maximum speed and the current default speed, so it isn't possible to permit higher speeds without also changing the default.
As a result, unless clients are careful to either set a default speed (confusingly by using SPI_IOC_WR_MAX_SPEED_HZ) or to set the speed_hz property on each transfer then with the recent update they will find they are using a very high bus speed. This is going to be inconvenient for users of those client applications and libraries, but they've been lucky/unlucky so far that the default works for them. With the new maximum of 125MHz this will no longer be the case.
Reading the original issue again I see it is mentioned in a change to the pifaceio
library (see https://github.com/bulletmark/pifaceio/commit/34ddceb72f2c8562d66b5f395227d9785221ff21). @XECDesign Can we update the Raspbian build to include that commit?
Thank you for pointing the problem
The library https://github.com/piface/pifacedigitalio ,
That does support interrupts hasn’t been upgraded to set the speed explicitly.
I also think the piface library need sudo level to run.
https://github.com/bulletmark/pifaceio/commit/34ddceb72f2c8562d66b5f395227d9785221ff21
So we use the pifacedigitalio suggested by the piface2 maker.
Regards
Regi
De : Phil Elwell [mailto:notifications@github.com] Envoyé : lundi 4 septembre 2017 11:09 À : Hexxeh/rpi-firmware rpi-firmware@noreply.github.com Cc : dupuisv info@dupuis-informatique.ch; Author author@noreply.github.com Objet : Re: [Hexxeh/rpi-firmware] Update from 4.9.35-v7 to 4.9.y - piface2 digital io no more detected (#159)
That commit included a change to the maximum SPI bus speed (see raspberrypi/linux#2165 https://github.com/raspberrypi/linux/issues/2165 ) because 500KHz was unnecessarily restrictive. Unfortunately the spidev API doesn't separate the concepts of the maximum speed and the current default speed, so it isn't possible to permit higher speeds without also changing the default.
As a result, unless clients are careful to either set a default speed (confusingly by using SPI_IOC_WR_MAX_SPEED_HZ) or to set the speed_hz property on each transfer then with the recent update they will find they are using a very high bus speed. This is going to be inconvenient for users of those client applications and libraries, but they've been lucky/unlucky so far that the default works for them. With the new maximum of 125MHz this will no longer be the case.
Reading the original issue again I see it is mentioned in a change to the pifaceio library (see bulletmark/pifaceio@ https://github.com/bulletmark/pifaceio/commit/34ddceb72f2c8562d66b5f395227d9785221ff21 34ddceb). @XECDesign https://github.com/xecdesign Can we update the Raspbian build to include that commit?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hexxeh/rpi-firmware/issues/159#issuecomment-326909079 , or mute the thread https://github.com/notifications/unsubscribe-auth/AGmd2Rp2bIbaP6R19WxlaQlCCTPXZuTaks5se74YgaJpZM4PK4Lo . https://github.com/notifications/beacon/AGmd2V8VNYxZoY2gEED1ocGixMHFqy0iks5se74YgaJpZM4PK4Lo.gif
The developer of the piface libraries no longer works for that company. We don't have Stretch packages for them.
Thank for the information
I am making some change to pifacecommon (in the python source) to fix the problem. Then I will look how to publish it.
Reginald
Hello
The case can be closed. We update to 4.9.46 and apply few changes to set the SPI max rd/wr speed.
The update spi.py is on our local copy of pifacecommon-master.
If you can just tell me how to proceed to publish this update . That would be my first contribution
Regi
Is the fix published somewhere? I've tried to modify the speed in the spi_ioc_transfer struct on the pifacecommon-master/spi.py file but some of the commands fail.
No. But send me your e-mail to info@dupuis-infornatique.ch and i can send you the modified python code. Reginald
Hi Reginald. I've tried to send you an email but my company's proxy raise an error. I'll share my email here: d.beltran@geze.com
David
@dupuisv is this issue still relevant? Else please close it, thanks :-)
after updating the raspberry pi3 to the latest firmware the piface2 board can no more be detected