PnP III v3.60 July 2017 Update

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

craig_1234 wrote: Sat Sep 16, 2017 3:04 am You are spot on. I've just realised what I've done :oops:
Great thanks - all good now.

FYI I was still losing icons regularly on both PNP 3.5 and 3.6, and have finally found the cause.
It seems to have been an SMB/Windows share onto my media server which is a sizeable raid volume (4TB), configured via the web GUI
Though LMS has no problem with it, scans and plays music from it, for some reason Tango was constantly consuming around 45% CPU (and making the Joggler quite warm as a result), seemingly crashing/restarting after a while, stealing focus and losing icons (restored at cold boot).
Not sure why Tango should be tickling the SMB share, but once it's unmounted, Tango load goes down to ~4%, and no loss of icons :)
craig_1234
Posts: 39
Joined: Mon Sep 10, 2012 1:33 am

Re: PnP III v3.60 July 2017 Update

Post by craig_1234 »

I'm not sure tbh. Maybe Tango is caching or scanning the drive in the background?

It could also be from where the CIFS share is mounted. When you use the gui the share is mounted from /etc/init.d/boot.d/S57boot.cifs

Try and put the CIFS mounting in /etc/init.d/boot.d/S99boot.hacks under starthacks() and see if that makes any difference. You might need to add a small delay for the network interface to come up.
pukington
Posts: 37
Joined: Fri Aug 12, 2011 10:53 pm
Contact:

Re: PnP III v3.60 July 2017 Update

Post by pukington »

craig_1234 wrote: Thu Sep 21, 2017 6:08 pm You can get a plugin for AirPlay via squeezeplay on PNP3. There is an official one and some 3rd party ones that are better supported. I don't have an iPhone so have no way of testing it, but have a look at the logitech squeezebox site http://forums.slimdevices.com/forumdisp ... y-Software or research "airplay plugin for squeezebox". There's probably also some tutorials on YouTube

This would be the easiest way to get airplay working on PNP3.
Cheers for the info Craig. Think i'm out of my depth, I found https://github.com/disaster123/shairpor ... /README.md plugin which looks to do what i seek. So I SSH'd into the Joggler, found apt-get not to be installed, so wget'd that, but then found dpkg isn't installed. That's about as far as my luck goes with linux! lol

i tried the Airplay Bridge in 3rd party apps within LMS but doesn't seem to work either, can't get a config file written correctly within it. Frustrating as thought that would sort me.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

Hi Craig,
It doesn't seem to matter when the CIFS mount is done, even if I manually mount the remote filesystem, then kill -HUP <tango PID> so that tango restarts, I get the same CPU use within a few secs. I tried just allowing guest access on the server, and some other mount options, but I'd say it's something in tango/opphone.swf that wants to access the share. Note that I can't umount without killing tango, so it's definitely keeping files open on the share.

So I created a smaller sub-share with just music (~9000 tracks), excluding TV, video and tens of thousands of Zoneminder CCTV files, and the Joggler is now happy, so it's most likely a count or path depth problem. Oh... OK I see the video app has scanned the filesystem as it sees the remote files as "local" being part of the filesystem once the CIFS mount is created - I have a handful of videos in my music collection that now appear. Doubtless that makes it rather busy when there are also a couple of thousand TV recordings and all those CCTV files...!
Hope this helps someone.
mb1
Posts: 18
Joined: Sat Apr 14, 2012 11:28 am

Re: PnP III v3.60 July 2017 Update

Post by mb1 »

To those suffering the "connection lost" problem in the Lounge for BBC streams, you can fix this by installing the BBC iPlayer Applet in Squeezeplay. It will crash with an update loop on the actual joggler, or install it via the web interface. I've been listening to the excellent R1 Vintage today and not a single loss of connection.
craig_1234
Posts: 39
Joined: Mon Sep 10, 2012 1:33 am

Re: PnP III v3.60 July 2017 Update

Post by craig_1234 »

The BBC iplayer and iPlayer Extra plugins via squeezeplay work fine, even for the catch-up radio. On the first page, I have included some instructions to update the plugin to the latest version which supports the DASH streaming method adopted by the BBC.

Thanks for the info keynet. You could also install LMS on your server and access the music shares via squeezeplay.

I also used Zoneminder quite a few years ago (v1.22-v1.23), until I bought a DVR. I eventually got fed up of the constant maintenance and repairing the SQL database on the old version of zoneminder.
vinnielo
Posts: 66
Joined: Mon Apr 11, 2011 5:34 pm

Re: PnP III v3.60 July 2017 Update

Post by vinnielo »

Don't forget the RadioFeeds UK & Ireland plugin which you can get for LMS and gets you virtually all radio stations in the UK and Ireland! :) Details in my signature.
I remember with the latest official version of PnP III, SqueezePlay would keep crashing out after a few days before, eventually, it won't start up again until the Joggler is fully rebooted.
Does 3.6 fix that?
RadioFeeds UK & Ireland for PnP III - UK and Irish radio stations for your PnP III Joggler.
RadioFeeds UK & Ireland for SqueezePlay OS - UK and Irish radio stations for your SqueezePlay OS Joggler.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

Hello again,

The version of SqueezePlay is the same I think, but there's probably a bug in the Squeezeplay startup script /media/launcher/apps/SqueezePlay/trigger.cgi (used by the icon) which eventually causes memory / process problems - creates multiple backlight control processes, doesn't kill them when exiting. The version below which I'm using both kills any existing + starts a new Squeezeplay + backlight control process in 1 hit.

Code: Select all

#!/bin/sh
killall -q jive
SQPBLPIDS=`ps | grep -v grep | grep -v $$ | grep sqp_JogglerBacklig | awk -F\  '{print $1}'`
kill `echo $SQPBLPIDS` >/dev/null

/media/opt/squeezeplay/bin/squeezeplay.sh > /media/logs/squeezeplay.log 2>&1 1>/dev/null &
I find SqueezePlay reliable run like this.

[FYI Craig] I'm using Zoneminder 1.30 now, been using it since 1.24 and it's completely stable these days, particularly if doing analogue capture, you use reliable cards from the BT878 series of which there are many, single/mutiple - I have a 4 way Kodicom 4400r. Some lesser cards/USB captures are hokey by comparison.
vinnielo
Posts: 66
Joined: Mon Apr 11, 2011 5:34 pm

Re: PnP III v3.60 July 2017 Update

Post by vinnielo »

keynet wrote: Tue Oct 17, 2017 12:39 pm The version of SqueezePlay is the same I think, but there's probably a bug in the Squeezeplay startup script /media/launcher/apps/SqueezePlay/trigger.cgi (used by the icon) which eventually causes memory / process problems - creates multiple backlight control processes, doesn't kill them when exiting. The version below which I'm using both kills any existing + starts a new Squeezeplay + backlight control process in 1 hit.

Code: Select all

#!/bin/sh
killall -q jive
SQPBLPIDS=`ps | grep -v grep | grep -v $$ | grep sqp_JogglerBacklig | awk -F\  '{print $1}'`
kill `echo $SQPBLPIDS` >/dev/null

/media/opt/squeezeplay/bin/squeezeplay.sh > /media/logs/squeezeplay.log 2>&1 1>/dev/null &
I find SqueezePlay reliable run like this.
Thanks for that. I've modified the code so will see how long it lasts!
RadioFeeds UK & Ireland for PnP III - UK and Irish radio stations for your PnP III Joggler.
RadioFeeds UK & Ireland for SqueezePlay OS - UK and Irish radio stations for your SqueezePlay OS Joggler.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

I should mention that Squeezeplay does occasionally "lose focus", i.e. the Tango GUI takes over the screen, perhaps related to its screensaver, though Squeezeplay is still running in the background, and can be controlled via the web/LMS, so it can look as if the Squeezeplay is dead. I haven't got any further with that issue atm.
vinnielo
Posts: 66
Joined: Mon Apr 11, 2011 5:34 pm

Re: PnP III v3.60 July 2017 Update

Post by vinnielo »

vinnielo wrote: Thu Oct 19, 2017 1:11 am
keynet wrote: Tue Oct 17, 2017 12:39 pm The version of SqueezePlay is the same I think, but there's probably a bug in the Squeezeplay startup script /media/launcher/apps/SqueezePlay/trigger.cgi (used by the icon) which eventually causes memory / process problems - creates multiple backlight control processes, doesn't kill them when exiting. The version below which I'm using both kills any existing + starts a new Squeezeplay + backlight control process in 1 hit.

Code: Select all

#!/bin/sh
killall -q jive
SQPBLPIDS=`ps | grep -v grep | grep -v $$ | grep sqp_JogglerBacklig | awk -F\  '{print $1}'`
kill `echo $SQPBLPIDS` >/dev/null

/media/opt/squeezeplay/bin/squeezeplay.sh > /media/logs/squeezeplay.log 2>&1 1>/dev/null &
I find SqueezePlay reliable run like this.
Thanks for that. I've modified the code so will see how long it lasts!
Well here's an odd thing. It's working on one of my Jogglers but not the other. On the other one, nothing happens when I press on the icon. I've made sure I've set the permissions to 755 and uploaded in ASCII but it's just not having it. I'm wondering if it might have something to do with the line breaks somewhere.
RadioFeeds UK & Ireland for PnP III - UK and Irish radio stations for your PnP III Joggler.
RadioFeeds UK & Ireland for SqueezePlay OS - UK and Irish radio stations for your SqueezePlay OS Joggler.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

Perhaps best check with vi on the joggler that you don't have a line break somewhere
Also perhaps possible you don't have killall which is in /usr/bin, not part of busybox
vinnielo
Posts: 66
Joined: Mon Apr 11, 2011 5:34 pm

Re: PnP III v3.60 July 2017 Update

Post by vinnielo »

I've figured it now.
Opened up the .cgi with ES Explorer SFTP text editor on my Android phone to find the line terminators were, indeed, Windows CR LF rather than UNIX LF. Changed that and it's working now.
Thanks for your help.
RadioFeeds UK & Ireland for PnP III - UK and Irish radio stations for your PnP III Joggler.
RadioFeeds UK & Ireland for SqueezePlay OS - UK and Irish radio stations for your SqueezePlay OS Joggler.
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

FIX for NTP and timekeeping issues

Post by keynet »

I got round to looking at why NTPD wasn't succeeding in keeping my 2 Joggler clocks in sync.

ntpdate sets the clock initially but I was having issues when there's no Internet available during boot - the clock never got set. Despite ntpd running, it's not doing anything useful - or not for me on a couple of Jogglers runing PNP3.6 anyway. Even if the clock was set at boot, it seems to drift away noticeably over time as others have observed. For me, the drift file in /tmp was always showing 0.000 which is the clue.

Yes, you can invoke ntpdate on a cron job (using busybox.new's crond), a little messy, but works.

But the stock ntpd can sync with a local network ntpd server (4.2.8 - i.e. current), as well as pool.ntp.org with a couple of small tweaks to the udhcpc.script. With my tweaks, the Joggler can automatically read the time server address configured by the network's DHCP server (option "ntp-servers" on a standard ISC DHCP server, doubtless similar on others), avoiding the need to hard-code local NTP server addresses in Joggler(s). I attach the revised script which sits in /etc on the Joggler FYI.

I also made the config a bit more robust so it can move the clock a long way rather than the default which is to give up on anything over 1000s, using "tinker panic 0", and added a log command so you can see when and what it's synced to.

The script falls back to 0.pool.ntp.org, as before, if no ntp server address is provided by the DHCP server.
A second pool server can be added by removing the comment "stratum 1" - should you really want stratum 1 ! (ntpd will use the "best" available when it starts).

For me, it will only keep sync if it finds a time server when ntpd starts, it will then jump the time by as far as needed (ntpdate no longer really needed). The advantage of using a local time server set by DHCP is that you can guarantee a time server is always available when ntpd starts, so it keeps time properly. The fall-backs at pool.ntp.org are not necessarily always available on your network.

Your log might look like this for a local server:

Code: Select all

10 Aug 19:02:18 ntpd[5443]: synchronized to 10.0.0.100, stratum 3
10 Aug 19:02:18 ntpd[5443]: kernel time sync status change 0001
or the fallback for 0.pool.ntp.org

Code: Select all

11 Aug 10:54:05 ntpd[1274]: synchronized to 85.199.214.99, stratum 1
11 Aug 10:54:05 ntpd[1274]: kernel time sync status change 0001
You can check for a nonzero drift value in the drift file after a while (can take several hours to write the file, and you can check how it varies over time). My 2 Jogglers are different, and vary a bit (-55ppm on one, -30ppm on another, i.e. a few secs a day, as expected for a consumer crystal oscillator).

Now the second hand of the screensaver clock exactly matches my MSF radio-controlled analogue clock on the wall :D
Attachments
udhcpc.zip
improved udhcpc.script
(2.09 KiB) Downloaded 474 times
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: PnP III v3.60 July 2017 Update

Post by pete »

Thank you Keynet!

Here had gone to soldering on the smallest RTC I could find and getting it to work doing a bit of bit banging. Most difficult though is to solder on the leads then dropping a bit of glue to keep them in place.

Today the Linux based larger Openframe devices running Squeezeplayer have an RTC battery in place. The O2 and Openframe 1 devices do not have RTC batteries.

Another little "fix" which helps is to write and update the firmware on the integrated Realtek network hardware. Out of the factory it comes with no MAC address and when it has a mac address it does help relating to booting and time sync using DHCP.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

Yes, I was impressed by your tenacity adding RTC hardware !

I'm interested in getting WOL going, but don't really want to have to completely rebuild by PNP3 systems - how disruptive is your process for reflashing the BIOS to get a proper MAC and also WOL ?
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: PnP III v3.60 July 2017 Update

Post by pete »

For the update to the Realtek firmware you just need to write the 1Mb Seabios to the EFI boot rom. Boot up with a DOS USB stick, write the new firmware to the Realtek rom. When booting with the Seabios ROM you are given an option to press on F12 to load a new ROM. Put the original ROM on a USB stick and it will write back the EFI rom. It doesn't do anything to the eMMC. You just need to have a USB hub and keyboard plugged in. You will then have a static MAC address and WOL will work.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
keynet
Posts: 23
Joined: Mon Apr 10, 2017 10:52 am

Re: PnP III v3.60 July 2017 Update

Post by keynet »

Thanks. I'll order a USB hub as I don't have one to hand atm...
I have copy of your DOS boot stick, do I assume all I need is on there ?
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: PnP III v3.60 July 2017 Update

Post by pete »

Yes.

Included too are the O2, Openframe 1 and 2 ROMs.

When returning to the original EFI rom just copy them up one directory and rename them something like update.rom and the Seabios will recognize the rom file.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
tmohammad
Posts: 42
Joined: Sat Nov 12, 2011 11:58 am

Re: PnP III v3.60 July 2017 Update

Post by tmohammad »

Does this work with the Updated OpenPeak Firmware (Version 30301)?

I followed instructions but it fails to install

UPDATE: After several reboots working now..... Thanks for this.
Post Reply