Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-config | enable Wifi on RPi Zero W #1631

Closed
k-plan opened this Issue Mar 17, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@k-plan
Copy link
Collaborator

commented Mar 17, 2018

Creating a bug report/issue:

Required Information:

  • DietPi Version | cat /DietPi/dietpi/.version?
  • SBC Device (EG: RPi 3)?
 ───────────────────────────────────────
 DietPi     | 20:23 | Sat 17/03/18
 ───────────────────────────────────────
 v6.4       | RPi Zero W (armv6l)
 ───────────────────────────────────────
  • Power supply used (EG: 5v 1A RAVpower)?

official RPi PSU 5.1 V / 2.5 A

  • SD card used (EG: Sandisk ultra)?

SanDisk Mobile Ultra 4GB

  • Distro (EG: Jessie) | uname -a?

root@RPi-Zero-W:~# cat /proc/version
Linux version 4.9.80+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1098 Fri Mar 9 18:51:28 GMT 2018

Base:
DietPi_v6.0_RPi-ARMv6-Stretch.img => updated to v6.4

  • Networking eth0 via USB adapter:
root@RPi-Zero-W:~# lsusb
Bus 001 Device 003: ID 0bda:8153 Realtek Semiconductor Cor
root@RPi-Zero-W:~# dmesg
....
[    1.753652] usb 1-1.3: new high-speed USB device number 3 using dwc_otg
[    1.807979] systemd[1]: System time before build time, advancing clock.
[    1.884844] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=8153
[    1.887547] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[    1.889970] usb 1-1.3: Product: USB 10/100/1000 LAN
[    1.892307] usb 1-1.3: Manufacturer: Realtek
[    1.894676] usb 1-1.3: SerialNumber: 000001000000
....

Extra details:

Some fluster messages appears:


  • Login screen:
    • Why -bash: gettext.sh: No such file or directory ?
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

-bash: gettext.sh: No such file or directory

[  OK  ] Root access verified.
 ───────────────────────────────────────
 DietPi     | 20:23 | Sat 17/03/18
 ───────────────────────────────────────
 v6.4       | RPi Zero W (armv6l)
 ───────────────────────────────────────

  • enable Wifi via dietpi-config :
    • Why APT installation for: firmware-ralink, please wait.. every time ?
### enable WiFi (first time)

 , please wait
[ SUB1 ] DietPi-Set_Hardware > wificreds (set)
[  OK  ] wificreds set | Completed
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB1 ] DietPi-Set_Hardware > wifimodules (enable)
[ INFO ] DietPi-Set_Hardware | Checking for pre-req APT packages: crda firmware-atheros firmware-brcm80211 firmware-ralink iw rfkill wireless-tools wpasupplicant

[ INFO ] DietPi-Set_Hardware | Flagged for installation: firmware-ralink
[ INFO ] DietPi-Set_Hardware | APT installation for: firmware-ralink, please wait...
[  OK  ] DietPi-Set_Hardware | G_AGI: firmware-ralink

[ INFO ] DietPi-Set_Hardware | Please wait, enabling WiFi Modules...
[  OK  ] wifimodules enable | Completed
[ INFO ] DietPi-Config | Dropping connections, please wait...
[ INFO ] DietPi-Config | Restarting networking services, please wait...

Testing:

root@RPi-Zero-W:~# apt-get install firmware-ralink
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'firmware-misc-nonfree' instead of 'firmware-ralink'
firmware-misc-nonfree is already the newest version (1:20161130-3+rpt3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


    • Why try wifi to start and Failed to try-restart ntp.service: Unit ntp.service not found. ?
### connect with correct wificreds 

Connecting to Wifi
 , please wait
[ SUB1 ] DietPi-Set_Hardware > wificreds (set)
[  OK  ] wificreds set | Completed
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB1 ] DietPi-Set_Hardware > wifimodules (enable)
[ INFO ] DietPi-Set_Hardware | Checking for pre-req APT packages: crda firmware-atheros firmware-brcm80211 firmware-ralink iw rfkill wireless-tools wpasupplicant

[ INFO ] DietPi-Set_Hardware | Flagged for installation: firmware-ralink
[ INFO ] DietPi-Set_Hardware | APT installation for: firmware-ralink, please wait...
[  OK  ] DietPi-Set_Hardware | G_AGI: firmware-ralink

[ INFO ] DietPi-Set_Hardware | Please wait, enabling WiFi Modules...
[  OK  ] wifimodules enable | Completed
[ INFO ] DietPi-Config | Dropping connections, please wait...
[ INFO ] DietPi-Config | Restarting networking services, please wait...
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:27:eb....
Sending on   LPF/wlan0/b8:27:eb....
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST of 192.168.0.100 on wlan0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.0.100 from 192.168.0.1
DHCPACK of 192.168.0.100 from 192.168.0.1

Failed to try-restart ntp.service: Unit ntp.service not found.
invoke-rc.d: initscript ntp, action "try-restart" failed.
Unit ntp.service could not be found.

bound to 192.168.0.100 -- renewal in 3295 seconds.
[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : cron
[ SUB2 ] DietPi-Process_tool > Apply
[  OK  ] DietPi-Process Tool | Completed

@k-plan k-plan added the Question label Mar 17, 2018

@CyberWeapon

This comment has been minimized.

Copy link

commented Mar 18, 2018

"Why -bash: gettext.sh: No such file or directory?"
The error is because the gettext package is not installed. I had the same issue and 'apt install gettext' solved it. I started with a fresh install and didn't see the error. It showed up after I added software (Node-Red, I2C, RPI.gpio and WiringPi). The message is coming from the /etc/profile.d/wifi-country.sh file which is part of the raspberrypi-sys-mods package.

@k-plan

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 18, 2018

@CyberWeapon

Thanks for your answer and the hint to /etc/profile.d/wifi-country.sh 👍

I started with a fresh install and didn't see the error. It showed up after I added software ...

Here it's started with a fresh install and try to configure wifi first time.
It is no additional software installed.

So let us hope @Fourdee and @MichaIng can fix it. 😉

As well with firmware-ralink and ntp.service error message ...

Fourdee added a commit that referenced this issue Mar 18, 2018

v6.5
+ DietPi-Config | Removed 'firmware-ralink' pre-req from WiFi enable.
This is a virtual package for 'firmware-misc-nonfree':
#1631

Fourdee added a commit that referenced this issue Mar 19, 2018

v6.5
+ General | RPi: Resolved issue with gettext error during login due to
/etc/profile.d/wifi-country.sh:
#1631

+ #Remove firmware-misc-nonfree if firmware-linux-nonfree is not
installed, not required for SBC's:
#1631
@Fourdee

This comment has been minimized.

Copy link
Collaborator

commented Mar 19, 2018

  1. 🈯️ resolved
  2. 🈯️ resolved
  3. Why try wifi to start and Failed to try-restart ntp.service: Unit ntp.service not found.
    @k-plan
    Cant seem to replicate this or find any reference to ntp service in our code. standard timesync mode used in dietpi-config?
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST of 192.168.0.104 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.0.104 from 192.168.0.1
DHCPACK of 192.168.0.104 from 192.168.0.1
bound to 192.168.0.104 -- renewal in 626013797 seconds.
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:27:eb:db:06:0e
Sending on   LPF/wlan0/b8:27:eb:db:06:0e
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : cron
[ SUB2 ] DietPi-Process_tool > Apply
[  OK  ] DietPi-Process Tool | Completed

@Fourdee Fourdee added this to the v6.5 milestone Mar 19, 2018

@k-plan

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 19, 2018

@Fourdee

Cant seem to replicate this or find any reference to ntp service in our code. standard timesync mode used in dietpi-config?

😢

root@RPi-Zero-W:~# cat /var/lib/dietpi/.dietpi_image_version
6
4

😉

2018-03-19 17-35-59

Connecting to WiFi
 , please wait
[ SUB1 ] DietPi-Set_Hardware > wificreds (set)
[  OK  ] wificreds set | Completed
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB1 ] DietPi-Set_Hardware > wifimodules (enable)
[ INFO ] DietPi-Set_Hardware | Checking for pre-req APT packages: crda firmware-atheros firmware-brcm80211 iw rfkill wireless-tools wpasupplicant
[ INFO ] DietPi-Set_Hardware | Pre-req APT packages are installed
[ INFO ] DietPi-Set_Hardware | Please wait, enabling WiFi Modules...
[  OK  ] wifimodules enable | Completed
[ INFO ] DietPi-Config | Dropping connections, please wait...
[ INFO ] DietPi-Config | Restarting networking, please wait...
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/


Listening on LPF/wlan0/b8:27:eb:00:00:10
Sending on   LPF/wlan0/b8:27:eb:00:00:10
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST of 192.168.0.100 on wlan0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.0.100 from 192.168.0.1
DHCPREQUEST of 192.168.0.100 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.100 from 192.168.0.1
Failed to try-restart ntp.service: Unit ntp.service not found.
invoke-rc.d: initscript ntp, action "try-restart" failed.
Unit ntp.service could not be found.
bound to 192.168.0.100 -- renewal in 2811 seconds.
[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : cron
[ SUB2 ] DietPi-Process_tool > Apply
[  OK  ] DietPi-Process Tool | Completed

Failed to try-restart ntp.service: Unit ntp.service not found.
invoke-rc.d: initscript ntp, action "try-restart" failed.
Unit ntp.service could not be found.

root@RPi-Zero-W:~# find / | grep invoke-rc.d
/usr/sbin/invoke-rc.d
/usr/share/bash-completion/completions/invoke-rc.d
@ghost

This comment has been minimized.

Copy link

commented Mar 20, 2018

It seems like the user is not using the internal WiFi, but is using an USB-Key maye. If not using provided Wifi by the Zero W (WH) itself, there is no problem at all with DietPi. It may be a damaged board or whatever finally.....

@Fourdee

This comment has been minimized.

Copy link
Collaborator

commented Mar 25, 2018

@k-plan

I'll mark this as closed, as unable to replicate #1631 (comment) in v6.5 testing branch.

If problems persist with v6.5 after release, please reopen with detailed steps so we can try and replicate.

@Fourdee Fourdee closed this Mar 25, 2018

@Fourdee Fourdee referenced this issue Mar 28, 2018

Merged

v6.5 #1652

Fourdee added a commit that referenced this issue Mar 28, 2018

Merge pull request #1652 from Fourdee/testing
**v6.5
(28/03/18)**

**Changes / Improvements / Optimizations:**

General | Minor code performance enhencements: #1510

General | Our scripts preserve now the terminal scrollback buffer, when cleaning current terminal view: #1615

General | G_WHIP_*: Rolled out to all DietPi scripts.

General | Sparky SBC: Kernel update: https://github.com/sparky-sbc/sparky-test/tree/master/dsd-marantz

DietPi-Environment | Move sudoers adjustments to "/etc/sudoers.d/dietpi": #1635

DietPi-Environment | Move sysctl adjustments to "/etc/sysctl.d/dietpi.conf" to assure higher priority than "/etc/sysctl.d/99-sysctl.conf": #1635

DietPi-Config | Enabled possibility to adjust display resolution for VMs, but max guest display resolution might need to be adjusted within VM software as well: #1227

DietPi-Config | Advanced options: You can now define the swapfile location: #1602

DietPi-Config | Soundcards (RPi): Added option for ApplePi DAC: #1626

DietPi-Services | Start/Stop order is now based on service dependencies: #1462

DietPi-Process_Tool | Added ability to add custom process entries to "/DietPi/dietpi/.dietpi-process_tool_include". Add one process each line with the format <chosenName>:<executableFileName>. Check via htop, e.g. "DHCP client:dhclient"

DietPi-Software | NoMachine: Installation updated to 6.0.78 (new installations only): #1340 (comment)

DietPi-Software | Squeezebox server: Updated to systemd native service: #1613

DietPi-Software | AmiBerry: Updated to 2.18. Improved audio latency, Unique new feature: WHDLoad booter! (check the wiki for details), bug fixes: #1410 (comment)

DietPi-Software | RPi: For all software titles which require unrar, unrar-nonfree is now installed via Debian package (previously unrar-free): #865 (comment)

DietPi-Software | MPD: Resolved an issue where "libwrap0" (libwrap.so.0) was missing to start MPD service: http://dietpi.com/phpbb/viewtopic.php?f=9&t=2779

DietPi-Software | MPD: Updated to 0.20.18. Compiled with UPnP support enabled: #1614

**Bug Fixes:**

General | dphys-swapfile: Has been removed and replace with our own swapfile generation system. Uses fallocate to quickly create the swapfile of any size (1-2 seconds): #1602

General | RPi: Resolved issue with gettext error during login due to /etc/profile.d/wifi-country.sh: #1631

General | RPi: Resolved missing Allo Piano DAC firmware.

General | RPi 3B+: Resolved inability to scan/connect with WiFi: #1627 (comment)

DietPi-Drive_Manager | Resolved an issue where x-systemd.automount would fail if autofs4 was disabled in kernel/modules (eg: Rock64). x-systemd.automount is now disabled for systems which fail autofs4 detection: #1607

DietPi-Config | Removed 'firmware-ralink' pre-req from WiFi enable. This is a virtual package for 'firmware-misc-nonfree': #1631

DietPi-Config | RPi: Resolved missing Allo Piano DAC 2.1 entry.

DietPi-Software | PineA64: Resolved issue with failure to run fbturbo driver on Debian Stretch: #1604

DietPi-Software | LMS/Squeezebox: Resolved an issue where installation could fail to complete, due to service failing to stop gracefully. Resolved CPAN issues running under ARMv8 and Stretch: #1613 (comment)

DietPi-Software | ShairportSync (Jessie): Resolved failed service start due to lack of libssl1.1: #1620

DietPi-Software | MATE + VNC4: Resolved grey screen: #1645

DietPi-Software | Mopidy: Resolved no sound due to missing gstreamer1.0-alsa package: #1625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.