Volumio1.2 with LIRC and wifi issues

a) with a clean image of 1.2 I first set up a wifi connection using a Tenda Technology USB dongle. On power up the wifi does not come up (doesn’t appear to power up) with or without the LAN connected. If I power up with the LAN and wifi dongle connected the dongle still does not power up. If I then reboot (as against yanking the power)with both LAN and dongle connected then the wifi dongle powers up.

Bit of an issue as what it means in effect is I have to have a LAN connection present to get wifi to work! I tried adding /etc/init.d/networking restart to the rc.local file in /var/www/_OS_SETTINGS/etc but that did not work. Also tried adding
if down wlan0
ifup --force wlan0

to the same rc.local file but that didn’t turn the dongle on either - probably needs a pretty girl to turn it on!!

Any suggestions?

b) with a clean install of 1.2 I can set up my NAS via the WebUI. But if I then install LIRC via the apt-get update route it seems that, on reboot, the NAS will not mount. Attempts to remount, remove and/or add a new mount via the WebUI do not work. I then added cifs-utils and if I mount the NAS manually via SSH all appears to work (although it takes 8 hours to update the db!!!) . But if I reboot after this the NAS does not mount. I have tried adding the exact line to /etc/fstab but no luck getting it to mount on reboot.

Suspect the update is reconfiguring aspects of 1.2.

Again, any suggestions would be great! I enjoy the hours fiddling with it and, like Alice (or whoever it was) when it works it’s very, very nice but…

In reply to A)
I don’t know if you have resolved your wi-fi issues but I’ve just spent the last 3 days messing with my pi to get it working. I found that you were having the exact same wi-fi problem as me and I had tried all the same things as you. I am using a Ralink RT5370 chipset unnamed wi-fi dongle and it would not power up when I plugged in the power for the Raspberry pi, however rebooting the pi did the trick. Because I’m using it headless it’s impossible to call a reboot unless LAN is plugged in, so here’s what I did.

I modified the /etc/network/interfaces as such:

auto lo
iface lo inet loopback

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "myssid"
wpa-psk "mypassword"

# auto eth0
# iface eth0 inet dhcp

(I commented the last two line once the whole thing was working fine)

Then I found a cron script that was written to periodically check for wi-fi and modified it to reboot the pi if it can’t ping my router:

#!/bin/bash
##################################################################
# NOTE! THIS IS A MODIFIED VERSION OF THE ORIGINAL PROGRAM
# WRITTEN BY KEVIN REED.  TO GET THE ORIGINAL PROGRAM SEE
# THE URL BELOW:
#
# A Project of TNET Services, Inc
#
# Title:     WiFi_Check
# Author:    Kevin Reed (Dweeber)
#            dweeber.dweebs@gmail.com
# Project:   Raspberry Pi Stuff
#
# Copyright: Copyright (c) 2012 Kevin Reed <kreed@tnet.com>
#            https://github.com/dweeber/WiFi_Check
#
# Purpose:
#
# Script checks to see if WiFi has a network IP and if not
# restart WiFi
#
# Uses a lock file which prevents the script from running more
# than one at a time.  If lockfile is old, it removes it
#
# Instructions:
#
# o Install where you want to run it from like /usr/local/bin
# o chmod 0755 /usr/local/bin/WiFi_Check.sh
# o Add to crontab
#
# Run Every 5 mins - Seems like ever min is over kill unless
# this is a very common problem.  If once a min change */5 to *
# once every 2 mins */5 to */2 ... 
#
# */5 * * * * /usr/local/bin/WiFi_Check 
#
##################################################################
# Settings
# Where and what you want to call the Lockfile
lockfile='/var/run/WiFi_Check.pid'
# Which Interface do you want to check/fix
wlan='wlan0'
# Which address do you want to ping to see if you can connect
pingip='192.168.1.1'
##################################################################
echo
echo "Starting WiFi check for $wlan"
date
echo 

# Check to see if there is a lock file
if [ -e $lockfile ]; then
    # A lockfile exists... Lets check to see if it is still valid
    pid=`cat $lockfile`
    if kill -0 &>1 > /dev/null $pid; then
        # Still Valid... lets let it be...
        #echo "Process still running, Lockfile valid"
        exit 1
    else
        # Old Lockfile, Remove it
        #echo "Old lockfile, Removing Lockfile"
        rm $lockfile
    fi
fi
# If we get here, set a lock file using our current PID#
#echo "Setting Lockfile"
echo $$ > $lockfile

# We can perform check
echo "Performing Network check for $wlan"
/bin/ping -c 2 -I $wlan $pingip > /dev/null 2> /dev/null
if [ $? -ge 1 ] ; then
    echo "Network connection down! Rebooting"
    reboot
else
    echo "Network is Okay"   
fi


# Check is complete, Remove Lock file and exit
#echo "process is complete, removing lockfile"
rm $lockfile
exit 0

##################################################################
# End of Script

I saved it as /usr/local/bin/WiFi_Check.sh
Make sure you do chmod 0755 /usr/local/bin/WiFi_Check.sh or else it won’t execute and then you’ll be scratching your head like I did.

Then I found out that despite what everyone said the OS wasn’t overwriting the /etc/rc.local with /var/www/_OS_SETTINGS/etc/rc.local at every boot. I verified with : sudo nano +1167 /var/www/inc/player_lib.php
And the copy lines where commented out (I’m using VolumioBeta1.2PI).

So I modified the /etc/rc.local file as such:

/var/www/command/player_wdog.sh startup & > /dev/null 2>&1

sleep 20

/usr/local/bin/WiFi_Check.sh

exit 0

And voilà now the pi reboots if there’s no wi-fi connection and it automatically connects to the network after that. Hope this can help you and others with similar problems on this forum.

Vince - thanks for sharing. I shall give your solution a try. I suspect Michelangelo will fix the cause of the issue in the next release but meanwhile your solution looks like a fix.