Great work on this project, I'm having the following issue with standard
PiZeroW.  Do you have a link so I can donate?

paul- wrote: 
> if you edit the file /opt/bootlocal.sh.   Add the following lines AFTER
> the #pCPstop------  line
> 
> > 
Code:
--------------------
  >   > 
  > ifconfig | grep -q Bcast
  > if [ $? -ne 0 ]; then
  > echo "Entering Wifi Ad-Hoc mode"
  > pkill udhcpd
  > 
  > [ ! -d /var/lib/misc ] && mkdir /var/lib/misc
  > touch /var/lib/misc/udhcpd.lease
  > 
  > cat << EOF > /etc/udhcpd.conf
  > interface wlan0
  > start 10.10.10.2
  > end 10.10.10.10
  > opt subnet 255.255.255.0
  > opt dns 10.10.10.1
  > opt router 10.10.10.1
  > EOF
  > 
  > ifconfig wlan0 down
  > iwconfig wlan0 mode ad-hoc
  > iwconfig wlan0 key 1234567ABC
  > iwconfig wlan0 channel 6 essid pCP
  > ifconfig wlan0 10.10.10.1 netmask 255.255.255.0 up
  > 
  > udhcpd
  > 
  > DONE=0
  > until [ $DONE -ne 0 ]; do
  > if [ "$(iwgetid -r)" != "pCP" ]; then
  > echo "New SSID Connected"
  > DONE=1
  > fi
  > ifconfig eth0 | grep -q Bcast
  > if [ $? -eq 0 ]; then
  > echo "eth0 is now up"
  > DONE=1
  > fi
  > sleep 5
  > done
  > pkill udhcpd
  > echo "Exiting"
  > fi
  > 
--------------------
> > 
> 
> 

I've tried this script with PiCorePlayer 3.22 and a standard PiZeroW,
but it does the following:

On the terminal window, the adding the above code goes through the usual
boot process...

***NOTE 1*** Allowing the wlan0 to fail 3 times, then
Loading pcp-lms-functions... Done.
Waiting for soundacrds to populate. Done (1).
Starting ALSO configuration... Done.
Waiting for network................................ No network found!
Done (42).
Starting Openssh server... Done.
Mounting USB Drives....
***NOTE 2*** Starting LMS, this can take some time... No network
interface is UP.....exiting 
Done.
Starting httpd web server... Done.
Finished piCorePlayer setup.
crond syncing time...
Entering Wifi Ad-Hoc mode
ifconfig eth0: eth0 error fetching interface information device not
found
ifconfig eth0: eth0 error fetching interface information device not
found
ifconfig eth0: eth0 error fetching interface information device not
found
ifconfig eth0: eth0 error fetching interface information device not
found
...(this message repeated every 5 seconds forever)

1. On my Windows PC, I can then connect to network "pCP", can access
"10.10.10.1" which gets me to the piCoreplayer screen and then I
manually start LMS and everything is okay.

2. 
***NOTE 1*** This wait is HUGE, and always of course fails when using
the ad-hoc network, so I have to do the manual start of LMS in the
sentence above.  I tried turning off "Autostart LMS" in the settings 
***Question 1*** I was looking for a config file to change the retries
from 3 to 1 using a -t flag. Is there a config file and it this
possible?

3. 
***NOTE 2*** This wait is HUGE, and always of course fails when using
the ad-hoc network, so I have to do the manual start of LMS in the
sentence above.  I tried turning off "Autostart LMS" in the settings to
avoid this wait but it then breaks LMS totally, as when I try the manual
start (when connected to a regular wifi or the ad-hoc one) it just
hangs.

4. 
***NOTE 2*** The ad-hoc network cannot be seen by all my android devices
(I was hoping to use my phone to manually switch the LMS on.
***Question 2***  Is there a way to start LMS in the script above before
it hits the "ifconfig eth0: eth0 error fetching interface information
device not found" loop?

Thanks again for all your hard work on this, and it you have a donate
link, let me know.


------------------------------------------------------------------------
shaunm's Profile: http://forums.slimdevices.com/member.php?userid=11987
View this thread: http://forums.slimdevices.com/showthread.php?t=107995

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to