renetec-io / Pyxian

Web-focused OS for Raspberry Pi
https://renetec.io/pyxis-sdk/
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

GPIO not working on CM4/CM4IO #22

Closed MatinatorX closed 3 years ago

MatinatorX commented 3 years ago

Fresh install of latest Pyxian 0.6.4. GPIO 21 works fine to get back to settings, but the included GPIO example does not work. It won't show any pin states and toggling GPIO 23 does not bring the pin high.

Screenshot

shtig commented 3 years ago

Thank you for reporting the issue. I will look into that.

MatinatorX commented 3 years ago

Thanks!

shtig commented 3 years ago

I found the source of the problem. It is an outdated pigpio daemon that does not support Compute Module 4. Unfortunately, there is no package with a newer version yet, so we cannot easily update it with apt. I will be looking into how to update it in the next distribution. In meanwhile, you can install it manually by ssh-ing to the device:

  1. Update everything
    sudo apt-get update
    sudo apt-get upgrade
  2. Install tools:
    sudo apt-get install python-setuptools python3-setuptools
  3. Install the latest pigpiod manually:
    wget https://github.com/joan2937/pigpio/archive/master.zip
    unzip master.zip
    cd pigpio-master
    make
    sudo make install
  4. Check the version, you should get 79 or above.
    pigpiod -v
  5. Reboot:
    sudo reboot

    GPIO must now work.

MatinatorX commented 3 years ago

Tested and working great, thanks!