2 2
Epyon

NanoPi Neo WiringNP missing /sunxi_info/sys_info

Recommended Posts

Hello all

 

I want to control some GPIO pins on my NanoPi Neo (H3) board and installed WiringNP. Executing commands results in the error

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


 

I've traced the source of the error down to this line, where WiringNP tries to open /sys/class/sunxi_info/sys_info to determine which board it is running on. This path is not present in my Armbian os. I'm using 4.11.12-sun8i #20 SMP armv7l armv7l armv7l GNU/Linux

 

Am I missing something here? Or are there alternatives to using WiringNP?

Edited by Epyon

Share this post


Link to post
Share on other sites
On 14/11/2017 at 8:47 PM, Epyon said:

Hello all

 

I want to control some GPIO pins on my NanoPi Neo (H3) board and installed WiringNP. Executing commands results in the error


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


 

I've traced the source of the error down to this line, where WiringNP tries to open /sys/class/sunxi_info/sys_info to determine which board it is running on. This path is not present in my Armbian os. I'm using 4.11.12-sun8i #20 SMP armv7l armv7l armv7l GNU/Linux

 

Am I missing something here? Or are there alternatives to using WiringNP?

 

You can work around by creating file /etc/sys_info and edit path boardtype_friendlyelec.c:141

sunxi_platform    : Sun8iw7p1
sunxi_secure      : normal
sunxi_chipid      : 2c21020e786746240000540000000000
sunxi_chiptype    : 00000042
sunxi_batchno     : 1
sunxi_board_id    : 1(0)

 

Using username "root".
Authenticating with public key "imported-openssh-key"
 _   _                   ____  _   _   _
| \ | | __ _ _ __   ___ |  _ \(_) | \ | | ___  ___
|  \| |/ _` | '_ \ / _ \| |_) | | |  \| |/ _ \/ _ \
| |\  | (_| | | | | (_) |  __/| | | |\  |  __/ (_) |
|_| \_|\__,_|_| |_|\___/|_|   |_| |_| \_|\___|\___/


Welcome to ARMBIAN 5.37.171221 nightly Ubuntu 16.04.3 LTS 4.13.14-sunxi
System load:   0.00 0.05 0.27   Up time:       45 min           Local users:   2
Memory usage:  8 % of 493MB     Swap usage:    1 % of 246Mb     IP:            169.254.13.54 192.168.1.146
CPU temp:      45°C
Usage of /:    7% of 15G

Last login: Sat Dec 23 23:32:49 2017 from 192.168.1.167

[ Kernel was updated, please reboot ]

root@nanopineo:~# gpio readall
 +-----+-----+----------+------+---+-NanoPi-NEO--+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3V |      |   |  1 || 2  |   |      | 5V       |     |     |
 |  12 |   8 |  GPIOA12 |  OFF | 0 |  3 || 4  |   |      | 5V       |     |     |
 |  11 |   9 |  GPIOA11 |  OFF | 0 |  5 || 6  |   |      | 0v       |     |     |
 | 203 |   7 |  GPIOG11 |  OFF | 0 |  7 || 8  | 0 | OFF  | GPIOG6   | 15  | 198 |
 |     |     |       0v |      |   |  9 || 10 | 0 | OFF  | GPIOG7   | 16  | 199 |
 |   0 |   0 |   GPIOA0 |  OUT | 1 | 11 || 12 | 0 | OFF  | GPIOA6   | 1   | 6   |
 |   2 |   2 |   GPIOA2 |  OUT | 1 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |   GPIOA3 |  OFF | 0 | 15 || 16 | 0 | OFF  | GPIOG8   | 4   | 200 |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | OFF  | GPIOG9   | 5   | 201 |
 |  64 |  12 |   GPIOC0 |  OUT | 1 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |   GPIOC1 |  OFF | 0 | 21 || 22 | 0 | OFF  | GPIOA1   | 6   | 1   |
 |  66 |  14 |   GPIOC2 |  OUT | 0 | 23 || 24 | 0 | OUT  | GPIOC3   | 10  | 67  |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+-NanoPi-NEO--+------+----------+-----+-----+

 +-----+----NanoPi-NEO Debug UART-+----+
 | BCM | wPi |   Name   | Mode | V | Ph |
 +-----+-----+----------+------+---+----+
 |   4 |  17 |   GPIOA4 | ALT5 | 0 | 37 |
 |   5 |  18 |   GPIOA5 | ALT5 | 0 | 38 |
 +-----+-----+----------+------+---+----+

 

Edited by Phạm Thành

Share this post


Link to post
Share on other sites
On 12/23/2017 at 7:39 PM, Thành Phạm said:

 

You can work around by creating file /etc/sys_info and edit path boardtype_friendlyelec.c:141


sunxi_platform    : Sun8iw7p1
sunxi_secure      : normal
sunxi_chipid      : 2c21020e786746240000540000000000
sunxi_chiptype    : 00000042
sunxi_batchno     : 1
sunxi_board_id    : 1(0)

 

 

if you are working with NanoPi Neo Core you have to change

sunxi_board_id: 5(0)

 

please refer to boardtype_friendlyelec.c for BoardHardwareInfo gAllBoardHardwareInfo[]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
2 2