Jump to content

Nano Pi M4 wiringPiSetup() not working


iomari

Recommended Posts

Greetings,

I have installed your wiringpi-python on our Nano Pi M4 as instructed on http://wiki.friendlyarm.com/wiki/index.php/WiringPi-Python_for_RK3399.

 

All went well with the installation.

 

However, when trying to execute wpi.wiringPiSetup(),

I get the following error:

Oops: Unable to determine board revision from /proc/cpuinfo

 -> No "Hardware" line

 ->  You'd best google the error to find out why.

 

This is strange because there is no "Hardware" line in proc/cpuinfo on any Linux system in our organization.

Can you please explain what is the way forward. Or is there a python 3 alternative to wiringpi that is as detailed? Or is there an update to WiringPi-Python for the Nano Pi M4 running rk3399-eflasher-friendlydesktop-bionic-4.4-arm64-20190308.img

 

We are at a standstill due to this as you must be aware that without "wiringPiSetup()" working, the whole wiringpi-python library is useless.

 

Thanks in advance

 

iomari

Link to comment
Share on other sites

44 minutes ago, iomari said:

Thanks but I have already done all all of that. The error I posted above is after successfully installing WiringPi. 

Read again the sequence of actions ... Perhaps you will see that you first need to put just WirinPi, and only then WirinPi for Python ...

Link to comment
Share on other sites

pavelectric,

I appreciate your help. However I have both the python and C versions installed. The C version works but I want to use python for this project. 

additionally, I don't see where WiringPi must be installed at all if using python let alone before. the WiringPi-Python page clearly states:

 

1 Introduction to WiringPi for Python

The wiringPi for Python utility is an implementation of wiringPi in Python. It can be used in Python programs to access hardware such as GPIO/I2C/SPI/UART/PWM etc. It is a popular and powerful utility.
FriendlyELEC has ported the wiringPi for Python utility for all existing FriendlyELEC-RK3399 based boards: NanoPi M4, NanoPi NEO4 and NanoPC-T4.

Current version: 2.44
WiringPi's home page: http://wiringpi.com


There is a C version too and here is the reference link: WiringPi for RK3399

 

Notice the red highlight. It does not say it is a requirement. But regardless, I installed it anyway for test purposes.

 

Thanks

iomari

Link to comment
Share on other sites

On 3/23/2019 at 2:31 PM, iomari said:

I have installed your wiringpi-python on our Nano Pi M4 as instructed on http://wiki.friendlyarm.com/wiki/index.php/WiringPi-Python_for_RK3399.

 

no it's friendly elecs... Whereas Armbian is independent from board-makers and Armbian isn't marked as supported image (http://wiki.friendlyarm.com/wiki/index.php/WiringPi-Python_for_RK3399#Supported_OS).

Nevertheless, I don't see much a reason why it shouldn't work on Armbian as well. Unfortunately there's not the whole source code available from their page.. Likely that some board detection mechanism doesn't.

Just compare cat /proc/cpuinfo from an armbian image with a friendly arm image to see if there's a difference.. Or ask them if they can provide the sourcecode of their lib.. to see what kind of information there is needed. It looks like some 32bit 64bit issue which wiringPi has..

 

Link to comment
Share on other sites

6 minutes ago, iomari said:

are you using a nano pi m4? 

You have created the theme "Nano Pi M4 wiringPiSetup () not working", I answered you in it.

The link to my GitHub refers to the M4 board.

And to answer your question .... I do not even know how ...

Link to comment
Share on other sites

I've followed your instructions to the letter. I'm not new to this. And while I appreciate all your efforts, that python function still does not work.

I even tried it using python 2 but the result is the same.

I've emailed the vendor many times and they have not replied yet other than to ask me which image am I using which I replied last week. I guess I'll just have to use C. Really a shame. This changes the whole scope of my project.

Link to comment
Share on other sites

Just now, iomari said:

I've followed your instructions to the letter. I'm not new to this. And while I appreciate all your efforts, that python function still does not work.

I even tried it using python 2 but the result is the same.

I've emailed the vendor many times and they have not replied yet other than to ask me which image am I using which I replied last week. I guess I'll just have to use C. Really a shame. This changes the whole scope of my project.

Do not quit started job! It worked for me - it means it will work for you.

Check that these components are installed "python-dev, python-setuptools, python3-dev, python3-setuptools, swig"

Link to comment
Share on other sites

Building dependency tree...
Reading state information...
python-dev is already the newest version (2.7.15~rc1-1).
python-setuptools is already the newest version (39.0.1-2).
python3-setuptools is already the newest version (39.0.1-2).
swig is already the newest version (3.0.12-1).
git is already the newest version (1:2.17.1-1ubuntu0.4).
python3-dev is already the newest version (3.6.7-1~18.04).
The following packages were automatically installed and are no longer required:
  python3-decorator python3-ipython-genutils python3-pexpect
  python3-pickleshare python3-prompt-toolkit python3-ptyprocess
  python3-pygments python3-simplegeneric python3-traitlets python3-wcwidth
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

Link to comment
Share on other sites

[iomari@NanoPi-M4]─[~/code/setuptools-33.1.1]─[0]─[5291]-[][:)][Mon,Mar 25, 2019 05:32:45 pm]
--> sudo easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg
Processing wiringpi-2.44.4-py3.6-linux-aarch64.egg
removing '/usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg' (and everything under it)                                                                                                           
creating /usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg
Extracting wiringpi-2.44.4-py3.6-linux-aarch64.egg to /usr/local/lib/python3.6/dist-packages
wiringpi 2.44.4 is already the active version in easy-install.pth

 

--> ipython3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import wiringpi as wpi

In [2]: wpi.wiringPiSetup()
Oops: Unable to determine board revision from /proc/cpuinfo
 -> No "Hardware" line
 ->  You'd best google the error to find out why.
 

Link to comment
Share on other sites

10 minutes ago, iomari said:

:D

It works as python 2 now. Thanks for your patience. Now if only I can't figure out the problem with python 3....... 

The main result is obtained. The rest is a matter of refinement and customization.

Successful experiments and decent results. And do not forget to share your results, it is very interesting.

And if there are photos - it is generally gorgeous!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines