Re: [Dorset] Alternative to Simple Backup Suite

2018-04-29 Thread Terry Coles
On Sunday, 29 April 2018 14:48:48 BST Ralph Corderoy wrote:
> Are you sure about that?  AIUI a duplicity backup is a description of
> the bytes changed since the last one, e.g. `this whole file's new, but
> this one has these middle bytes replaced with this lot'.  Deja-dup,
> being a GUI front-end to duplicity, would presumably gain that too.

Yes I know, but Deja-Dup has very few settings and incremental isn't one of 
them.  I want something that doesn't rely on me remembering long shell 
commands (in other words a GUI)  :-)

-- 



    Terry Coles



-- 
Next meeting:  Bournemouth, Tuesday, 2018-05-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Alternative to Simple Backup Suite

2018-04-29 Thread Terry Coles
Hi,

I've just upgraded my system to Kubuntu 18.04 from 17.10.  Some nice things 
and as usual some stuff that isn't so good.

The main problem that I've encountered is that the Kubuntu Devs have now 
decided to drop Simple Backup Suite (sbackup).  I've used it since a Google 
Summer of Code programmer created it around 10 years ago.  It suits me; as the 
name implies, it's simple to use, it does incremental as well as full backups 
and it includes NAS boxes as suitable targets.

I can't blame the devs for dropping it.  It was created in 2007 and the last 
PPA in Ubuntu is dated 3 years ago and the previous 3 PPAs all supported the 
same version, so it clearly is no longer in development.

I've been trying out several alternatives and dropping them one by one:

1.  Bacula - Very capable, but far from simple.
2.  BackinTime - Very simple, and doesn't support the NAS Box without jumping 
through hoops.
3.  Deja-Dup (Duplicity) - I used this for a short while, but it doesn't 
support incremental backups.
4.  Several others which suffer from one or more of the above problems.

Any suggestions?  Most of the suitable alternatives seem to be out of 
development.  I know that I could use rsync and various GUI front ends for it, 
but I want a semi-permanent record of the files, so that when I realise the 
error of my ways three days after the backup, the original file is still 
there.  I also don't want to simply drag and drop the data since my NAS Box 
has a finite size to its storage.

-- 



Terry Coles



-- 
Next meeting:  Bournemouth, Tuesday, 2018-05-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Maplin Closing down sale

2018-04-26 Thread Terry Coles
On Thursday, 26 April 2018 14:27:42 BST Patrick Wigmore wrote:
> I remember when I was told of the existence of this mythical
> place called Maplin. The nearest branch was in Southampton, where
> perhaps a child might have had some hope of finding the many 6V
> DC motors DPDT switches and metres of multi-core flexible cable
> he craved, if only he could make the long journey to get there
> and acqurie the funds to purchase them.

I can remember a Radiospares shop in Weymouth a very long time ago, before 
they morphed into RS Components.  I wasn't a child, but I spent quite a bit of 
time in that shop during the 6 months or so that  I lived in Ranelagh Road.  I 
recall that the shop was on a corner quite close by; possibly Walpole Street.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-05-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Next Meeting - One Week Tonight

2018-03-31 Thread Terry Coles
Hamish, 

Thanks. Paul will be going too (I think, he hasn't confirmed).  He lives in 
Broadstone.

I''ll let you know Tuesday.

Our turn next time.

⁣Sent from Blue ​

On 31 Mar 2018, 10:47, at 10:47, Hamish MB <hamis...@live.co.uk> wrote:
>I shall be going - would you like me to give you a lift Terry? If
>anyone 
>else nearby to Wimborne / Cole Hill is going I can give you a lift as 
>well if you like.
>
>Hamish
>
>
>On 27/03/18 16:55, Terry Coles wrote:
>> All,
>>
>> The next meeting is one week tonight at The Broadway, Bournemouth on
>Tuesday,
>> 2018-04-03 at 20:00.  See:
>>
>> http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway
>>
>> Paul, Ian,
>>
>> Are you going?
>>
>
>-- 
>Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
>Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
>New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE
>REPLYING
>Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE
>AUTHOR
-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week Tonight

2018-03-27 Thread Terry Coles
All,

The next meeting is one week tonight at The Broadway, Bournemouth on Tuesday, 
2018-04-03 at 20:00.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul, Ian,

Are you going? 

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-22 Thread Terry Coles
It's now working.  Thanks for all help provided.

On Wednesday, 21 March 2018 14:59:20 GMT Terry Coles wrote:
> The wires were terminated at each end using Ethernet cable receptacles (the
> wall pattress type).  These have the wire colours on a label on the rear of
> the connector and all you have to do is feed the wires from each pair into
> the correct blade and press home with the tool.  We even had the proper
> tool, so I'm fairly comfortable that he did the wiring correctly.

Except that he forgot to push home one of the wires in the receptacle for the 
antenna and I didn't do a proper inspection  Duh.

> Tomorrow, we're going to try a different simple test; disconnect the antenna
> and plug a laptop in.  If we can see the web pages and ping the Pi at a
> sensible rate, then we'll have moved forward a bit at least.

From my laptop I got sub- 1 ms pings from the Raspberry Pi when plugged into 
the remote end of the armoured cable and around 4 ms pings over the WiFi.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 14:48:04 GMT Ralph Corderoy wrote:
> You said the Belkin lets the phone (Pi?) get an IP address, but not
> transfer data.  Was one of T568A or T568B followed when matching pairs
> of wires to pins?

Well.  I didn't actually do the wiring, but the guy who did do the work is a 
hardware engineer from way back.  He's done a fair bit of Ethernet 
installations over the years, but only in his and other homes. 

The wires were terminated at each end using Ethernet cable receptacles (the 
wall pattress type).  These have the wire colours on a label on the rear of 
the connector and all you have to do is feed the wires from each pair into the 
correct blade and press home with the tool.  We even had the proper tool, so 
I'm fairly comfortable that he did the wiring correctly.


Tomorrow, we're going to try a different simple test; disconnect the antenna 
and plug a laptop in.  If we can see the web pages and ping the Pi at a 
sensible rate, then we'll have moved forward a bit at least.

If that doesn't work then we'll know that the problem isn't the Antenna 
installation.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 13:53:13 GMT Bob Dunlop wrote:
> The 125V is the minimum inter core DC insulation provided by the cable.
> It's there because the cable may be carrying 57V DC PoE power and has
> nothing to do with the signalling level which is about +-2V differential.

Thanks.  I've just been talking to the IT Manager at the company that I used 
to work for and he said much the same thing about the safety thing.

It's good to know about the differential voltage.
 
> Each end is transformer coupled with about 1500V isolation.  Again because
> of spec.  It's an important safety as cables may be used for interbuilding
> connections.

Thanks.
 
> Pi's will be built to the spec although there was a rumour of some made
> without the isolation transformer in the socket.  I'd expect to have seen
> a safety recall if this had been true.

Thanks.

> > I was wondering how much people knew about commercial switches and whether
> > they specify a maximum cable length?
> 
> Yes the spec says 100m.

From what you've said above, consumer grade devices (including the Pi) should 
also be good for 100 m then?

> You can also get extenders that convert the signals (and often protocols)
> to non-Ethernet signalling for covering long distances.  Good ones cost more
> that the rest of your kit combined.  We normally convert to twin fiber
> optic for longhaul.

I've found some extenders that are good for 3 km!  At ~£300 each that would 
cost more than the whole of my budget for the Webserver, the Bells system 
*and* the Lighting we did two years ago ;-(


-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 12:21:44 GMT t...@ls83.eclipse.co.uk wrote:
> it solid copper or copper-clad aluminium). For what it's worth, I have a
> long exterior cable run of around 100m with POE with a TP-Link or
> Netgear POE switch at the near end, fairly new installation so Cat 6,
> but running at 100MHz.

Are the switches commercial grade or consumer grade?  See my response to 
Ralph.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 12:17:14 GMT Bob Dunlop wrote:
> By the book 1Gbps, 100Mbps, and 10Mbps should all support 100m.

Yes; see my response to Ralph.

> Dodgy termination, cable or connectors will severely reduce the range.

 See also my response to Ralph.  This cable passes the tests we've performed 
using the fairly cheap Ethernet cable tester that we have.

> Try forcing a drop of the line speed to 10Mbps, often works in dodgy
> situations.  Users who don't check the specs, cables crushed by water
> pressure, let's try it any way etc.
> 
>   ethtool -s $DEVICE speed 10 duplex full
> 
> Also "ethtool $DEVICE" will show you the current line settings.
> 
> $DEVICE is probably eth0 or net0 BTW.

If all else fails, we'll give this a try.  I still think that this might be 
the limited line voltage that we have available.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 12:46:38 GMT Ralph Corderoy wrote:
> > > Is it Cat 5 or 5e?
> > 
> > Probably Cat 5e, but I didn't specify it.
> 
> There's normally tiny writing repeated down its length on the stuff I've
> seen?

This is armoured and I don't recall seeing anything on the outside of the 
cable; it's just a uniform black around 1-2 cms in diameter.

Under the outer sheath there is the armour made of stranded steel.  Underneath 
that is another black sheath and then the screen (aluminium I think ) and then 
the four pairs of conductors. 

I'll ask tomorrow what the cable spec is.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
On Wednesday, 21 March 2018 11:45:15 GMT Ralph Corderoy wrote:
> https://en.wikipedia.org/wiki/Cat_5 might be of interest.

Yes.  We saw that before we even attempted it.  We always knew that the poor 
old Pi might not be man enough for the job, but hoped we could get away with 
using a switch to help drive the lines.

> Is it Cat 5 or 5e?  Stranded or solid core?  What's the margin of error

Probably Cat 5e, but I didn't specify it.  It is solid core; we connected it 
using insulation displacement connectors at each end.

> on the 70 m?  :-)  What else is lying alongside it to interfere?  How
> long has it been there?

We bought a 100 m roll of cable and cut off around 30 m at the end.  There is 
probably another 3-4 m of drop cables at the antenna end and 0.5 m at the Pi 
end.  There is nothing to interfere as far as we know.  The first 30 m or so is 
buried alongside a plastic water pipe; the rest runs along a hedge line and is 
attached to a barbed wire fence.

> https://en.wikipedia.org/wiki/Cat_5#Maximum_cable_segment_length says
> 100 m, and implies that's 90 m of solid core with patch cables at the
> ends, but don't just read that bit of the page.  :-)

We didn't.

> There's test equipment like Fluke's that I've seen mentioned a lot, but
> mainly alongside them being good but expensive.  :-)
> http://www.flukenetworks.com/enterprise-network/network-testing/CableIQ-Qual
> ification-Tester

We have a fairly cheap Ethernet tester, which shows that all terminations are 
good on both the slow and fast speed settings.

I'm think more about the specifications of the driver/receivers in the two 
devices.  That spec that you referenced says that the maximum operating 
voltage is 125 V, but we're not going to get that from a Raspberry PI!  I 
haven't managed to find anything on that aspect of the spec, but as I 
understand it, each driver/receiver pair is current driven, so the driver 
increases the voltage until the current required is achieved.  I would expect 
cheap switches (especially ones that run off low voltage DC (5 V for the TP-
Link and 12 V for the Belkin) would struggle to get the current after 40 -50 
metres or so.

I was wondering how much people knew about commercial switches and whether 
they specify a maximum cable length?

Finally, can Ethernet boosters be obtained, or can we only get away with a 
repeater half-way down the cable run?

BTW.  The fall-back is to move the server to the same location as the Antenna 
(this is a TP-Link TL-WA7210N Customer Premises Equipment).  We will have to 
mount the server into an IP65 case, but we do have main available.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Range of a Cat 5 Ethernet Signal

2018-03-21 Thread Terry Coles
Hi,

We've just re-connected our WMT Webserver with the antenna in its new location 
at the far end of the site.  The server is currently in the old location so 
there is about 70 m of armoured Cat 5 cable between the two.  The Question is; 
do we need something a bit more powerful at each end to drive the lines or do 
we need something at both ends?

I have two switches to hand; a very cheap TP-Link and a bit more expensive 
Belkin job.  With the TP-Link, only the near end indicator lights and with the 
Belkin, both indicators come on.  This leads me to believe that something a bit 
more powerful might do the trick.

When the Belkin is installed the phone gets an IP address, but fails to 
retrieve the data.

Ultimately we will have a switch about halfway along anyway, but we're not 
ready for that yet.

Thoughts?

⁣Sent from Blue ​
-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Re: Education

2018-03-20 Thread Terry Coles
Try again.

On Tuesday, 20 March 2018 09:12:27 GMT PeterMerchant via dorset wrote:
> The makeup of the LUG fits the M/F proportions pretty well. Why don't
> more women take up software? I once [c1980] had a team that was
> predominantly excellent female programmers.

There seems to have been a mass migration away from programming by women.  My 
wife gained her degree in CS at Leicester Poly in 1979.  Pretty much all of 
her fellow students were female.  15 years earlier, as a schoolboy, I was 
taken to Rugby College to see my first computer (a mainframe of course).  All 
of the staff were women.

I suspect that the initial popularity of programming for women was 
stereotyping.  In the 1950s, boys didn't do typing; that was seen as a 'girly' 
job.  As the 80s progressed more and more boys were given computers for 
Christmas (Sinclair et al), but parents never saw that girls might be 
interested in such a thing, so gradually the stereotyping swapped over.

I think the modern trend with Code Clubs and Raspberry Jams, etc is beginning 
to make a difference, but it will take time.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Fwd: Re: Education

2018-03-20 Thread Terry Coles
Should have gone to the LUG.

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 14:33:46 GMT Terry Coles wrote:
> No all I have to do is work out why the bells won't play to the USB device,
> but will play to the bcm device.

I think I can use omxplayer for the bells, which works perfectly.  It's only 
the mp3 files that I need to loop continuously.

Thanks, Ralph for all your help again.

Hopefully, I won't need to come back again, but who knows :-)

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 15:28:53 GMT Ralph Corderoy wrote:
> Yes, but that means you've asked udev to assign an ID based on USB port,
> not whether you have substituted the `1' above with that ID when trying
> to play a tune.

I've solved this now; as mentioned in my other post.

The labels do work, but I have to use hw:label,device with mpg321.  aplay 
seemed OK with just the label, which is what threw me.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 14:19:19 GMT Terry Coles wrote:
> On Saturday, 10 March 2018 14:08:41 GMT Ralph Corderoy wrote:
> > hw:label,device.  Are you only using the Pi for these trials, or

OK.  Just spotted it.  I wasn't using the device number with the label, so I 
was getting a 'Device not found' message.

No all I have to do is work out why the bells won't play to the USB device, 
but will play to the bcm device.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 14:08:41 GMT Ralph Corderoy wrote:
> I can't tell if that includes my suggestion.  :-)

Well I did say that I'd been using udev rules.

> Why would they?  I thought the udev rules were mapping from a USB port
> to a textual label.  You then ditch the hw:card,device number and use

As mentioned previously, labels only work with aplay and omxplayer, which 
don't support Python lists or looping through a list.
 
> hw:label,device.  Are you only using the Pi for these trials, or

I'm using both.  It's easier to observe results and copy'n'paste from this 
machine than from the Pi.

> switching away from Raspbian?  What's your udev look like after
> following that guide?

Raspbian is the goal.

Here is the contents of /etc/udev/rules.d/70-alsa-permanent.rules:

SUBSYSTEM!="sound", GOTO="my_usb_audio_end"
ACTION!="add", GOTO="my_usb_audio_end"

ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0808", ATTR{id}="TOWER"
ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="013c", ATTR{id}="CHANCEL"

LABEL="my_usb_audio_end" 

I've tried making the ATTR{id}=0 or 1 and that makes no difference.

Here is the contents of /etc/asound.conf:

pcm.!default {
type hw
card 0
device 0
}

ctl.!default {
type hw
card 0
device 0
}

pcm.TOWER {
type hw
card 0
device 0
}

ctl.TOWER {
type hw
card 0
device 0
}

pcm.CHANCEL {
type hw
card 1
device 0
}

ctl.CHANCEL {
    type hw
card 1
device 0
}

I've also tried naming the Cards instead of using numbers.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 14:04:13 GMT Ralph Corderoy wrote:
> Kill how?

Ctrl-C

> In the same manner?

Yes.

> How are you identifying it as a zombie?  What's the arguments for that
> process?  `ps ww 42' where 42 is its process ID shows them `weally
> wide'.  Does that tell you if it's the one that's also using hw:2,0?
> Could it be you've been running your Python program and that's an mpg321
> from a leftover Subprocess.Popen?

Top says it's a Zombie - it is marked z.

Yes it could be a leftover from the Python program.  At the moment the Python 
still runs on boot-up and then I kill it with Ctr-C.

However, there is more evidence now:

I have realised that I can play the music files no matter where they are even 
though I'm using the same hw:2,0 port that has just failed with bells.  None 
of the bells files work with that or any other port, but I can't see what is 
wrong with the format of the files and they work if I send them to the bcm 
audio channel.

I'm still investigating this.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 13:55:04 GMT Ralph Corderoy wrote:
> You *have* to use udev to map from USB port to an ID.
> Assuming assignment to cards is random, but with a strong bias or
> memory, i.e. can't be relied upon at all.

This behaviour occurs even though I am using the instructions to set the port 
to an ID using udev!  Things seem to have improved in this department since I 
moved my .asoundrc contents to /etc/asound.config, though I can't see why.  
(See my post at 11:41.)

I've just spotted something trying to replicate the problem on this machine.  
I get the following error from syslog whn I plug an adaptor in:

error opening ATTR{/sys/devices/pci:00/:00:1d.0/
usb2/2-1/2-1.7/2-1.7:1.0/sound/card1/pcmC1D0p/id} for writing: Permission 
denied

So maybe udev has changed (again) and yet another technique is required.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Saturday, 10 March 2018 13:47:25 GMT Ralph Corderoy wrote:
> > subprocess.Popen(mpg321 -l -m -a hw:1,0 Playlist)
> 
> Have you tried using the ID you've assigned with udev based on the USB
> port as the card number;  the `1' in `1,0' above?

I've tried allsorts and whatever happens the hw: numbers never seem to bear 
any relation to the ID's that i created in the udev rules.

See my other post.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-10 Thread Terry Coles
On Friday, 9 March 2018 14:36:25 GMT Terry Coles wrote:
> The light at the end of the tunnel is rapidly vanishing.  Having worked
> consistently for many reboots, I just got a couple of occasions when Card 0
> came up as the bcm audio and the TOWER device got moved to Card 2.

I may have made some progress.  I've moved the contents of my .asoundrc file to 
/etc/
asound.conf and I /think/ that I've now got the TOWER and CHANCEL USB devices 
coming 
up as hw:2,0 and hw:1,0 respectively.  Time will tell if they stay there.

I may have made a little progress on the driver thing too, but I don't know 
what it all 
means.

What I am now seeing is somewhat weird. Outside of my Python program I can cd 
to a 
Playlist directory and issue:

mpg321 -m -a hw:1,0 

and it works, playing from the USB device designated CHANCEL. Staying in the 
same 
directory I kill playback of the above file and issue:

mpg321 -m -a hw:2,0 

and it now plays from the USB device designated TOWER. If I then kill that 
playback and 
move to the directory which contains the bells and issue:

  mpg321 -m -a hw:2,0 

The playback fails with the error:

can't open libao driver with device hw:0,0 (is device in use?)

as mentioned previously. If I run top, a Zombie mpg321 process shows up.  Any 
ideas as to 
what is going on?


-- 



        Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-09 Thread Terry Coles
On Friday, 9 March 2018 13:37:10 GMT Terry Coles wrote:
> The light at the end of the tunnel just got smaller.  The two USB Audio
> devices now seem to come up consistently on channels hw:0,0 and hw:0,1, but

The light at the end of the tunnel is rapidly vanishing.  Having worked 
consistently for many reboots, I just got a couple of occasions when Card 0 
came up as the bcm audio and the TOWER device got moved to Card 2.

So I seem to be back to square one, even when it works, I haven't got a driver 
and then it doesn't always work anyway

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-09 Thread Terry Coles
On Friday, 9 March 2018 13:09:37 GMT Terry Coles wrote:
> More testing needed, but I may be seeing the light at the end of the tunnel
> (everything crossed).

The light at the end of the tunnel just got smaller.  The two USB Audio 
devices now seem to come up consistently on channels hw:0,0 and hw:0,1, but I 
now get the error:

can't open libao driver with device hw:0,0

when the bells are required.  This is what happens:

At bootup, the program starts playing music to the device labelled CHANCEL 
using channel hw:0,1.  This works every time.  After 15 minutes or less, the 
program tries to send the chimes to the device labelled TOWER using channel 
hw:0,0.  That's when the error occurs.

I assume that this is because only one instance of the driver for the USB 
Audio devices is loaded at boot-up and that is in use because it is still 
playing the music.

Assuming that I'm right, how do I force the OS to load a second driver 
instance for the TOWER?

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-09 Thread Terry Coles
On Friday, 9 March 2018 10:57:36 GMT Terry Coles wrote:
> https://github.com/dh1tw/remoteAudio/wiki/Persistent-USB-Mapping-of-Audio-de
> vices-%28Linux%29
> 
> So I tried this, but hit another snag because although it worked, it solved
> the wrong problem. I found that it works well to provide an *identity* for
> the device, so I can tie a bus or Manufacturer's ID to a label, but not to
> a channel ID (ie hw:x,y).

I just spotted something that I'd missed.  The .asoundrc file in the Pi's home 
directory appears to be overwritten by Raspbian every now and then!!

Apparently, this occurs on reboot if the audio card selection is set to 'Auto' 
in raspi-config, so I've just set it to 'Force HDMI' and it has survived four 
reboots so far.

More testing needed, but I may be seeing the light at the end of the tunnel 
(everything crossed).

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-03-09 Thread Terry Coles
On Wednesday, 17 January 2018 23:06:44 GMT Ralph Corderoy wrote:
> There's also https://alsa.opensrc.org/MultipleUSBAudioDevices that
> describes the parameters the kernel module can take to index the audio
> interfaces, and https://alsa.opensrc.org/Udev that it links to at the
> end for using udev, especially the second section where he has five
> identical USB audio interfaces wired to distinct rooms.

I fixed the cross-talk and extraneous noise issue in hardware and had hoped to 
fix the 
hum, to avoid having to solve the USB problem, but the hum remained, so I 
returned to 
Ralph's suggestion.

Unfortunately, udev has changed a bit since that article was written and I 
found that with 
Rasbian Jessie (which we are using at the WMT for this project), the solution 
failed due to 
write permission problems.

I therefore posted again on the Raspberry Pi Forums and received this 
suggestion:

https://github.com/dh1tw/remoteAudio/wiki/Persistent-USB-Mapping-of-Audio-devices-%28Linux%29

So I tried this, but hit another snag because although it worked, it solved the 
wrong 
problem. I found that it works well to provide an *identity* for the device, so 
I can tie a 
bus or Manufacturer's ID to a label, but not to a channel ID (ie hw:x,y).

At first I thought that I could use omxplayer to play my tracks, (or aplay if I 
converted all 
the mp3 files to .wav (urrgh)). I got omxplayer to work reliably, but 
unfortunately it does 
not support the playing of a Python List containing all the files I want to 
play (eg a Playlist). 
It accepts the List, but only plays the first track before exiting, whereas I 
need the player to 
loop endlessly round a playlist until I stop it (by killing the mpg321's 
process). You may 
recall that I have been using mpg321 within Python as follows:

subprocess.Popen(mpg321 -l -m -a hw:1,0 Playlist)

Where Playlist is the list of files to be played. This was suggested a year or 
two back (by 
Ralph I think), because of Python's thread limit which won't allow me to play 
two tracks 
simultaneously (the bells and the music) and then use GPIO events to trap 
signals from 
physical switches (to stop playing or change the Playlist) and also to use GPIO 
to activate a 
couple of solenoids. By using subprocess.Popen in conjunction with mpg321 I can 
take 
advantage of OS multitasking instead of using Python control. 

Any suggestions of another solution (or a player that supports alsa labels and 
looping 
through a playlist)?  Or YAS  (Yet Another Solution)?

-- 



    Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-03-05 Thread Terry Coles
On Monday, 5 March 2018 12:40:40 GMT Ralph Corderoy wrote:
> It needs to be a few steps printed big and stuck on a wall away from the
> booth to avoid clogging the area.  The QR code should be present because
> you might be surprised how many phones handle it without an explicit
> app, and it's a convenience for those users;  they're on the rise.

I 've just back from discussing all this with the Manager.

> > BTW.  iPhones 'just connect'
> 
> Today.  :-)

Point taken.
 
> It's annoying that Management are wary of web-site contractor time and
> money, but not volunteer time.

To be fair, they're not that wary and the guy has a contract to update the 
site on a regular basis.  The Manager can add content, but not change the 
overall architecture.  He is going to discuss this with the contractor and 
look into registering WMTGuide.com as a subdomain, with SSL Certificate too.

The main problem is that they have a budget for the website but it has largely 
been allocated.

> Aren't you mixing two things here?
> 
> Android is attempting a HTTPS probe to check for being captive.  You've
> proved responding to that with a self-signed certificate doesn't work.
> You're hoping that if it's a signed certificate by an authority known to
> the browser then, even though it's a certificate for a completely
> different domain to the one being contacted, that Android will be happy
> with the 204 response it expected.
> 
> You don't need HTTPS for accessing the guide;  that's already working
> with HTTP.
> 
> If the certificate is for a domain diffrent to the one Android contacts
> then it could be for hadrian-way.co.uk, say.  I suggested
> wimborne-modeltown.com because that's the one it owns, though held
> captive by a contractor.  :-)  To just test the idea out, and hope it
> quickly fails, giving certainty, you could get one for
> hadrian-way.co.uk, say.  If that's still a problem I may be able to dish
> one up in a few days.

See above.

> See https://letsencrypt.org/getting-started/ for all the options.  Have
> WMT really *no* non-contractor access to the site, e.g. to update some
> page's data in a CMS?  If they can upload files then the Manual Mode
> described on that page might be useful.  Or you could do that for
> hadrian-way.co.uk.

See above.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-03-05 Thread Terry Coles
On Sunday, 4 March 2018 21:07:41 GMT Stephen Wolff wrote:
> i don’t think you’ll be able to get another certificate for
> wimborne-modeltown.com. You might be able to get one for a subdomain or
> a wildcard (ie *.modeltown.com). You’re likely to need some way to

This will be the first certificate for wimborne-modeltown.com.  I've suggested 
that they will need to make the site secure soon anyway.

> verify that you ‘own’ the domain - which for letsencrypt would need
> to be either a DNS record of some sort under wimborne-modeltown.com or a
> file served somewhere under wimborne-modeltown.com (so you’d need to
> work with the contractor in some way)

Understood.

> which server? it could be used on the local network server for an https
> site - it doesn’t have to be on the webserver. a ‘certificate’
> will consist of 3 files (sometimes combined into one - depending on
> server config). You’d need to put the files into certain locations
> with certain permissions on the local webserver, and set up local DNS to
> point the sub-domain, but no, you wouldn’t need the certificate on the
> public webserver.

That's what I'm hoping to do.

> As Chrome is about to label all http sites insecure - maybe the person
> looking after the site will have to sort out a certificate - so will
> have one you could use on the local network?

See above.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-03-04 Thread Terry Coles
On Sunday, 4 March 2018 13:25:43 GMT Ralph Corderoy wrote:
> >  and this...
> 
> Nothing followed.  You're probably pasting those NUL bytes into
> Thunderbird again.  :-)

Nope.  I just didn't make myself very clear.  I asked those two questions 
(about getting Certs for wimborne-modeltown.com) and no-one answered them.

I was hoping to avoid having to ask for the wimborne-modeltown.com website to 
be updated by the contractor.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-03-03 Thread Terry Coles
On Thursday, 1 March 2018 07:01:28 GMT Terry Coles wrote:
> I don't suppose it would work if we got a Certificate for wimborne-
> modeltown.com and added that to the DNS on the internal server, then simply
> told them to go to WMT.com which would also be available on that server?
> (Maybe by redirection.)

Can anyone comment on this query..

> So.  If we got a certificate for wimborne-modeltown.com, would the server
> need to have that Certificate installed (more contractor work).

 and this...

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-28 Thread Terry Coles
On Wednesday, 28 February 2018 21:33:10 GMT Ralph Corderoy wrote:
> I still think this idea of trying to fool your paying public that
> they're on the Internet, since they won't get the `you're captured' UI
> that's familiar to them, just leaves them confused when they can't post
> their photos to Facebook, etc.  :-)

I tried to convince 'Management' of this on Tuesday morning, but to no avail.  
The problem is that the people who man the pay-booth have no idea about any of 
this and struggle to explain the procedure to people who've tried to get onto 
our WiFi network, so the thinking is that it'll be less hassle anyway.

BTW.  iPhones 'just connect', so Apple users have idea about the loss of their 
Facebook access until they try to upload their photos.

> There's already wimborne-modeltown.com.  I'd expect a subdomain of that
> to work, e.g. guide.wimborne-modeltown.com.  No fee for domain
> registration if your existing set-up allows whatever subdomains you
> want.

The problem is that I have no control over the wimborne-modeltown.com server, 
which is managed by a contractor.  That means that the WMT would have to pay 
the contractor to make the change.

> I think that should work.  If you're not allowed subdomains with your
> hosting then LetsEncrypt wimborne-modeltown.com and use
> wimborne-modeltown.com/guide on the Unternet?

That's pretty much what I would have wanted to do, although the length of the 
URL will be a problem.

I don't suppose it would work if we got a Certificate for wimborne-
modeltown.com and added that to the DNS on the internal server, then simply 
told them to go to WMT.com which would also be available on that server?  
(Maybe by redirection.)

> With LetsEncrypt, which is a good choice, yes.  And fairly regularly as
> they need `renewing' every three months IIRC.  For the initial proof,
> and later renewals, they contact the server for
> guide.wimborne-modeltown.com, say, in a certain manner so you can prove
> you own it.  It's quite simple, but they need to be able to resolve DNS
> for that hostname to an IP address that's happy to play along.  It could
> all be torn down in between renewals.  Or the guide could be available
> to the Internet?

So.  If we got a certificate for wimborne-modeltown.com, would the server need 
to have that Certificate installed (more contractor work).

> How about if the normal site prominently hosted the guide, had a
> LetsEncrypt certificate, and had a duplicate off-Internet on the site?

Contractor

> BTW, AndrewM on IRC pointed out https://qifi.org/ for producing a QR
> code that tells the smartphone the SSID, etc., for wifi.

Yes.  I recall this and we discussed it at the time.  The problem is that 
Aunty Mabel and Grandpa Fred are highly unlikely to have a QR Code Reader App 
installed, so half the users would still need to type in the foot-long URL.

(We also discussed the fact that users could install the QR Code Reader App at 
the door, but decided that Aunty Mabel, Grandpa Fred or the door staff are 
unlikely to know how to do that.


-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-28 Thread Terry Coles
I just realised that my reply yesterday only went to Ian and not the list; 
those pesky CCs again.

On Sunday, 25 February 2018 12:55:45 GMT you wrote:

Ian,

> You could create your own CA ... but anyone using the site will still
> get the error unless they (manually) install your CA root cert.

Yes. Tried that and it was as you said.

> Probably the cheapest way is to get a free certificate :
> https://letsencrypt.org/ However then the server at least would need to
> be connected to the Internet to renew the issued certificate. 

I spoke to the Management team at WMT this morning and we've decided to try 
this.  AFAICT, Foxdog Studios use the Domain Validated Certificate for their 
main site and install it on their private server.  Presumably this means that 
they have to name their Private webserver the same as their public one.

Our idea is to register a new domain for the WMT, such as WMTGuide.com.  We 
could then create a Domain Validated Certificate for that site and use that 
domain on our private network.

Do you (or anyone else) know if we would have to have a live website on the  
Internet for the Doamin validation to work?  I'm assuming that we probably do, 
but it would be nice if we didn't so that we can get away with paying for 
hosting.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Next Meeting - One Week to go

2018-02-28 Thread Terry Coles
On Monday, 26 February 2018 18:00:53 GMT Terry Coles wrote:
> The next meeting is one week tonight at The Broadway, Bournemouth on
> Tuesday, 2018-03-06 at 20:00.  See:

I just realised that I sent this a day early !

Fot the avoidance of doubt, the meeting is one week from yesterday, not 
Monday.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week to go

2018-02-26 Thread Terry Coles
All,

The next meeting is one week tonight at The Broadway, Bournemouth on Tuesday, 
2018-03-06 at 20:00.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul, Ian,

Are you going? 

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-25 Thread Terry Coles
On Sunday, 25 February 2018 13:11:59 GMT Ralph Corderoy wrote:
> Your self-signed certificate is not signed by one of those trusted
> authorities, thus ERR_CERT_AUTHORITY_INVALID.  If you were using your
> proper public domain name, on this private network, then you might
> already have a authority-signed certificate for that.  You won't be able
> to get one for wmt.com because that's not your domain, it's Wright
> Medical Technology.

See my other post.

> Despite your laptop's browser warning, you should tell it to ignore it
> and test the rest of your nginx configuration.  Or use curl, like
> before, adding its -k when it complains.  This is because you're hoping,
> clutching :-), that Android, at least for the captive probe, doesn't get
> as far as validating the certificate.  So you should continue with the
> test.

Unfortunately, it doesn't work with Android, as predicted.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-25 Thread Terry Coles
On Sunday, 25 February 2018 08:04:49 GMT Terry Coles wrote:
> > You can trying listening on TCP port 443 and seeing if Android 7 will
> > play along with your self-signed certificates.  Perhaps it will as far
> > as thinking it's got to the Internet, but that Java source I referenced
> > also talks of `PAC' that I suspect are some sort of Android software
> > update package.  If a PAC is involved then it will obviously only trust
> > that from the expected Google source, verified by the certificate.
> 
> I'm going to try that today.  Lloyd at Foxdog says that they have https
> support with a Foxdog Certificate and all the phones that he's tried work. 
> He doesn't specify what they are.

I've just spent much of this morning getting my head around what https, SSL, 
TLS and SSL 
Certificates are all about.  I now have a (fairly limited) understanding of how 
to get and 
use a certificate, based on info here and elsewhere: 

http://nginx.org/en/docs/http/configuring_https_servers.html

I used the command:

openssl req -x509 -newkey rsa:2048 -nodes -days 365 -keyout WMT.com.key -out 
WMT.com.csr

to generate the certificate and key and put them into /etc/ssl, with the 
nginx.conf 
configured to give me a Single HTTP/HTTPS server, as defined in the nginx link.

Once all the files were installed, I ran sudo nginx -s reload with no errors.

Predictably though, it didn't work and when I typed https://WMT.com from my 
laptop 
while connected to the WMT AP, I got:

...

Attackers might be trying to steal your information from wmt.com (for example, 
passwords, messages or credit cards). Learn more
NET::ERR_CERT_AUTHORITY_INVALID
Subject: Terry Coles

Issuer: Terry Coles

Expires on: 25 Feb 2019

Current date: 25 Feb 2018

PEM encoded chain:
-BEGIN CERTIFICATE-
.
.
-END CERTIFICATE-

This server could not prove that it is wmt.com; its security certificate is not 
trusted by your 
computer's operating system. This may be caused by a misconfiguration or an 
attacker 
intercepting your connection.


...

So is it mis-configuration or does Chrome (Chromium) not trust the Certificate 
because it 
is not Domain Validated?  We obviously can't get one of those because the 
domain name 
WMT.com is only used on our local network and not registered with Nominet (or 
any 
other Authority). 

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-25 Thread Terry Coles
On Saturday, 24 February 2018 23:40:56 GMT Ralph Corderoy wrote:
> It should be packets 12 and 13;  you could run the tcpdump command and
> compare it to Wireshark's display.  /etc/services says https is TCP port
> 443.

I have now received a response to my question about where https is used from 
Lloyd at Foxdog and he helpfully provided a screenshot of the packets in 
Wireshark.  The exchange is on the Foxdog page I linked to earlier.

> No, not a path to the Internt; unencrypted contact with something
> listening on TCP port 80 has been established that sent back the 204
> reply.  Could be anything, not necessarily Google's machine at the
> Internet;  it's easily impersonated.

Yes.  A system like this could be used to scam users.  However, it's more 
likely to be successful if the user still gets his Internet connection :-)

> You can trying listening on TCP port 443 and seeing if Android 7 will
> play along with your self-signed certificates.  Perhaps it will as far
> as thinking it's got to the Internet, but that Java source I referenced
> also talks of `PAC' that I suspect are some sort of Android software
> update package.  If a PAC is involved then it will obviously only trust
> that from the expected Google source, verified by the certificate.

I'm going to try that today.  Lloyd at Foxdog says that they have https 
support with a Foxdog Certificate and all the phones that he's tried work.  He 
doesn't specify what they are.
 
> But this is Wimborne v. Google.  All Google is trying to do is inform
> the user that they're not connecting to an Internet access point but
> something else, and asking them to acknowledge that.  Seems reasonable.
> I assume relying solely on the HTTP 204 in Android 6 and earlier was
> because there was enough places blocking HTTPS that they had no choice.
> As HTTPS-only has become common for major sites, they can assume that
> access to the Internet allows it so they can probe for it, and it would
> seem duff if they don't validate the certificate on connection.

Agreed.  See above.
 
> Even if Android 7 doesn't validate the certificate, Android 8 probably
> will and we will be here again enough into the future to have forgotten
> this detail.  :-)
> 
> Tell management that the posters asking the users to open the QR code
> also need to warn them to accept the portal warning?

I did that last year.  Apparently it confuses the Visitors and so they give 
up.  My belief is that they are more likely to give up if they suddenly lose 
their 'indispensible' link to Facebook, Twitter, et al.

I was asked to fix this and I will do my best.  I have a backup of the old 
configuration, so it's easy to revert.

I'll talk it through with 'Management' when I go in to WMT on Tuesday.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 20:19:27 GMT Hamish MB wrote:
> It being that I'm studying Java for my Open University course, I'll have a
> look at it for you. Python is my preferred language, but I'm not bad with
> Java. I think when we get it working on Android 7 & 8 I should use the VMS
> to test old versions too. People still use Android versions going back to
> 2.6. Might be overkill, but best to know it always works.
 
> I don't have a lot of free time right now, so it may be a little while
> before I get to it, but I shall see if I can make sense of the code.
 
Thanks Hamish,

However, see my other post; Lloyd at Foxdog has confirmed that both http and 
https is used.

I also need to get this sorted, so we can put the antenna back up before the 
WMT re-opens in about four weeks time :-)

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 18:02:38 GMT Ralph Corderoy wrote:
> I didn't figure out what happens if the HTTP probe `suceeds', assuming
> that's what we're seeing in the packets, and HTTPS doesn't.  I suspect
> that's what's triggering the `You're captive'.  Perhaps someone that
> knows Java could untangle it.
> 
> If that's the case, you're stuck.  A HTTPS connection couldn't be made
> to the Pi such that it can provide a trusted certificate verifying it's
> connectivitycheck.gstatic.com.  Happy to be proved wrong.  :-)

Lloyd at Foxdog has confirmed that he can see the https requests in the packet 
dump for the G5 and that they support https in their server using a Foxdog 
Certificate.  However, he also says that he can't see how they can be valid 
https connections, since the phone would be expecting the certificate to be 
issued by Google.

Full comments trail at 
https://foxdogstudios.com/making-phones-believe-the-wifi-has-internet#comment-3772704492

I'm going to try setting the Pi up as an https server with a Self Signed 
Certificate tomorrow and see what happens.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 18:32:52 GMT Terry Coles wrote:
> On Saturday, 24 February 2018 18:02:38 GMT Ralph Corderoy wrote:
> > And other Apple domains.  I assume both devices have Apple software,
> > e.g. iTunes?

BTW.  I forgot to mention, I added this and other domains that the phone 
queried to my DNS, to see if the phone issued any new command once the request 
was acknowledged.  It stopped the refusal, but nothing else happened.

I'm assuming that these queries are there to establish if the domains are 
available for other purposes (Apps etc).  They don't always appear, so maybe 
the phone queries them on a cyclical basis.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 18:02:38 GMT Ralph Corderoy wrote:
> And other Apple domains.  I assume both devices have Apple software,
> e.g. iTunes?


Not as far as I know.
 
> I've looked at the files with this command that gives packet numbers to
> reference.
> 
> tcpdump -vvvKnt# -r $packet_file

I used Wireshark as you originally recommended.  I sort of understood what was 
going on most of the time, its the unexpected events that have me foxed and 
the fact that both phones seem to trigger the generate_204 OK, but only one 
works.

> First, 'packets(1_Minute_Nexus)' where it's fooled it's not captive.

Thanks for this.

> The 'packets(1_Minute_G5)' is different.

> That gets us to 15.9 s into the recording.  Next packets are at 31.9 s.
> You said `no Internet' appears around 16 s.

Yes.  That's right.

> I've read through
> http://androidxref.com/7.1.2_r36/xref/frameworks/base/services/core/java/com
> /android/server/connectivity/NetworkMonitor.java and struggle to understand
> it.  It being Java, the Android standard libraries, and its asynchronous
> nature.  But I think the G5's behaviour most matches
> sendParallelHttpProbes() that, despite the name, sends HTTP and HTTPS in
> parallel.

So should I setup SSL on the server?  At the moment it's disabled.  I looked 
for https in the stream, but couldn't see it.

> I didn't figure out what happens if the HTTP probe `suceeds', assuming
> that's what we're seeing in the packets, and HTTPS doesn't.  I suspect
> that's what's triggering the `You're captive'.  Perhaps someone that
> knows Java could untangle it.

Well it could trigger a fail, although it seems a bit OTT, since a path to the 
Internet has been established.

> If that's the case, you're stuck.  A HTTPS connection couldn't be made
> to the Pi such that it can provide a trusted certificate verifying it's
> connectivitycheck.gstatic.com.  Happy to be proved wrong.  :-)

I've seen talk of Self Signed Certificates, but Patrick indicated that they 
wouldn't work.

I asked the guy at Foxdog if they are supporting https on their server, but he 
hasn't responded.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 12:43:28 GMT Ralph Corderoy wrote:
> Does the AP have an IP address?

Yes.  It's 192.168.0.254.
 
> Out of interest, I'd test your Pi set up from a Linux machine with
> commands like

Here are the results:

> dig connectivitycheck.android.com. a

; <<>> DiG 9.10.3-P4-Ubuntu <<>> connectivitycheck.android.com. a
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4710
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;connectivitycheck.android.com. IN  A

;; ANSWER SECTION:
connectivitycheck.android.com. 0 IN A   192.168.0.1

;; Query time: 11 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Feb 24 13:31:16 GMT 2018
;; MSG SIZE  rcvd: 74

> ping 192.168.0.1

terry@XPS-13:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=3.52 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=10.0 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.26 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=3.81 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=4.32 ms
64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=14.4 ms
^C
--- 192.168.0.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 3.520/7.235/14.440/3.952 ms

> curl -sSv http://connectivitycheck.android.com/generate_204

terry@XPS-13:~$ curl -sSv http://connectivitycheck.android.com/generate_204
*   Trying 192.168.0.1...
* TCP_NODELAY set
* Connected to connectivitycheck.android.com (192.168.0.1) port 80 (#0)
> GET /generate_204 HTTP/1.1
> Host: connectivitycheck.android.com
> User-Agent: curl/7.55.1
> Accept: */*
> 
< HTTP/1.1 204 No Content
< Server: nginx/1.6.2
< Date: Sat, 24 Feb 2018 12:19:08 GMT
< Connection: keep-alive
< 
* Connection #0 to host connectivitycheck.android.com left intact

> DTG?

Sorry.  Military speak. Date/Time Group.

> What's showing you the HTTP content of those packets?  The Android app?
> Does it actually show anything else, e.g. DNS, or packets?  For the WMT
> AP, you could still record on the Pi with tcpdump and then inspect with
> Wireshark on a laptop to see if there are other things from Android.

Yes.  The Android App.  See my other posting for the results when I used 
tcpdump instead.

> http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout
> set to zero can disable the `Connection: keep-alive' in nginx's
> response, though I doubt that's the cause.

It may be worth a try.

> So are you saying this technique didn't in fact work for any Android
> version when installed, so it's not a change in a later Android that
> broken it?

To be perfectly honest; I'm not sure any more.  I know we had problems back in 
April last year, when we deployed it, but I thought some of the devices 
worked.  Thinking about what I've done to get this far, I think that it's 
unlikely though, because I had no DNS Server configured back then.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 08:15:39 GMT Terry Coles wrote:
> I then went back to the suggestion made by Ralph a few days ago and captured
> the packets on the network when the WiFi connection was made.  In the
> event, I didn't use tcpdump because I also wanted to see what the exchange
> was when the system worked, ie, when I connected to a WiFi AP *with*
> Internet Access. Instead, I installed an Android App called 'Packet
> Capture', and used that; first with my home router and then by connecting
> to the WMT AP.  I got virtually identical exchanges each time,  Here is the

I decided to try tcpdump as suggested by Ralph, because I realised that the 
Android App was obfuscating the information.

I did two captures:

1.  Using my wife's Nexus 5 phone (Android 6), which connects to the WMT AP 
without complaint.

2.  Using my Moto G5+ phone (Android 7), which complains that the device has 
no Internet connection).

In each case, I started a stopwatch when I sent the tcpdump command on the Pi, 
and took a lap time when:

  a.  The Nexus showed a successful connection (approx 8 seconds).
  b.  The G5 put up the 'No Internet' dialogue (approx 16s).

I then continued capture for approx 1 minute.

Analysing the results in Wireshark, my limited skills allow me to see that 
both devices sent a GET /generate_204 to connectivitycheck.gstatic.com and got 
a '204 No Content' response a total of six times.  These GETs appear to 
continue even after the phone has accepted the AP in the case of the Nexus and 
complained about the AP with the G5.

I can't see anything else much in this capture to help, except that both 
phones seem to query a number of other sites and get refused of course because 
they are not in my DNS.  Strangely enough they seem to try an apple.com site!

(It should be noted that the sites that the phone tries seem to be a bit 
arbitrary; I've seen other google sites queried in other captures, including 
google.com and android.clients.google.com.) 

I've put both capture streams up on my website at:

  http://hadrian-way.co.uk/Misc/Misc.zip

If anyone with greater knowledge and experience than me could spare the time 
to have a look at these captures, I would appreciate it.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Saturday, 24 February 2018 08:15:39 GMT Terry Coles wrote:
> HTTP/1.1 204 No Content
> Server: nginx/1.6.2
> Date: Thu, 22 Feb 2018 20:05:31 GMT
> Connection: keep-alive
> 
> The only difference with the successful connection was the DTG.

I just realised that that wasn't quite true.  The actual response from the 
good connection was:

HTTP/1.1 204 No Content
Content-Length: 0
Date: Fri, 23 Feb 2018 21:09:06 GMT

Are those differences likely to cause a problem?

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-24 Thread Terry Coles
On Friday, 23 February 2018 17:07:34 GMT Terry Coles wrote:
> I've just had another thought as to what I might be doing wrong and have
> just written to Foxdog to get clarification of their solution.
> 
> I have put the 'android walled garden hack' code into a file located in
> /etc/nginx/sites- available with a simlink to /etc/nginx/sites-enabled.
> 
> In case Foxdog don't reply soon, can anyone tell me if I've put the code in
> the right place?

Foxdog confirmed that sites included in /etc/nginx/sites-enabled do not require 
the http directive, as mentioned in a comment response on the site (in fact it 
causes an error).

I then went back to the suggestion made by Ralph a few days ago and captured 
the packets on the network when the WiFi connection was made.  In the event, I 
didn't use tcpdump because I also wanted to see what the exchange was when the 
system worked, ie, when I connected to a WiFi AP *with* Internet Access.  
Instead, I installed an Android App called 'Packet Capture', and used that; 
first with my home router and then by connecting to the WMT AP.  I got 
virtually identical exchanges each time,  Here is the unsuccessful exchange:

GET /generate_204 HTTP/1.1
User-Agent: Dalvik/2.1.0 (Linux; U; Android 7.0; Moto G (5) Plus Build/
NPN25.137-93)
Host: connectivitycheck.android.com
Connection: Keep-Alive
Accept-Encoding: gzip

HTTP/1.1 204 No Content
Server: nginx/1.6.2
Date: Thu, 22 Feb 2018 20:05:31 GMT
Connection: keep-alive

The only difference with the successful connection was the DTG.

The trouble is that there are lots of other exchanges, which may or may not be 
relevant, so I'm not sure where to go from here.

I'll have to try many more captures I think before I can hope to see any kind 
of a pattern.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-23 Thread Terry Coles
On Friday, 23 February 2018 16:39:34 GMT Terry Coles wrote:
> Still looking for inspiration

I've just had another thought as to what I might be doing wrong and have just 
written to 
Foxdog to get clarification of their solution.

I have put the 'android walled garden hack' code into a file located in 
/etc/nginx/sites-
available with a simlink to /etc/nginx/sites-enabled.

In case Foxdog don't reply soon, can anyone tell me if I've put the code in the 
right place?


-- 



    Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-23 Thread Terry Coles
On Friday, 23 February 2018 12:25:29 GMT Terry Coles wrote:
> Any ideas as to what I've missed?

I think maybe I've got something wrong in the Foxdog configuration after all.

When the system is running, I get allocated an IP Address of 192.168.0.119 for 
WLN0 on my phone.  I can ping WMT.com and all the domains listed in the Foxdog 
solution. I can also issue traceroute and get 1 hop responses, so it looks 
like my DHCP and DNS servers configuration is OK.

I'm now wondering if the nginx config is missing something, but I can't 
actually see what at the moment.  If I issue:

nginx -s reload

I no longer get errors ( I had some, but they're fixed) and I can type 
'wmt.com' at the browser and I get the page I want - as long as I've agreed to 
stay connected to the AP which has no Internet access.

Still looking for inspiration

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-23 Thread Terry Coles
On Monday, 19 February 2018 12:04:51 GMT Terry Coles wrote:
> I'm hoping to try the new config tomorrow, when I go to the WMT.

The config provided by Foxdog Studios didn't work for me, so I removed the Pi 
and the AP from the WMT and set the whole thing up at home.

I'm still having problems, but I don't think it has anything to do with the 
config provided by Foxdog.  I searched back through the emails at the time and 
remembered that I had never got this spoofing to work on Android but, (as 
indicated by Foxdog), iPhones have always worked.  At the time, we agreed that 
it wasn't the end of the world to have to accept a connection with no path to 
the Internet, because at least the users would then realise that they wouldn't 
be able to access Twitter / Facebook etc when connected to our AP.  Since 
then, Management have decided that spoofing the Internet is a better solution.

Here is what we had, which worked as long as the user clicked on 'Remain 
Connected to this AP' when prompted by the phone:

The Wireless AP is a TL-WA7210N.  We configured it as an Access Point and used 
the built in DHCP server to set up an IP Range for Visitor's devices of 
192.168.0.100 - 199.

The Pi is running nginx and had the server wmt.com setup and the earlier 
version of the Foxdog solution.  There was no DNS server running anywhere on 
the system, which is why I suspect the Foxdog solution never really worked.

Since I got the system home, I have:

1.  Turned off DHCP in the TL-WA7210N.
2.  Configured The Raspberry Pi Webserver to also provide DHCP and DNS servers.
3.  Set up a static IP address of 192.168.0.1 for the Pi.
5.  Made the Pi a DHCP server instead of a client.
4.  Listed all of the domains in the Foxdog solution, plus the webserver 
(WMT.com) in the file hosts.dnsmasq

All using the instructions given in:

https://www.raspberrypi.org/learning/networking-lessons/lessons/

It is exactly the same as before !!!

Any ideas as to what I've missed?

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-19 Thread Terry Coles
On Sunday, 18 February 2018 12:19:22 GMT Terry Coles wrote:
> At the time I was using the information at:
> 
>   https://foxdogstudios.com/making-phones-believe-the-wifi-has-internet
> 
> to do this and had some success.

The chap at Foxdog Studios emailed me last night to tell me that he has now 
updated the site to include the latest information about domains used by the 
various Android Versions.  Apparently he has tested it with all the Android 
phone that he has reasonable access to and it has worked every time, including 
with Oreo.

I've asked him what he thought about our discussions regarding https and await 
his response.

I'm hoping to try the new config tomorrow, when I go to the WMT.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 17:34:23 GMT Hamish MB wrote:
> Reminds me, I had a load of old android VMS, I could re deploy them and use
> a packet sniffer on them too see if that will help.
 
> Good idea?

Hamish,

It depends if the Android versions are really old.  Clearly, the version of 
Android that I had on my Nexus 12 months ago (when I first deployed the 
webserver) seemed to work, but later versions didn't.  When I bought my Nexus 
it was V 5.0 and got upgraded to 6.0 at some point.  I can't remember if the 
wireless connections stopped working then or when I got 7.0 on my Moto G5+.

Also, If Google changed all of their OSs to prefer https at around that time, 
they may well have included that update in even earlier versions, (which your 
VMs may not have).

By all means, try the VMs if you wish, but in a few days I intend to set up a 
test system (or borrow the real system back from the WMT, since we've got to 
move the antenna anyway).  The first thing that I'll try is enabling https and 
then, if that doesn't work, I'll try tcpdump and / or wireshark.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 14:46:43 GMT Ralph Corderoy wrote:
> On the Pi, something like
> 
> sudo -i tcpdump -s 3141 -w /tmp/packets
> 
> and Ctrl-C-ing it when you've finished.
> 
> You might need to append a `-i wls34' or whatever the Pi's wifi network
> interface is, `ip a' might help.

Thanks Ralph.

I'll give it a try.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 14:16:50 GMT Ralph Corderoy wrote:
> Yes, that's why those URLs should take you to that line.

It did, when I enabled the domain in ScriptSafe.  Doh!!

> That's my point.  Same area of source code, but the domain names have
> moved.  This also helps confirm we're on the right track as 6 is OK for
> you, 7 not.

Yes.  I see what you mean.

> I don't know, but I'd guess by the surrounding URLs that https might be
> in play now.  You're rigging a DNS server so it returns your nginx
> server's IP address for any query?  

I used the exact code given on the Dogsbody site, but I made no special 
provision for https.  I'm not sure if nginx supports https by default (or at 
all).  I presume not because it looks like I need an SSL/TLS Certificate.  If 
so, that may be all that is wrong, since Google have definitely moved towards 
https in recent years.

> That means the mobile's packets will
> be reaching that box, another Pi?  Capture them, both a working mobile
> and a failing one, e.g. tcpdump(1), and examine them, probably with
> Wireshark on another machine.

The webserver is a Pi3 connected to the WiFi Antenna.  I've used Wireshark on 
a wired network many moons ago, presumably, I would have to introduce an 
Ethernet Switch into the system to capture the mobile's traffic.  Can a laptop 
connected to the same network see the traffic between the mobile and the Pi?

> > What do you mean by 8's?
> 
> The start of the URL's path is the Android version.

Of course it is :-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 13:00:32 GMT Ralph Corderoy wrote:
> These first two give a domain name, different in each.  I haven't
> checked other older versions.
> 
> http://androidxref.com/4.4.4_r1/xref/frameworks/base/core/java/android/net/
> CaptivePortalTracker.java#64
> http://androidxref.com/6.0.0_r1/xref/frameworks/base/packages/CaptivePortal
> Login/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java#59

Is that the domain name in DEFAULT_SERVER?  It seems to be either 
clients3.google.com or connectivitycheck.gstatic.com, which are both domains 
that were listed in the original posting at Dogsbody.

> But lately that's seemed to move elsewhere.
>
> http://androidxref.com/7.1.2_r36/xref/frameworks/base/packages/CaptivePorta
> lLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java#82
> http://androidxref.com/8.0.0_r4/xref/frameworks/base/packages/CaptivePortal
> Login/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java#84

I could see DEFAULT_SERVER in the first of those, but no domain name at all in 
the other.  Did you find one?

> I think they're now:
>
> http://androidxref.com/7.1.2_r36/xref/frameworks/base/services/core/java/co
> m/android/server/connectivity/NetworkMonitor.java#86
> http://androidxref.com/8.0.0_r4/xref/frameworks/base/services/core/java/com
> /android/server/connectivity/NetworkMonitor.java#87

Those both seem to be connectivitycheck.gstatic.com, so why does my Android 7 
phone not work?

> 8's is used here.

What do you mean by 8's?

> http://androidxref.com/8.0.0_r4/xref/frameworks/base/services/core/java/com
> /android/server/connectivity/NetworkMonitor.java#667

That also seems to include connectivitycheck.gstatic.com.

> You have a phone that currently fails to test with?

As I recall, it worked with my old Nexus (Android 6, but not with my Moto G5+ 
which is currently running 7.0 until Motorola and/or Tesco Mobile get around 
to upgrading it to Oreo.

Other people at the WMT have also had problems, so I'd like to sus it out in 
the next few weeks.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Revisited - Accessing a Local Network over a Wireless Router that is NOT Connected to the Internet

2018-02-18 Thread Terry Coles
Hi,

Back in August 2016, I posted a query about how to get a Wireless AP and 
Webserver to spoof an Internet connection so that a phone could be used to 
connect to our Audio Guide and Kiddies Quiz.

At the time I was using the information at:

  https://foxdogstudios.com/making-phones-believe-the-wifi-has-internet

to do this and had some success.

However, as the 2017 summer season progressed it became obvious that newer 
phones didn't work with this solution so I've just started to look at how we 
can fix it.

The original page at Foxdog Studios had disappeared so I wrote to them a short 
time ago and asked if it could be resurrected.  I just got a response (on a 
Sunday)  saying that they had taken it down because they too had 
experienced problems.  The chap there has just put it back up for me.

As a result, I have a starting point again, but if anyone knows what the 
latest test sites are for Android Phones (or has a link to a list), then I 
would appreciate it.  iPhones seem to be alright.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 11:16:04 GMT Ralph Corderoy wrote:
> dd(1) is quick.  It read(2)s a block of bytes and write(2)s that block.
> The kernel does the transfer of bytes from the device to dd's memory and
> vica versa.  If you don't choose a block size then it might be quite
> small,
> 

> 
> and most of your time is spent in overhead of switching between dd and
> the kernel.  Using bs=1M would cut down that overhead as you're unlikely
> to be using a device that insists on a particular block size.

I'm now halfway through writing the first drive, so I'll let that finish at 
around 3 pm today and try the second drive with a BS of 1M.

> /dev/urandom can be quite slow for large amounts.

OK.  I'll try the second drive with zeros.  

> One can go faster still by cutting out a read(2) for every write(2) by
> having a little Perl script or C program that loops, flinging the same
> data read once into every write().

Thanks.  I think I'll keep it simple though :-)
 
> > It seems to be pretty quick having reached 22 GB done in around 40
> > minutes.
> 
> I'm assuing that's GiB to the drive's TB.
> 
> $ units -1v 22GiB/40minutes hour/TB
>   reciprocal conversion
>   1 / (22GiB/40minutes) = 28.221896 hour/TB
> $

Yeah, see my other post relating to my arithmetic ;-(

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
Try Again.

This seems to happen when people cc me as well as sending the response to the 
list.  My mail client helpfully suppresses the original and only sends me the 
duplicate, which I then reply to

On Sunday, 18 February 2018 09:49:55 GMT PeterMerchant via dorset wrote:
> I have an idle PC sitting in my garage. You are welcome to borrow  it to
> install these disks and wipe them, if you think that would be faster.  I
> think it has both SATA and an IDE drive, but I would need to check. 
> That would get over the USB bottleneck.

Peter,

Thanks for the offer, but I'm now 25% of the way through the first drive.  Now 
that I've decided that one pass of random data will suffice, I'm quite happy to 
do one drive today and one tomorrow.

It was the overnight thing that was the problem.  If the PC had been in any 
room but this one, I'd have let it run overnight, but I don't have enough 
space anywhere else.


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Fwd: Re: Using shred

2018-02-18 Thread Terry Coles
This should have gone to the list.
-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 08:48:00 GMT Hamish MB wrote:
> You could well be being limited by your disks speed then. 100GB per hours is
> pretty fast for a HDD. Can you connect two at once to speed it up?
 
I think that it's more likely to be the interface.  The drive is a Seagate 
ST31000523AS, which has a SATA speed of 6 GB/s, a Transfer Speed of 600 MB/s  
and a Sustained Data Rate of 125 MB/s.  Clearly the Data Rate would be the 
limiting factor if I was connecting the drive directly to a SATA interface so 
it would theoretically give a total time of 2.22 hours to complete the 
process.

However, there is a USB interface in the way and I think that is slowing the 
process down by a factor of 4 to 5.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
On Sunday, 18 February 2018 07:59:30 GMT Terry Coles wrote:
> It seems to be pretty quick having reached 22 GB done in around 40 minutes.

Of course, if I was any good at basic arithmetic, I would have known that this 
is no quicker than shred.  It just passed 100 GB after about an hour; 1000 GB 
= 10 hours.

(I must have got the time wrong when I estimated earlier (as well!))

Even so, I think one pass of this command or shred should suffice.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
On Saturday, 17 February 2018 23:56:31 GMT Ralph Corderoy wrote:
> The NAS offered a `reformat'?  How long did it take?

It's part of the build process.  The NAS offers Raid 0, Raid 1, etc and as part 
of the process 
formats the drives.  It seems to be a special format in D-Link boxes, because 
Kubuntu 
didn't recognise the format.
 
> Kill it off then start from scratch tomorrow morning, assuming ten hours
> for a disk?

Actually 30 hours for disc, 10 hours for a pass.  The command that I used does 
three 
passes.

> Drives have an internal `erase' method, but over USB probably isn't a
> good way to play with it.
> https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

There are enough warnings there to sink a battleship.  I'll stick to 
traditional methods.

> Re-assemble the NAS, see the empty (mirrored?) drives, copy innocuous
> stuff onto it over and over until `full'.  `Erase' again for sale?

It also takes a very long time to copy stuff onto the drive from a PC on the 
network.  (This 
is one reason why I upgraded to a Netgear ReadyNAS.  The main reason was that 
the 1 TB 
drives were full, so I've bought a box with two 3 TB drives included and much 
better 
performance.)

I suppose that I could copy a file containing something boring like 'foo bah' 
repeatedly 
through a script running locally on the NAS box, except that this box doesn't 
allow remote 
login other than through the browser or SMB.

I'm currently running sudo dcfldd if=/dev/urandom of=/dev/sdc, see my post to 
Hamish.

-- 



    Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-18 Thread Terry Coles
On Saturday, 17 February 2018 19:22:05 GMT Hamish MB wrote:
> For modern drives a single pass with zeros is usually just fine. You can use
> dd if=/dev/zero of=/Dev/sdxy
 
> You could copy from /Dev/urandom for a quicker random number pass too.

Hamish,

I did find some information that told me about alternatives at 
http://daniemon.com/blog/how-to-wipe-a-hard-drive-with-linux/

The quickest method seemed to be 'wipe' (by a whisker according to the link), 
but the ETA 
given when I tried the command was 6 days and 5 hours!

The above link also suggests that dd is the longest method.  I must say that I 
used to get 
exceeding bored when copying a 4 GB SD Card.

However, I tried it and then realised that I would have to wait for it to 
finish before I found 
out the duration, so I've installed dcfldd which is currently running using the 
command 
sudo dcfldd if=/dev/urandom of=/dev/sdc.

It seems to be pretty quick having reached 22 GB done in around 40 minutes.


-- 



        Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-17 Thread Terry Coles
On Saturday, 17 February 2018 18:36:34 GMT Keith Edmunds wrote:
> On Sat, 17 Feb 2018 18:31:53 +, d-...@hadrian-way.co.uk said:
> > I'd be happier if there was no chance of data recovery.
> 
> Then destroy the drives.

I want to sell them with the NAS Box.

I do know about hammers :-)

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using shred

2018-02-17 Thread Terry Coles
On Saturday, 17 February 2018 17:56:45 GMT Keith Edmunds wrote:
> Shred is slow. No one will trivially read the ex-data following a
> reformat. I suppose if the drive used to hold your plans for world
> domination, a few more hours of shred is a small price to pay. However,
> if the drive only held data of interest to you and you don't want the PC
> running overnight, don't worry about it.

I'm sure you are right, but the NAS Box was used to back up four different PCs 
and I'm not sure what was there.  My two machines were both Linux and I only 
backed up the /home partition.  Even so, there could be stuff that might give 
passwords away etc.

The other two PCs were both Windows machines (son and daughter's) and they 
both tended to back up the whole of their 'C'-Drives, so it's anyone's guess 
what might be buried in the Registry.

I'd be happier if there was no chance of data recovery.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Using shred

2018-02-17 Thread Terry Coles
Hi,

I am retiring my old D-Link Sharecenter NAS with a view to flogging it on eBay. 
 Clearly, I 
want to ensure the data has been completely scrubbed off the two 1TB drives.

I have reformatted the drives in-situ, but felt that I should do more than 
that, so I've 
removed the drives and am currently running shred on the first, using :

   sudo shred -f -v /dev/sdc

The trouble is that the whole thing is so slw!  I'm currently at 10% on the 
first pass 
after an hour.  At that rate the first pass won't be completed until 3 am 
tomorrow and the 
third pass sometime tomorrow evening!  My PC is in the bedroom, so I'd rather 
not run it 
overnight.

I suspect that part of the problem is that I'm putting the drive into an 
external USB 
adaptor, but my PC has no spare slots for other drives.

Any suggestions?

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Bournemouth Pub Meeting Tonight, Tuesday 2018-02-06.

2018-02-06 Thread Terry Coles
On Tuesday, 6 February 2018 11:27:37 GMT Ralph Corderoy wrote:
> Delayed by a week, it's the pub meet tonight at The Broadway, 8pm-ish.

Not actually delayed this month :-)

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week Tonight

2018-01-30 Thread Terry Coles
All,

The next meeting is one week tonight at The Broadway, Bournemouth on Tuesday, 
2018-02-06 20:00.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul, Ian,

Are you going? 

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-22 Thread Terry Coles
On Monday, 22 January 2018 13:21:42 GMT Terry Coles wrote:
> Thinking about what you said about this usage:
> >  `const char *p' means p is a pointer to a char that's const.

Rereading your original post, I think I've now caught on.

> What does that actually mean in terms of what it points at?
> 
> Obviously p cannot be a char because it is incremented and the pointer is
> containing a memory address, so what is char in this case?


-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-22 Thread Terry Coles
On Monday, 22 January 2018 12:38:33 GMT Ralph Corderoy wrote:
> `const' didn't exist when I started C, probably not for you either.  It
> isn't in K  It was added by the X3J11 committee as part of ANSI
> standardisation that became C89, AKA C90.  K has it.

Yes.  I started with plain ol' K, in 1990.

> A lot of the time it gets in the way because a function doesn't bother
> to state a parameter's const-ness and you have to toss the passed
> value's const away with a cast on the call.  I suspect it was added more
> as a compiler hint than improving software quality, like the committee's
> `volatile', and aborted `noalias' suggestions.

Thinking about what you said about this usage:

>  `const char *p' means p is a pointer to a char that's const.

What does that actually mean in terms of what it points at?

Obviously p cannot be a char because it is incremented and the pointer is 
containing a memory address, so what is char in this case?

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-22 Thread Terry Coles
On Monday, 22 January 2018 12:14:21 GMT Ralph Corderoy wrote:
> > I didn't spot this yesterday, but that won't work because p is used as
> > a variable within that function.
> 
> Have you tried it?  :-)
> 
> int GetDValue(const char *k)
> {
> char *p = strrchr((char *)k, 'D');
> ...
> p++;
> 
> Yes, I read that before making the suggestion.
> `const char *p' means p is a pointer to a char that's const.
> It doesn't mean it's a const pointer to a char that can vary,
> nor that it's a const pointer to a const char.
> The pointer and char can be const or not, giving four variations.
> Thus the `p++' should be fine;  it's moving the pointer onto the next
> const char.

Right thanks.  I did say my knowledge of C / C++ is 'Janet and John', but I 
suspect that I never even made that grade !

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-22 Thread Terry Coles
On Sunday, 21 January 2018 16:23:56 GMT Ralph Corderoy wrote:
> `k' is already a `const char *' so the cast to the same thing looks
> redundant.  Because that parameter is a const, I think the first version
> is picked, it returns a `const char *', but it's being assigned to `p'
> that's a non-const `char *'.
> 
> Looking at the use of `p', I suggest making that a const too.

I didn't spot this yesterday, but that won't work because p is used as a 
variable within that function.  Here is the full code:

//Retrieve the subdevice value, whith comes after the capital D
//in the device name, (i.e. pcmC0D1).
int GetDValue(const char *k) 
{
char *p = strrchr((char *)k, 'D');
if (!p) {
return -1;
}
p++;
int d = strtol(p, NULL, 0);
if (d < 0 || d > 32)
return 0;

return d;
}

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-21 Thread Terry Coles
On Sunday, 21 January 2018 16:23:56 GMT Ralph Corderoy wrote:
> I haven't time to reply to your original email at the moment, though
> from a quick skim the use of a compiled language looks like overkill,
> and tedious due to low-level parsing.

Ralph,

No rush, but would you use something like the Perl example at the beginning of 
that page?

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-21 Thread Terry Coles
On Sunday, 21 January 2018 16:02:03 GMT Hamish MB wrote:
> Yes, it seems to me that this code has a mistake in it. The fix doesn't
> change how the code works, just fixes (assuming this was indeed a mistake)
> that cast, which seems like something that could never work to me.
 
Well.  I made the change and I now have an executable.  It still worries me a 
bit though.

I probably won't have time to check it out properly for a few more days now, 
dues to other commitments.

> As far as I can see, that's an error in the code, because it tried to do
> something that isn't allowed. You could also try using the -fpermissive
> flag by the looks of it.

I did and it didn't help.

-- 



        Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-21 Thread Terry Coles
On Sunday, 21 January 2018 15:31:15 GMT Hamish MB wrote:
> Try removing the "const" from the cast for the variable k, so it instead
> reads:
 
> char *p = strrchr((char *)k, 'D');

So you are suggesting that the code on the website where I got this from is in 
error?  If so, I wonder how he got it to work.

> This may or may not fix the problem depending on how the rest of the code
> works. You can't cast a const type variable to a non-const type because it
> would potentially have massive security implications - eg people modifying
> passwords on their way to being stored / vice versa man in the middle type
> attacks.
 
Well.  That's one of the things that worries me.  If this fix changes the 
functionality of the code from what the original author intended, then my USB 
devices won't be permanently given Card Nos and I'll be chasing rainbows.

> What compiler are you using by the way?

Unless Kubuntu points at something different the GNU C++ compiler; that's 
what's installed.  

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-21 Thread Terry Coles
On Sunday, 21 January 2018 12:35:16 GMT Terry Coles wrote:
> I'm starting to get my head round this and think that I have a fighting
> chance of sorting it out.  However, I have a couple of queries (so far),
> both coming from the C++ code in your second link.

I'm having problems compiling the C++ code.  (Mainly because when I wrote C 
(about 35 
years ago), I was at Janet and John level and the little I did with C++ was 
even less.)   This 
line:

char *p = strrchr((const char *)k, 'D');

gives the following error:

terry@OptiPlex:~/Development/Wimborne_Model_Town/Winter_2016-17_Projects/
Minster_Bells/Code/USB_Audio_Fix$ g++ USB_Audio_Fix.cpp -o alsa_name
USB_Audio_Fix.cpp: In function ‘int GetDValue(const char*)’:
USB_Audio_Fix.cpp:112:22: error: invalid conversion from ‘const char*’ to 
‘char*’ [-
fpermissive]
 char *p = strrchr((const char *)k, 'D');
   ~~~^~

I can see what the error is saying but not why you can't do this conversion.  
Can I anyone 
shed any light?  I had assumed that the code would compile, but not for me it 
doesn't ;-(

-- 



        Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-21 Thread Terry Coles
On Wednesday, 17 January 2018 23:06:44 GMT Ralph Corderoy wrote:
> There's also https://alsa.opensrc.org/MultipleUSBAudioDevices that
> describes the parameters the kernel module can take to index the audio
> interfaces, and https://alsa.opensrc.org/Udev that it links to at the
> end for using udev, especially the second section where he has five
> identical USB audio interfaces wired to distinct rooms.

Ralph,

I'm starting to get my head round this and think that I have a fighting chance 
of sorting it out.  However, I have a couple of queries (so far), both coming 
from the C++ code in your second link.

1.  In the first major comment block, the author says that he made the 
following:  File: /etc/udev/rules.d/39-usb-alsa.rules.

Why 39-usb-... and not just usb-... ?

2.  Is there any reason why the author used C++ rather than C for this 
application?  Just personal preference or is there some benefit in this case?

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-17 Thread Terry Coles
On Wednesday, 17 January 2018 23:06:44 GMT Ralph Corderoy wrote:
> There's also https://alsa.opensrc.org/MultipleUSBAudioDevices that
> describes the parameters the kernel module can take to index the audio
> interfaces, and https://alsa.opensrc.org/Udev that it links to at the
> end for using udev, especially the second section where he has five
> identical USB audio interfaces wired to distinct rooms.

That will be useful.

Looking again at my link to the post by William, noticed in my follow-up 
replies that I had 
been struggling a bit with the udev solution too.

I then looked at the discussions that went on after that time and remembered 
that I had 
originally been using a Pi Zero and a 'Naked' USB Hub from ModMyPi and had 
discovered, 
through this list, that the Zero has a Single-TT USB port and that had been at 
the root of 
the problem.

I then switched to using a Pi 3, which has a Multi-TT USB port.  The Pi 3 has 
an audio 
output, the whole problem of using multiple USB Audio Adaptors went away.

The rest is history  (well so was that really :-) )

> In USB terms, they're the Vendor and Product IDs, both 16-bit.  8086 is
> Intel's.  :-)  http://www.linux-usb.org/usb-ids.html doesn't know
> Intel's 0808 and that's why lsusb(8) isn't saying anything more than
> `Intel Corp.'.  That site accepts patches.

Yes.  I've always understood that, but since lsusb provided these numbers, I've 
always 
believed (until now) that they could be used to identify which interface 
carried the Audio 
device for the Bells and which for the music.

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-17 Thread Terry Coles
On Wednesday, 17 January 2018 17:04:56 GMT Ralph Corderoy wrote:
> I've been struggling to find this in the archives.  Even assuming 2016.
> https://mailman.lug.org.uk/mailman/private/dorset/
> https://www.mail-archive.com/dorset@mailman.lug.org.uk/
> 
> > At the time it was suggested that I could discriminate between the two
> > adaptors by reading their ID string.

I thought that it was William Sowerbutts that said it, but I couldn't find that 
either.  What I did find was this:

https://mailman.lug.org.uk/mailman/private/dorset/2016-December/015967.html

Which might be the answer.  I'll not be able to follow this up for a day or 
two, because of family illness and other commitments, but I'll have a look at 
the OMG! Ubuntu link and see if I can make it work.
 
> How are you observing the ID string?  I think you might be wrongly
> calling something else that.  It's not the `0d8c:013c' or `8086:0808'.

Those numbers are the Manufacturer's ID.  I'm sure that someone thought that 
these could be used; maybe it was simply said at a Meeting.

I've been getting those numbers from lsusb.

> BTW, when you did `dmesg | grep PnP' you may have discarded useful
> information in the vicinity of `PnP' lines that didn't contain that
> text, so it could be worth looking again.

I also tried `dmesg | tail' and that wasn't much use either.

> Also, `udevadm info -e' may give interesting details to distinguish the
> two, but you'd have to search through the output for `audio' and poke
> about.

Yes that was what William was referring to in his post.

> You've had this before.  I thought then you were sending a HTML email
> and Mailman was stripping it back to plain text, losing a lot of the
> content, and suggested you ensure you're sending plain text instead.  If
> that can't be done, put the text in a file and paste the output of
> `base64 <file'.

It was simply copied straight out of Konsole.  In future, I'll paste it into 
Kate and copy it from there.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 18:03:56 GMT you wrote:
> I'll post it on the Raspberry Pi Forum later; have to go to dinner now.

Done.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 18:02:40 GMT you wrote:
> On Sunday, 14 January 2018 17:57:26 GMT Terry Coles wrote:
> Some stuff:
> 
> This is weird, I think something is cutting off the information that I have
> been putting at the end of the message.  One more time:

I'll post it on the Raspberry Pi Forum later; have to go to dinner now.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 17:57:26 GMT Terry Coles wrote:
Some stuff:

This is weird, I think something is cutting off the information that I have 
been 
putting at the end of the message.  One more time:

*terry@OptiPlex*:*~*$ aplay -l 


-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 17:51:51 GMT Terry Coles wrote:
> On Sunday, 14 January 2018 17:40:14 GMT Andrew wrote:
> > The IDs in lsusb won't help, they are the vendor ID and device ID for
> > that type of card, not that instance in your machine.
> 
> They would if I could tie the ID to the hw: channel in aplay, because I know
> which ID is plugged into the tower and which into the nave.
> 
> That's what I've been unable to do.
> 
> > It looks like aplay -D can use the whole device string, eg.
> > "plughw:CARD=Device,DEV=0" but mpg123 can't...
> > 
> > I've done some more experimenting and I can see how to do it... I think...
> > First list devices with 'aplay -l' (lowercase). On here I get this:
> > 
> > card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
> > 
> >Subdevices: 1/1
> >Subdevice #0: subdevice #0
> > 
> > card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
> > 
> >Subdevices: 1/1
> >Subdevice #0: subdevice #0
> > 
> > card 2: Device [USB Sound Device], device 0: USB Audio [USB Audio]
> > 
> >Subdevices: 1/1
> >Subdevice #0: subdevice #0
> > 
> > There's three cards here, and each has one device.
> > The middle one (HDMI), is card 1, device 3. I can play through that with:
> > mpg123 -o alsa -a hw:1,3 /path/to/audio
> > 
> > Or if I want the USB device:
> > mpg123 -o alsa -a hw:2,0 /path/to/audio
> > 
> > If I wanted the internal card that would be hw:0,0, but there's nothing
> > plugged in to it right now... :)
> 
> Yes.  I understand that.  I posted my version of aplay -l at the Raspberry
> Pi Forum, but here it is again:
> 
> terry@OptiPlex:~$ aplay -l
>  List of PLAYBACK Hardware Devices 
> card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
> card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 3: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 4: Device_1 [USB PnP Sound Device], device 0: USB Audio [USB Audio]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> 
> and here is what I got just now, with the same adaptors plugged into the
> same USB ports:
> 
> *terry@OptiPlex*:*~*$ aplay -l
Oops the thing didn't go through properly.  Here is the latest one again.

*terry@OptiPlex*:*~*$ aplay -l 


-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 17:40:14 GMT Andrew wrote:
> The IDs in lsusb won't help, they are the vendor ID and device ID for
> that type of card, not that instance in your machine.

They would if I could tie the ID to the hw: channel in aplay, because I know 
which ID is 
plugged into the tower and which into the nave.

That's what I've been unable to do.

> It looks like aplay -D can use the whole device string, eg.
> "plughw:CARD=Device,DEV=0" but mpg123 can't...
> 
> I've done some more experimenting and I can see how to do it... I think...
> First list devices with 'aplay -l' (lowercase). On here I get this:
> 
> card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
>Subdevices: 1/1
>Subdevice #0: subdevice #0
> card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
>Subdevices: 1/1
>Subdevice #0: subdevice #0
> card 2: Device [USB Sound Device], device 0: USB Audio [USB Audio]
>Subdevices: 1/1
>Subdevice #0: subdevice #0
> 
> There's three cards here, and each has one device.
> The middle one (HDMI), is card 1, device 3. I can play through that with:
> mpg123 -o alsa -a hw:1,3 /path/to/audio
> 
> Or if I want the USB device:
> mpg123 -o alsa -a hw:2,0 /path/to/audio
> 
> If I wanted the internal card that would be hw:0,0, but there's nothing
> plugged in to it right now... :)

Yes.  I understand that.  I posted my version of aplay -l at the Raspberry Pi 
Forum, but here 
it is again:

terry@OptiPlex:~$ aplay -l
 List of PLAYBACK Hardware Devices 
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
   
card 4: Device_1 [USB PnP Sound Device], device 0: USB Audio [USB Audio]
   
  Subdevices: 1/1   
   
  Subdevice #0: subdevice #0

and here is what I got just now, with the same adaptors plugged into the same 
USB ports:

*terry@OptiPlex*:*~*$ aplay -l 


That's my problem.


-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
On Sunday, 14 January 2018 16:49:17 GMT Andrew wrote:
> Ideally you want a balanced audio output. I would give you a link to the
> USB to XLR audio device I bought many years ago, but I can't seem to
> find them any more! There's lots around with a single input but the one
> I got has two inputs and two outputs.
> There is this for the Raspberry Pi, however I'm not sure if you can have
> more than one on the same machine:
> 
> https://www.hifiberry.com/shop/boards/hifiberry-dac-pro-xlr/
> 
> Then you'd need a balanced amplifier and cables, and that should get rid
> of any hum at all.

We looked at these devices before we went with the solution that we chose.  
The problem is that they cost significantly more than the Raspberry Pi itself 
and an order of magnitude more than the USB Audio Adaptors.  Also, we're not 
looking for HiFi, just a reasonable rendition of organ music and bells.

I haven't given up with the hum problem, but the two USB adaptors solve the 
problem perfectly; as long as someone is there to iteratively discover which 
adaptor has been attached to which channel.  Not a practical proposition of 
course in a system runs 24/7 and has to cope with the odd power cut.

> I think you want 'aplay -L', not 'aplay -l'. Then you'll see the device
> names, something like "plughw:CARD=Device,DEV=0".
> 
>  From the man page:
> 
> -l, --list-devices
>List all soundcards and digital audio devices
> 
> -L, --list-pcms
>List all PCMs defined
> 
> -D, --device=NAME
>Select PCM by name

I have used both aplay -l and aplay -L, but neither help.  Here is a couple of 
segments from the relevant output for the two devices:



sysdefault:CARD=Device
USB PnP Sound Device, USB Audio
Default Audio Device

..

plughw:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Hardware device with all software conversions


sysdefault:CARD=Device_1
USB PnP Sound Device, USB Audio
Default Audio Device
front:CARD=Device_1,DEV=0



plughw:CARD=Device_1,DEV=0
USB PnP Sound Device, USB Audio
Hardware device with all software conversions


As you can see, the only difference between the two entries is the _1 after 
Card=Device.  That doesn't tie up with the ID Numbers in lsusb either. 

Of course, if I knew the name of the device that was connected to the channel 
that I wanted, then aplay -D might be useful.  :-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Using Two USB Audio Adaptors and Selecting the Right One Programatically

2018-01-14 Thread Terry Coles
Hi,

You may remember my queries in November of last year regarding the use of two 
USB 
Audio Adaptors with a Raspberry Pi; one to play the chimes and one to play the 
organ 
music inside the Wimborne Model Town Minster.  At the time it was suggested 
that I could 
discriminate between the two adaptors by reading their ID string.

In the event that solution didn't work for two reasons: first the USB Hub in a 
Pi Zero is a 
single-TT port and the other is because the two adaptors had the same ID string 
;-(

At the time we solved this by changing to a Pi 3 which has a (crude) audio jack 
so I could 
send the bells to that channel and the music to a USB Audio Adaptor plugged 
into one of 
the four available USB Ports.  (BTW, the Pi 3 has a multi-TT port).

Everything in the garden was lovely until the 12 V (Audio Amp) PSU Brick failed 
in August 
and the replacement turned out to be noisy.  There was always a bit of a hum 
loop, but it 
was acceptable until the extra noisy PSU came along.

I managed to obtain a couple of USB Audio Adaptors with a different ID string 
to the 
original ones, so I thought that we could revert to plan A.  However, I can't 
work out how 
to identify the channel from the info available from lsusb, aplay -l and dmesg.

I've published the question on the Raspberry Pi Forums at:

https://www.raspberrypi.org/forums/viewtopic.php?f=38=202382

  but there haven't been any responses to date.

Anyone here got any ideas?  For convenience, I'm working with the two adaptors 
plugged 
into my desktop PC (Dell Optiplex), but should be able to transfer the 
technique to the Pi 
once I've worked out the trick.  (BTW aplay -L gives a lot more info but I 
couldn't see 
anything in there to tie the hw: channel to the Adaptor's ID string.)

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Distro

2018-01-01 Thread Terry Coles
On Monday, 1 January 2018 15:19:58 GMT Zed Beevor wrote:
> Have you guys ever thought about building you own distribution ?.
> Combined effort project and not loan wolf.

Zed,

It's a lot of hard work and when it's finished, there's a lot more hard work 
keeping it up to date with the latest security patches and bug fixes.

So no; I don't think many of us have thought about building our own distro for 
very long :-)

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week Tonight

2017-11-28 Thread Terry Coles
Hi,

The next meeting is just one week away at the Broadway, Bournemouth at 20:00 
on Tuesday evening, 2017-12-05.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul,

Are you going?  My turn to drive.

Ian,

If you're going this time, I'll pick you up.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-12-05 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] General collection of problems on Ubuntu

2017-11-18 Thread Terry Coles
On Saturday, 18 November 2017 10:13:56 GMT Professor Maqjor wrote:
> After having made a complete switch to Ubuntu, a handful of problems
> have turned up and I can't find any solutions online.

Rafi,

I don't use Ubuntu (I use Kubuntu) so a lot of my experience is likely to be 
irrelevant to your problem.

However:

> The issues I'm having the most are:
 
> 

> - Icons of apps showing as a question mark.
>
> - Terminal windows became sub-windows of Mozilla Thunderbird, even
> when Thunderbird was closed. Only happened once though, restart fixed it.

Did you install this as a clean system or as a replacement for your old (Mint 
I think) installation?  If so, was it a *really* clean install or did you have 
your /home directory on a separate partition and point Ubuntu to it?

I've had issues in the past where I tried re-use my home partition and 
'inherited' some nasty problems.  It shouldn't happen if you do a clean 
install of a later version of the same distro, but could well be problematic 
if you are installing Ubuntu over a Mint system.

> I'm looking for an Ubuntu Tweaks alternative, as I've seen it's been
> discontinued. I'm also missing an anti-virus, any recommendations?

I can't help on Ubuntu Tweaks, but I generally use ClamAV for antivirus.

Of course there are few Linux viruses as yet, but it does help to avoid 
passing on viruses to Windows users :-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-12-05 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week Tonight

2017-10-31 Thread Terry Coles
Hi,

The next meeting is just one week away at the Broadway, Bournemouth at 20:00 
on Tuesday evening, 2017-11-07.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul,

Are you still going?  Your turn to drive as discussed.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-11-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

[Dorset] Next Meeting - One Week Tonight

2017-09-26 Thread Terry Coles
Hi,

The next meeting is just one week away at the Broadway, Bournemouth at 20:00 
on Tuesday evening, 2017-10-03.  See:

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub#the_broadway

Paul,

Are you going?  Your turn to drive I think.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-18 Thread Terry Coles
On Sunday, 17 September 2017 11:52:00 BST Ralph Corderoy wrote:
> BTW, this is all fairly basic shell scripting stuff, e.g. quoting with
> "" or '' or ``, with a little knowledge of how Unix works.  I know you
> think you don't need to know it, and can stick with Python, or the
> electronics, but you're clearly having a tough time of it learning
> piecemeal from a hotchpotch of problems rather than a planned gentle
> introduction.

Well that's me told :-)

> I learnt from two of Unix's creators, Kernighan and Pike's _The Unix
> Programming Environment_, http://amzn.to/16SVwhD and it's what I still
> recommend, though the price seems to have kept pace with inflation over
> the decades.  There are second-hand ones available though.

That's the nicest RTFM I've ever had :-)

The problem I have is that I was never (and never will be) a software 
developer.  I have written snippets of code in various languages on both Unix 
and Windows platforms for well over 30 years, but I have never sat down to 
intensively write code; it has always been a means to make the electronics 
work.

Taking the quoting of the strings in 'echo', every language and platform that 
I have ever used has had a different policy on strings (single quotes, double 
quotes, brackets and combinations thereof).  I only mentioned the quoting 
problem because I had done what I usually did for strings and then only 
realised it was wrong when I read your response (at a time when I would be 
unable to test it for a few days).

With 'exec' the story was different because I had never noticed this command 
before.  I read the man page when Bob mentioned it and as usual learnt little 
because of the terminology used.  I then looked around and stumbled across a 
page that made some kind of sense.  It was only when you said that my 
definition was wrong that I went back and realised that I had found a 
definition 
of exec(), not exec.

I do read books and online material to find out what I need to do, but since I 
never trained as a software engineer, I frequently end up more confused than 
when I started; hence my Janet and John queries on this list.  Coupled with 
the fact that I literally only do this sort of thing a few times a year (when 
the hardware needs a platform to operate on), I suspect that I'd forget what I 
learned by the time I needed it.

Anyway.  I'm still grateful for any help given and I'll try not to be so dumb 
in the future ;-(

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-17 Thread Terry Coles
Ralph,

Thanks for all the information.  I'll probably not get round to looking at it 
for a few days because I shortly have to set off for the Midlands to collect 
my mother, who is staying with us for the week.  I'll give it a whirl to see 
what's, what.   Just at the moment though, I only have time to dash this off 
and no time to fire up the Pis.

On Saturday, 16 September 2017 20:21:17 BST Ralph Corderoy wrote:
> If you're using `echo foo' then that goes to standard out, stdout.  But
> that might be being discarded.  You could try standard error, stderr,
> instead with `echo foo >&2'.  But that might be being discarded too.
> Use

One thing that struck me though.  I understand what you are saying here but 
the messages are being echoed when I simply type 'sudo /etc/rc.local' in a 
shell but not when it is executed at boot up.  Also, I know the command is 
being executed correctly at boot up, because, although I don't get the 
message, I do get the O/P of rdate, which is something along the lines of 
'clock adjusted by xyz seconds'.  Also the clock is right :-)

Is there some mechanism that directs the O/P of echo to stdout once the system 
has booted but to somewhere else while it is being booted?

Finally, I also realised last night that all the examples of echo that I had 
seen were written as echo foo, whereas I have written echo "foo".  Could this 
have any bearing?

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-17 Thread Terry Coles
On Saturday, 16 September 2017 19:09:27 BST Bob Dunlop wrote:
> exec rdate -v 192.168.0.2

This only occurred to me last night.  When I put the command into my script 
without preceding it with 'exec' it appears to work.  According to the 
references I've found for exec, (including its man page), the command allows 
you to wrap the arguments of the target command so that the underlying code 
receives them correctly.  My rdate command includes one switch and one 
argument, so how come it works without the exec prefix?

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-16 Thread Terry Coles
On Saturday, 16 September 2017 19:09:27 BST Bob Dunlop wrote:
> exec rdate -v 192.168.0.2

Thanks.  I copied some code from somewhere else ;-(

Anyone know how to get the message to delay?

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-16 Thread Terry Coles
On Saturday, 16 September 2017 16:53:24 BST Ralph Corderoy wrote:
> Some ports provide such trivial functionality that inet and xinetd do
> the work themselves, and TCP and UDP port 37 is one of those.
> https://en.wikipedia.org/wiki/Xinetd gives some more detail, and its
> worked example is an RFC 868 time server;  just what you want.

Ralph,

That appears to work beautifully ;-)

I have a couple more questions before I can finish the job:

1.I put the command into rc.local to ensure it executed at boot up, with a 
30 second delay just before it to ensure that sumppi had started before it was 
interrogated.  So that future maintainers might have a clue what is going on I 
put a message about the reason for the delay just before the if structure 
containing the command.  The trouble is that this message is not echoed to the 
console during boot-up but it is if I run rc.local explicitly from the command 
line.  How do I get the message to show up in the boot messages.

2.  I tried to put the command into an if structure to test to ensure that it 
worked, eg

if [ "rdate -v 192.168.0.2" ]; then
  exit 0
else
  exit 1
fi

However, the command doesn't seem to execute.  It does if I just put it in 
without testing for the result.  Is it possible to do this with this command?

BTW.  Thanks for your help (again).

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-16 Thread Terry Coles
On Saturday, 16 September 2017 17:05:27 BST Ralph Corderoy wrote:
> Out of curiousity, what rebooted?

Both devices.  They both derive their power from the same 19 V PSU.

-- 



    Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-16 Thread Terry Coles
On Monday, 11 September 2017 15:14:43 BST Ralph Corderoy wrote:
> You might find an rdate(1) from the slave is simpler at boot time.  I
> don't know if Raspbian provides a server for the `time' port, but it's a
> trivial thing.

Well.  I took your advice and started from a clean installation of Raspbian 
Stretch and 
gradually added the various packages and config settings to see what broke it.

Everything worked fine until I configured the remote Pi (buttspi) to read time 
from the 
NTP Server on the master (sumppi).  I had been running with NTP installed on 
both Pis, 
and sumppi configured to broadcast on the network's broadcast address.  The RTC 
kept 
perfect time.  I then enabled 'broadcastclient' on buttspi and on the next 
reboot the time 
on sumppi was reset to the same (or nearly the same) as buttspi.

Unless anyone can spot the obvious howler, then I'm ready to try rdate, as you 
suggested.

With that in mind, I installed rdate on buttspi, isolated the Pi from the local 
network, 
plugged in a WiFi adaptor and typed:

  sudo rdate -ncv 0.debian.pool.ntp.org

and it worked!

I then set up the system as it will be in situ (without the WiFi adaptor) and 
typed:

  sudo rdate -v 192.168.0.2

and got connection refused.  I've googled for the 'trivial' instructions for 
setting up the 
time port, but can't really see what I need to do.  Apparently, (according to 
the rdate man 
page), the time source 'is usually implemented as a built-in service of 
inetd[1](8)' and is on 
port 37 by default.  Do I need to enable that port or is it slightly more 
complicated than 
that?

-- 



        Terry Coles


[1] http://www.huge-man-linux.net/man8/inetd.html
-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-11 Thread Terry Coles
On Monday, 11 September 2017 15:14:43 BST Ralph Corderoy wrote:
> More than one thing, I expect.  It's possible your system is trying to
> adjust the RTC based on the divergence it notices between boot-up and
> shutdown.  /etc/adjtime can be a sign of that, or
> /etc/init.d/hwclock.sh.  Then ntpd might be triggering something similar
> in the kernel by reporting NTP-time is sync'd;  that's the "11 minutes"
> that you've been seeing.
> https://unix.stackexchange.com/questions/285129/switch-off-11-minute-kernel-> 
> mode

I was thinking that this was happening, but I wasn't sure exactly why.
 
> I don't know if dmesg(1) shows this read/write to the RTC.

I'll have a look.  I'm waiting to see if disabling the NTP server has truly 
fixed this before I do anything else.
 
> Am I right in thinking that you want the Pi to treat the RTC as
> perfection, never wrong, and never adjust it unless you manually set the
> RTC's time?  That the RTC time should be used at boot, and thereafter
> the Pi's own clock maintains the time and the RTC is read or written
> again.  Any divergence doesn't matter because the Pi will reboot
> tomorrow and the RTC read afresh.

That's exactly what we want to do.  We don't mind if the RTC is a bit wrong 
(ie a minute or two, so that we can tie readings to events), but we want all 
Pis to have the same time.  Eventually there may be three, four or even five 
Pis in this system, depending on how many Butts sites we end up with and then 
there will be the webserver to provide staff control and Visitor viewing.  The 
webserver may end up running on the 'master' Pi or the Audio Guide and Quiz 
webserver; we haven't done that bit of system design yet.

> You might find an rdate(1) from the slave is simpler at boot time.  I
> don't know if Raspbian provides a server for the `time' port, but it's a
> trivial thing.

That looks like a good way to go and a lot less 'messy' than running an NTP 
server.  I'll have a look into it.

Thanks for your help again.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-11 Thread Terry Coles
On Sunday, 10 September 2017 12:32:49 BST Terry Coles wrote:
> I've been reading the man page for hwclock to see what --hctosys and --systz
> do and have been struggling to see how relevant this might be and I note
> the reference to NTP. Bearing in mind that the NTP server is running on the
> master Pi (the same one that has the clock), I'm not sure if it's an issue
> or not.

Yesterday, I removed the code in ntp.config to set up the NTP server on the 
'master' pi and 
a few minutes ago the time was accurate to within 1 second. Obviously, I need 
to monitor 
it for a bit longer, but it looks like something is interfering with the clock 
when the server 
is running. I think that it's likely I've found the problem and I need to work 
out how to 
prevent the NTP server affecting the time on it's own machine.

Anyone got any ideas?

-- 



    Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

Re: [Dorset] Raspberry Pi Issue with hwclock

2017-09-10 Thread Terry Coles
On Sunday, 10 September 2017 18:01:50 BST Ralph Corderoy wrote:
> > There's a fair amount of work gone into configuring the system at the
> > moment and I'd rather not have to rebuild it if I don't have to.
> 
> I didn't mean trash your existing SD card's content, but use a spare
> one.  :-)

:-)  I realised that.  It's what I'd have to do to get the clean installation 
to a fully working sumppi that I was referring to.

> I suppose the slaves could send their readings to the master to log
> centrally, then they wouldn't care what time it was.  :-)

The actual software that is monitoring the levels does that, but we want the 
logs so we can see what went wrong and when.  For example the electrics at the 
WMT are sadly in need of an overhaul and the power trips from time to time.  
It's useful to known when this happens, especially since the Pi features a 
fake hwclock which picks up from where it left off, which is useful, but 
confusing in these circumstances.  Probably more relevant to normal ops is 
knowing that the Butts pump cut out at the right time; when the butts were 
nearly full.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

<    4   5   6   7   8   9   10   11   12   13   >