Dietpi: Image | OrangePi Zero

Created on 8 Dec 2016  路  12Comments  路  Source: MichaIng/DietPi

Most helpful comment

The original issue lies in here.

root@DietPi:~# systemctl status  systemd-modules-load.service

   Active: failed (Result: exit-code) since Thu 2017-02-23 20:00:17 SGT; 11min ago
     Docs: man:systemd-modules-load.service(8)

Feb 23 20:00:16 DietPi systemd-modules-load[160]: Module 'fuse' is builtin
Feb 23 20:00:17 DietPi systemd-modules-load[160]: Failed to insert 'xradio_wlan': Connection timed out

I don't think this 'fix' is working very well =/

root@DietPi:~# systemctl -all | grep xr
  xradio_wlan.service                                                                                   loaded    active   exited    xradio_wlan

The service is loaded. but the device isn't connected to the wifi yet.
modprobe launched successfully when i do lsmod.

To activate wifi I have to manually
/bin/bash -c 'iwconfig wlan0 power off'
/bin/bash -c 'ifup wlan0'

Might i suggest a timer?

/bin/bash -c 'sleep 10;ifup wlan0'

It's working for me this way. Just have to wait 10 seconds.

The issue with the 'horrendous' pings to/fro opizero is probably due to the powermanagement within the driver. It waits till a specific time to send out its packets or waits till its buffer gets full i believe.
If you do a ping of 0.1s, you will see the pings come at 1-3ms instead of 1 - 1500ms
sudo ping -s 1 -i 0.1 <opiip>

Or if you don't care about the power consumption, do this from your orangepi itself.
sudo ping -s 1 -i 0.2 <orangePiWifiIp>
Basically it is a loopback test but targetted at the wifi ip. It works!

However, I'm not good at drivers. So can't really help much in this.

All 12 comments

dhd wifi module hangs system.

Image created by @aliosa27 : https://github.com/Fourdee/DietPi/pull/631

@aliosa27
Sound working fine. I'll add to website and release your image 馃憤

Still having issues with wifi module not being enabled during boot.

Workaround (also tested in AP mode):

cat << _EOF_ > /etc/systemd/system/xradio_wlan.service
[Unit]
Description=xradio_wlan
After=network.target network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes

ExecStartPre=/bin/bash -c 'modprobe xradio_wlan'
ExecStartPre=/bin/bash -c 'iwconfig wlan0 power off'
ExecStart=/bin/bash -c 'sleep 10; ifup wlan0'

[Install]
WantedBy=multi-user.target
_EOF_
systemctl enable xradio_wlan.service
systemctl daemon-reload

@aliosa27

Great work on this, your image is now live http://dietpi.com/#download. Will mark this as closed 馃憤

The original issue lies in here.

root@DietPi:~# systemctl status  systemd-modules-load.service

   Active: failed (Result: exit-code) since Thu 2017-02-23 20:00:17 SGT; 11min ago
     Docs: man:systemd-modules-load.service(8)

Feb 23 20:00:16 DietPi systemd-modules-load[160]: Module 'fuse' is builtin
Feb 23 20:00:17 DietPi systemd-modules-load[160]: Failed to insert 'xradio_wlan': Connection timed out

I don't think this 'fix' is working very well =/

root@DietPi:~# systemctl -all | grep xr
  xradio_wlan.service                                                                                   loaded    active   exited    xradio_wlan

The service is loaded. but the device isn't connected to the wifi yet.
modprobe launched successfully when i do lsmod.

To activate wifi I have to manually
/bin/bash -c 'iwconfig wlan0 power off'
/bin/bash -c 'ifup wlan0'

Might i suggest a timer?

/bin/bash -c 'sleep 10;ifup wlan0'

It's working for me this way. Just have to wait 10 seconds.

The issue with the 'horrendous' pings to/fro opizero is probably due to the powermanagement within the driver. It waits till a specific time to send out its packets or waits till its buffer gets full i believe.
If you do a ping of 0.1s, you will see the pings come at 1-3ms instead of 1 - 1500ms
sudo ping -s 1 -i 0.1 <opiip>

Or if you don't care about the power consumption, do this from your orangepi itself.
sudo ping -s 1 -i 0.2 <orangePiWifiIp>
Basically it is a loopback test but targetted at the wifi ip. It works!

However, I'm not good at drivers. So can't really help much in this.

@kutysam

Many thanks 馃憤
Yep, the current xradio_wlan driver is somewhat "flaky". Although, its been a while since we last built the base image using ARMbian build tools.
If I can get my OPi Zero to work (I think its completely dead, no serial, will test another adapter), i'll rebuild and test latest image/driver, hopefully its been "improved" since the last.

Or if you don't care about the power consumption, do this from your orangepi itself.
sudo ping -s 1 -i 0.2
Basically it is a loopback test but targetted at the wifi ip. It works!

Very interesting way to keep powersaving at bay 馃憤

I'll rebuild the base image over the next day or so. My wifi stays active so I never notice it go down.. pesky wifi

i discovered this 'ping' thing when i was using motion https://motion-project.github.io/

I was wondering, why did my ping become 1-2ms when i was streaming... and soon i realize, mjpeg streams really fast and multiple times within 1 second. So yeap.

Please do put in the 10second sleep function! Otherwise, it may not connect to wifi when the system comes online.

and perhaps you can put this note,
do not ever enable wifi and ethernet together at the same time. Though it will work, there are some weird issues.. such as,
wifi - .110, ethernet - .120

if you ping .110 and .120, it will direct to one of them only. try using arp and notice that.
if it is on windows, it will definetly direct to the correct interface.

Also, static IP doesn't work very well with opi0. =/ I used my router issue 'static' ip the fixed mac addresses

@kutysam

Please do put in the 10second sleep function! Otherwise, it may not connect to wifi when the system comes online.

Done 馃憤 , i've updated the workaround service.
Although, just bear in mind, as this is a oneshot service, it will delay boot by an additional 10 seconds. This is due to SystemD waiting for oneshot's to complete, before continuing to the next service.

I'll rebuild the base image over the next day or so.

@aliosa27

If you could do this, would be really grateful 馃憤

Hi! Just wondering, did you put
sudo ping -s 1 -i 0.2

I realize the power consumption is 0.35ma instead of 0.21ma.

Do you have the commit to github on this. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fourdee picture Fourdee  路  3Comments

and09 picture and09  路  3Comments

Fourdee picture Fourdee  路  3Comments

Invictaz picture Invictaz  路  3Comments

pfeerick picture pfeerick  路  3Comments