dietpi-config error

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

dietpi-config error

Post by Gord_W »

Using NanoPi NEO with v140 dietpi

Trying to set up static IP for wireless through dietpi-config.

Seems to be a few issues. The static IP was not applied on first setting. After reboot it got applied.

I tried turning off IPv6 as I don't need it. Dietpi-config says it is turned off, but netdata monitor shows there is IPv6 activity (errors) and it hasn't been disabled.

During trying to set IP things up, this error would flash across the screen before returning to the menu.
/DietPi/dietpi/dietpi-config: line 2292: ((: < 0 : syntax error: operand expected (error token is "< 0 ")

Gordon Williams
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: dietpi-config error

Post by Gord_W »

One other observation on networking on NanoPi.

The ethernet lights (green and yellow on connector) stay lit regardless of whether anything is connected.

With rpi these are off unless there is a live ethernet connection.

Gordon Williams
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-config error

Post by Fourdee »

Hi Gordon,

Thanks for the report, i'll take a look: https://github.com/Fourdee/DietPi/issues/681

In regards to the LED lights. I'll pass this over to ARMbian as its most likely down to the dtb/fex that needs modifying.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-config error

Post by Fourdee »

Hi Gordon,

I believe the IPv6 issue is a bug in NetData. IPv6 is disabled at system level, yet it pulls in invalid stats. i've created a ticket for NetData devs:
https://github.com/firehol/netdata/issues/1510

As for the:
/DietPi/dietpi/dietpi-config: line 2292: ((: < 0 : syntax error: operand expected (error token is "< 0 ")
Looks like its failing to pull in the Wifi Signal strength stats:

Code: Select all

WIFI_SIGNALSTRENGTH=$(iwconfig wlan0 | grep -m1 'Signal level=' | awk '{ print $4 }' | sed 's/level=//g' | cut -f1 -d "/")
Could you please run the following command and paste results, should help us debug this:

Code: Select all

iwconfig wlan0
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: dietpi-config error

Post by Gord_W »

A lot has happened since I posted.
I downloaded a fresh copy V140 for NanoPi NEO and put it on the SD card.

Attached ethernet cable and usb power. Wifi dongle plugged in.

Booted and it went through the update and reboot.

Went through startup screens and selected dieti-config from menu.

In Network Options Adapters
Ethernet was available/Enabled and Connected
Wifi was available/ disabled and Disconnected

Clicked on Wifi and it said that it had to enable.
Automatic download of iproute and netplug **** IF you don't have an internet connection how would you get these?? ****

[Info] Please wait, enabling WiFi Modules...
[Ok] wifi enable | Completed


- Restarting networking services...
ifup: interface eth0 already configured
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/40:a5:ef:d2:ee:52
Sending on LPF/wlan0/40:a5:ef:d2:ee:52
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19

**** NO ssid or pw has been set at this point so it fails after a wait ************

Goes back to Network Options
Click on Wifi to set up static wifi
Manual - enter SSID and PW
Say OK to connect now ***** This was a mistake as I haven't set the static info yet ****************

Goes through wifi enable again **** wifi was already enabled earlier, but OK ******
says it is connected
Connecting to Williams , please wait

DietPi-Services
─────────────────────────────────────────────────────
Mode: stop
Please wait...

[Ok] cron

[Info] Dropping connections, please wait...

DietPi-Set_Hardware
─────────────────────────────────────────────────────
Mode: wifi (enable)
Please wait...

[Info] Please wait, enabling WiFi Modules...
[Ok] wifi enable | Completed


- Restarting networking services...
ifup: interface eth0 already configured
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/40:a5:ef:d2:ee:52
Sending on LPF/wlan0/40:a5:ef:d2:ee:52
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.10 -- renewal in 36063 seconds.

DietPi-Services
─────────────────────────────────────────────────────
Mode: start
Please wait...

[Ok] cron


DietPi-Process_Tool
─────────────────────────────────────────────────────
Mode: Apply
Please wait...

Cron (3610)
[Ok] Nice 0
[Ok] Affinity 0-3
[Ok] Scheduler SCHED_OTHER 0
DHCP Client (3514)
[Ok] Nice 0
[Ok] Affinity 0-3
[Ok] Scheduler SCHED_OTHER 0

OOPS - I clicked on the terminal window to try and capture the output the whole thing stopped. Not sure it was the click on the window or something else ...

Tried to ssh back in to ethernet - failed
Tried to ssh in to wifi - failed
tried to ping both wifi and ethernet - failed

reconnect power
ssh back in and it sent me to License page tried to click OK. Nothing happened. Couldn't get out - dead. Closed terminal

Opened new terminal
couldn't ssh or ping ethernet or wifi connection

wifi dongle gives occasional flash
ethernet green light gives occasional flash.

power down and up
ping works on wifi and ethernet
ssh into ethernet

License OK works this time.

Welcome - click OK, USB -no

Dietpi-config
This time I see change DHCP and set to STATIC

Set IP etc.

Click Apply settings and nothing much happens
Click on OK at bottom and get
Connecting to Williams , please wait

DietPi-Services
─────────────────────────────────────────────────────
Mode: stop
Please wait...

[Ok] cron

[Info] Dropping connections, please wait...

DietPi-Set_Hardware
─────────────────────────────────────────────────────
Mode: wifi (enable)
Please wait...

[Info] Please wait, enabling WiFi Modules...
[Ok] wifi enable | Completed


- Restarting networking services...
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

and then nothing. :? Everything stopped

Close terminal
Open new terminal NanoPi can't be reconnected to.

Power down and up
SSH in and get back in menu - How do I escape ??? :shock:
Got to exit but then get message
Installation Aborted by User
Installation must be completed prior to using DietPi
Please run dietpi-software to restart the installation

root@DietPi:~# iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:"Williams"
Mode:Managed Frequency:2.412 GHz Access Point: 64:66:B3:F4:35:F8
Bit Rate=43.3 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:AACC-CCDD-BE
Power Management:off
Link Quality=70/70 Signal level=-17 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2 Missed beacon:0

root@DietPi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 02:20:19:92:70:b4
inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20:19ff:fe92:70b4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:181 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44034 (43.0 KiB) TX bytes:1200 (1.1 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:190 (190.0 B) TX bytes:190 (190.0 B)

wlan0 Link encap:Ethernet HWaddr 40:a5:ef:d2:ee:52
inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::42a5:efff:fed2:ee52/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:224 errors:0 dropped:0 overruns:0 frame:0
TX packets:150 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23068 (22.5 KiB) TX bytes:49929 (48.7 KiB)

More to come
Last edited by Gord_W on Wed Jan 04, 2017 10:21 pm, edited 1 time in total.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: dietpi-config error

Post by Gord_W »

In dietpi-config

turned of IPv6

reboot

ssh in - back in setup menu :cry:

Hoping that if I click install (with no software selected that I won't get the menu system again)

It went through a whole bunch of stuff (although I didn't select anything!) then it rebooted on me.

wireless still connected

root@DietPi:~# iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:"Williams"
Mode:Managed Frequency:2.412 GHz Access Point: 64:66:B3:F4:35:F8
Bit Rate=65 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:AACC-CCDD-BE
Power Management:off
Link Quality=70/70 Signal level=-17 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2 Missed beacon:0

root@DietPi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 02:20:19:92:70:b4
inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:118 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39370 (38.4 KiB) TX bytes:684 (684.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:288 (288.0 B) TX bytes:288 (288.0 B)

wlan0 Link encap:Ethernet HWaddr 40:a5:ef:d2:ee:52
inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:134 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16736 (16.3 KiB) TX bytes:15036 (14.6 KiB)

IPv6 doesn't show up. Good.
So, after all that, I think that I've got to the place that I want to be with ethernet and wifi

Gordon
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-config error

Post by Fourdee »

Hi Gordon,

Thanks for the report and feedback. I'll go through those and see if we can make improvements.

You can pre-define WiFi options in dietpi.txt, after writing the image and before powering on. This would save you having to do lengthy process you posted above.
  • Write DietPi Image to SD
  • Make the changes in /boot/dietpi.txt:

    Code: Select all

    Wifi_Enabled=1
    
    #Enter your Wifi details below, if applicable (Case Sensitive).
    Wifi_SSID=changeme
    Wifi_KEY=changeme
  • Plug in WiFi dongle (no need for eth) and power on.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: dietpi-config error

Post by Gord_W »

Wifi stopped working. This is the second time it has happened. I don't know when as I wasn't watching it. NanoPi was idle with the following running (no ssh or top):

1 root 20 0 5056 3628 2120 S 0.0 0.7 0:10.90 systemd
234 root 20 0 7380 2284 2032 S 0.0 0.4 0:02.17 `- systemd-journal
267 root 20 0 10616 2304 1800 S 0.0 0.5 0:00.52 `- systemd-udevd
590 root 20 0 2684 1720 1540 S 0.0 0.3 0:01.00 `- systemd-logind
634 message+ 20 0 4584 2456 2140 S 0.0 0.5 0:00.11 `- dbus-daemon
642 root 20 0 1960 992 884 S 0.0 0.2 0:00.03 `- dropbear
23955 root 20 0 2372 1480 1252 S 0.0 0.3 0:02.78 `- dropbear
24093 root 20 0 5644 3340 2328 S 0.0 0.7 0:01.35 `- bash
26207 root 20 0 5036 2124 1792 R 3.2 0.4 0:03.82 `- top
1027 root 20 0 1372 980 908 S 0.0 0.2 0:00.01 `- netplugd
1162 root 20 0 4032 1368 1252 S 0.0 0.3 0:00.01 `- agetty
1164 root 20 0 5076 1840 1724 S 0.0 0.4 0:00.01 `- agetty
1200 root 20 0 7776 6012 1316 S 0.0 1.2 0:00.01 `- dhclient
1298 root 20 0 6128 2168 1968 S 0.0 0.4 0:00.41 `- cron
1309 root 20 0 13564 2956 1724 S 0.0 0.6 0:02.79 `- proftpd
1314 netdata 39 19 130504 17296 1628 S 2.6 3.4 34:28.49 `- netdata
8259 netdata 39 19 2492 1752 1228 S 5.4 0.3 1:57.20 `- apps.plugin
9785 netdata 39 19 6840 3456 2116 S 12.8 0.7 3:21.17 `- charts.d.plugin
26971 netdata 39 19 4648 324 276 S 0.3 0.1 0:00.01 `- sleep
11307 netdata 39 19 5784 2556 2268 S 1.9 0.5 0:36.35 `- tc-qos-helper.s
26963 netdata 39 19 4648 352 304 S 0.3 0.1 0:00.01 `- sleep

root@NanoPi:~# iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off


root@NanoPi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 02:20:19:92:70:b4
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49488 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10113052 (9.6 MiB) TX bytes:8586 (8.3 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:1300 (1.2 KiB) TX bytes:1300 (1.2 KiB)

wlan0 Link encap:Ethernet HWaddr 40:a5:ef:d2:ee:52
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:22623 errors:0 dropped:0 overruns:0 frame:0
TX packets:12851 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2810915 (2.6 MiB) TX bytes:6994532 (6.6 MiB)

So it looks like it has become disassociated with the AP

dmesg (I don't know if this coincided with the wifi dongle going down)
[ 212.086569] ieee80211 phy0: rt2800usb_txdone: Warning - Data pending for entry 1 in queue 2

root@NanoPi:~# lsmod
Module Size Used by
ccm 6416 0
evdev 10043 0
rt2800usb 16354 0
rt2800lib 57186 1 rt2800usb
rt2x00usb 9309 1 rt2800usb
rt2x00lib 34144 3 rt2800lib,rt2800usb,rt2x00usb
mac80211 322651 3 rt2800lib,rt2x00lib,rt2x00usb
cfg80211 191427 2 rt2x00lib,mac80211
rfkill 10928 1 cfg80211
sun8i_ths 3284 0
uio_pdrv_genirq 3354 0
gpio_keys 8453 0
cpufreq_dt 3522 0
thermal_sys 42239 2 cpufreq_dt,sun8i_ths
uio 8012 1 uio_pdrv_genirq
fuse 70616 1

root@NanoPi:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So it looks like there are still some stability problems.
Gordon Williams
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: dietpi-config error

Post by Gord_W »

When I got up this morning the wifi had become disassociated again with the access point.
dmesg (I don't know if this coincided with the wifi dongle going down)
[ 212.086569] ieee80211 phy0: rt2800usb_txdone: Warning - Data pending for entry 1 in queue 2
This time there is no dmesg so I guess that was a red herring.

The wifi dongle is a WiPi

Gordon Williams

Edit:
I've tested with another wifi dongle and it works OK :) No disassociation after 12 hrs of running.
Bus 004 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
So it looks like it is only a problem with the wipi dongle.
Post Reply