Power & Source of Big Ideas

NanoPi M4V2 WiringPi broken

Moderators: chensy, FATechsupport

I installed the latest version rk3399-eflasher-friendlycore-bionic-4.4-arm64-20190926.img from SD to eMMC using eflasher.
Worked fine until I tested the wiringPi library with "gpio readall" command.
Then I got an error message "winringPiSetup: Unknown model".
Seems like the wiringpi library is compiled for M4 and not for M4V2.
Is there a fixed version or is it possible for me to compile a fitting version?
Thanks for the feedback. This issue has been fixed. Please try again.

http://wiki.friendlyarm.com/wiki/index. ... for_RK3399
I followed your link to the wiki page and wondered why you suggested "Install WiringPi for Python".
Nevertheless I went through the install steps. At the end there was no change.
The command "gpio readall" gave the same error: "wiringPiSetup: Unknown model"
You can also download the latest firmware, which is already built-in wiringPi-python, no installation required, the latest version is 20191218
Then I got an error message "winringPiSetup: Unknown model".
Seems like the wiringpi library is compiled for auto clicker M4 and not for M4V2.
I see the same problem with "Unknown model".
The wiki still points to installing WiningPi which no longer exists.
The replacements work for the RaspberryPi 3 so may be it has to be made model aware of the M4v2.
I have now got back to this topic.
I installed wiringpi-v2.44-friendlyelec-rk3399.deb, "gpio readall" looks good.
When I try to use the library to build an application I find it's not built with libcrypt.
root@NanoPi-M4v2:/usr/src/pihpsdr# make
gcc -o pihpsdr audio.o band.o discovered.o discovery.o filter.o version.o main.o new_menu.o about_menu.o rx_menu.o exit_menu.o radio_menu.o ant_menu.o display_menu.o dsp_menu.o pa_menu.o cw_menu.o oc_menu.o xvtr_menu.o equalizer_menu.o step_menu.o meter_menu.o band_menu.o bandstack_menu.o mode_menu.o filter_menu.o noise_menu.o agc_menu.o vox_menu.o fft_menu.o diversity_menu.o tx_menu.o vfo_menu.o test_menu.o meter.o mode.o old_discovery.o new_discovery.o old_protocol.o new_protocol.o new_protocol_programmer.o rx_panadapter.o tx_panadapter.o property.o radio.o receiver.o rigctl.o rigctl_menu.o toolbar.o transmitter.o zoompan.o sliders.o vfo.o waterfall.o button_text.o vox.o update.o store.o store_menu.o memory.o led.o ext.o error_handler.o cwramp.o protocols.o configure.o i2c.o gpio.o encoder_menu.o switch_menu.o \
ps_menu.o \
-lrt -lm -lwdsp -lpthread -lasound `pkg-config --libs gtk+-3.0` -lwiringPi
/usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib/libwiringPi.so: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
Makefile:400: recipe for target 'pihpsdr' failed
make: *** [pihpsdr] Error 1
root@NanoPi-M4v2:/usr/src/pihpsdr# ldd /usr/lib/libwiringPi.so
linux-vdso.so.1 (0x0000007fa5c73000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa5a8a000)
/lib/ld-linux-aarch64.so.1 (0x0000007fa5c48000)

This is what I get on a Raspberry Pi4B.
root@Pi4:~# ldd /usr/local/lib/libwiringPi.so.2.60
linux-vdso.so.1 (0x0000007f9e2e9000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f9e1c5000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f9e196000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f9e17e000)
libcrypt.so.1 => /lib/aarch64-linux-gnu/libcrypt.so.1 (0x0000007f9e137000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f9dfc5000)
/lib/ld-linux-aarch64.so.1 (0x0000007f9e2bb000)
After 10 months I tried again.
This time using rk3399-eflasher-friendlycore-bionic-4.4-arm64-20200817.img.zip
Installation from SD card and also "apt-get" to update/upgrade the system worked fine.
But "gpio readall" showed the same ERROR!!!

Code: Select all

wiringPiSetup: Unknown model

And "gpio -v" showed this output:

Code: Select all

gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
FriendlyELEC Board Details:
  Type: Unknown, Revision: 00, Memory: 256MB
  Maker: Hardkernel, Chip-Vendor: Unknown
  * Device tree is enabled.
  *--> FriendlyElec NanoPi M4 Ver2.0
  * Root or sudo required for GPIO access.

So "gpio" recognizes M4 V2 a bit, but still didn't work.
It does not make any difference if this is done as root or as user with sudo.
And no, it cannot be solved by compiling C code with my own application. Results in the same error.
Why is a fresh install of the firmware still broken?
Does anybody know how to fix this annoying bug?

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 5 guests