Re: [ubuntu-uk] Reverse engineering data files

2015-01-02 Thread Gareth France
I've got my new Primetest 300 tester today. I was rather peeved to discover is ONLY downloads via bluetooth. Having purchased a dongle it refused to connect. The bluetooth manager would flash up a code for me to use for a fraction of a second then tell me it had failed. I did some digging and s

Re: [ubuntu-uk] Reverse engineering data files

2014-12-28 Thread Paul Sladen
On Tue, 25 Nov 2014, Paul Sladen wrote: > On Mon, 24 Nov 2014, Gareth France wrote: > > Sounds good. The tricky bit is they seem to have encrypted the results > There doesn't appear to be anything encrypted. A newer '.sss' version (found packed inside a '.gar' container format) does appear to ha

Re: [ubuntu-uk] Reverse engineering data files - debug utility

2014-11-28 Thread Paul Sladen
On Fri, 28 Nov 2014, Gareth France wrote: > Doing the conversions on F3 01 90 B7 gives 4279 as expected I pushed the script I have to github: https://github.com/sladen/pat/blob/master/portableappliancetest.py This fully decodes the file and validates the checksums (producing the attached outpu

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
Being a PAT tester I know this of course. However I am using a couple of websites to do the conversions while I'm figuring this out. Doing the conversions on F3 01 90 B7 gives 4279 as expected however doing the same to F3 01 48 ?? provides 21?? rather than the + we would expect. It looks li

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Paul Sladen
On Thu, 27 Nov 2014, Gareth France wrote: > the hex seems different for each one which is strange. The results are within 1% (std dev 0.5) and this is significantly better than the +/-5% given in the specification for the Seaward PAT testing units. The PAT tester is effectively a giant multi-mete

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
I'm still not getting predictable results with this. The 42.79 works great but the 99.99 results don't co-operate. Also the hex seems different for each one which is strange. F3 01 48 79 F3 01 48 D8 F3 01 48 DB F3 01 48 D6 F3 01 48 D9 F3 01 48 C0 F3 01 48 49 F3 01 48 9C F3 01 48 C6 F3 01 48 D3

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
Now I'm with you! I have to say my programming is all rooted in basic. I am stuck at a certain point and struggling to adjust the way I view problems and their solutions. Until I started looking at this I had never even attempted to input, manipulate or output anything more than text files (csv

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Paul Sladen
On Thu, 27 Nov 2014, Gareth France wrote: > I really don't understand what you have done here. > > >>F3 01 90 B7 - 42.79 - 0x90b7 & 0x7fff => 0x10b7 => 4279 decimal > > >>F3 01 97 78 - 60.08 - 0x9778 & 0x7fff => 0x1778 => 6008 decimal The two bytes we're interested in (0x90b7) together

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
Where did th 15 come from? 0x90b7 converts to 2487 according the the webpage I am using. How do you get from 15 to 0x0001? Why does 15 also convert to 0x? 0x90b7 >> 15 => 0x0001 => FAIL 0x4879 >> 15 => 0x => PASS Where does 0x7fff come from? How do you get to 0x10b7? You are t

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
I really don't understand what you have done here. On 27/11/14 11:52, Paul Sladen wrote: The remaining fifteen lower bits converted to decimal match exactly: > >>F3 01 90 B7 - 42.79 - 0x90b7 & 0x7fff => 0x10b7 => 4279 decimal > >>F3 01 97 78 - 60.08 - 0x9778 & 0x7fff => 0x1778 => 6008 decima

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Paul Sladen
On Thu, 27 Nov 2014, Gareth France wrote: > The file we began looking at came from my old machine > ... the basic structure remains the same. > 01 looks like 0x01 is probably the number of samples that follow for that particular test type (F3 "Earth Insulation") in this case. > other one/two are

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
Correct, The format of the file appears to have evolved. The file we began looking at came from my old machine which has now been sold. When I started looking at this I did not have my new machines to hand though the basic structure remains the same. Keep in mind the result on the old machine w

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Paul Sladen
On Thu, 27 Nov 2014, Gareth France wrote: > Hex Result > F3 01 48 79 - 99.99 > F3 01 90 B7 - 42.79 - 0x90b7 & 0x7fff = 0x10b7 = 4279 decimal > F3 01 48 D8 - 99.99 > F3 01 48 DB - 99.99 > F3 01 48 DB - 99.99 > F3 01 48 D6 - 99.99 > F3 01 97 78 - 60.08 - 0x9778 & 0x7fff = 0x1778 = 60

Re: [ubuntu-uk] Reverse engineering data files

2014-11-27 Thread Gareth France
I have confirmed the earth and insulation readings are indeed F2 and F3. So far earth readings make sense but I just don't understand what is going on with the insulation: Hex Result F3 01 48 79 - 99.99 F3 01 90 B7 - 42.79 F3 01 48 D8 - 99.99 F3 01 48 DB - 99.99 F3 01 48 DB - 9

Re: [ubuntu-uk] Reverse engineering data files

2014-11-26 Thread Gareth France
Earth and insulation are two different tests. The insulation results on the Supernova measure up to 99.99 Mohms. The fact it is reading above the scale is relevant and important information. So the earth reading is 0.05 or 0.06 depending on which test you are looking at, the INSULATION is GREAT

Re: [ubuntu-uk] Reverse engineering data files

2014-11-26 Thread Paul Sladen
On Wed, 26 Nov 2014, Gareth France wrote: > > f2 80 05 f3 4e 08 f6 80 49 00 08 f8 80 00 (Washing machine) > > f2 80 06 f3 4e 08 f6 80 01 00 08 f8 80 00 (Fridge) > IDEarth Insulation LoadLeakage Continuity Descript > D7785 0.05>99.99 0.050.73(No

Re: [ubuntu-uk] Reverse engineering data files

2014-11-26 Thread Gareth France
It is a bit more complex than testing an IEC lead many times. That won't give all the results and there are a large combination of differing settings within the tester. The results you just plucked out are not correct, but they are damn close! They should be: ID Earth Insulation L

Re: [ubuntu-uk] Reverse engineering data files

2014-11-25 Thread Paul Sladen
On Tue, 25 Nov 2014, Gareth France wrote: > tell me where the numbers 0.06 and >99.99 are. f2 80 05 f3 4e 08 f6 80 49 00 08 f8 80 00 (Washing machine) f2 80 06 f3 4e 08 f6 80 01 00 08 f8 80 00 (Fridge) If you know the numbers, they are easy to find. The top bit ('0x80') is prob

Re: [ubuntu-uk] Reverse engineering data files

2014-11-25 Thread Gareth France
I do need to get a larger job to work on yes but I don't usually download this format and there isn't much work on right now. You say nothing is encrypted but tell me where the numbers 0.06 and >99.99 are. They should be attached to D7785 and D7786. I'm assuming the long string yo have highligh

Re: [ubuntu-uk] Reverse engineering data files

2014-11-25 Thread Paul Sladen
On Mon, 24 Nov 2014, Gareth France wrote: > Sounds good. The tricky bit is they seem to have encrypted the results There doesn't appear to be anything encrypted. What's there *is*, is simply short-hand, much aking to how a human would write down on paper (ticks and crosses) when doing the tests

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Gareth France
Sounds good. The tricky bit is they seem to have encrypted the results themselves. On 24/11/14 17:52, Paul Sladen wrote: On Mon, 24 Nov 2014, Gareth France wrote: www.cliftonts.co.uk/SSS the possibility of being given the design specs and signing a non-disclosure agreement. I wouldn't bother

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Paul Sladen
On Mon, 24 Nov 2014, Gareth France wrote: > www.cliftonts.co.uk/SSS > the possibility of being given the design specs and signing a > non-disclosure agreement. I wouldn't bother waiting nor risk the complications arising from signing an agreement. You're doing something for the purposes of intero

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Gareth France
I shared an example file in my initial post. www.cliftonts.co.uk/SSS However I am holding fire for the moment while I discuss with the software designers the possibility of being given the design specs and signing a non-disclosure agreement. On 24/11/14 16:20, James Tait wrote: -BEGIN P

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread James Tait
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/11/14 19:23, Gareth France wrote: > It is readable, but no more so than if you just load it into perl > using binmode. I'm currently struggling with identifying the > different fields within the data. I've been plucking them out > manually which

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Colin Law
On 24 November 2014 at 08:03, Gareth France wrote: > I was led to believe by a rep of the company who makes these that this is > not the case. He was happily discussing with my other companies who have > done the same. Can't he let you have a copy of the format specification then? Colin > > > O

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Gareth France
Libre office doesn't seem to like it. Based on Alan Lord's comments I'm going to give the company a ring and discuss it. I understand they can reveal the format to me if I sign a non-disclosure agreement. I bet that costs an arm and a leg though! On 24/11/14 08:22, Simon Greenwood wrote: On

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Simon Greenwood
On 24 November 2014 at 08:03, Gareth France wrote: > I was led to believe by a rep of the company who makes these that this is > not the case. He was happily discussing with my other companies who have > done the same. > > Something just occurred to me about the format: it's quite possible that i

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Gareth France
I was led to believe by a rep of the company who makes these that this is not the case. He was happily discussing with my other companies who have done the same. On 24/11/14 08:02, Alan Lord wrote: On 22/11/14 22:12, Gareth France wrote: So my question is this, how does one go about accessin

Re: [ubuntu-uk] Reverse engineering data files

2014-11-24 Thread Alan Lord
On 22/11/14 22:12, Gareth France wrote: So my question is this, how does one go about accessing a file like this when they do not know the format? I have worked with text based files, CSV etc but never something which does not load in a text editor. I'm sure you are already aware but just wan

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Gareth France
The time and date is whenever the test was performed. I should imagine there will be a lot of 'flags' Earth bond 25A yes, earth bond 10A no, earth bond 100ma no, insulation test yes, visual pass, etc, etc. Plus the actual figures recorded. I can download in multiple formats so I am able to cros

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Barry Drake
On 23/11/14 18:21, Gareth France wrote: Remember pass may be represented by a single letter or number (0 fail, 1 pass etc). The date was 03-JUN-14. I01022S12111 H172008021S12111 I imagine the time and date is always 'NOW', as the results are intended to be processed in real time.

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Gareth France
It is readable, but no more so than if you just load it into perl using binmode. I'm currently struggling with identifying the different fields within the data. I've been plucking them out manually which is fine for the first half then I find some of them are variable length and I have no way o

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Paul Sutton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/11/14 22:12, Gareth France wrote: > I am a PAT tester and have found over my time in the role that the > software is a total rip off! If you purchase a digital camera, > scanner, webcam or anything else that interfaces with a PC you get > the

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Gareth France
It seems that it isn't a hex file as such but mostly is a readable text file containing special characters which are not in the standard keyboard layout. With regards to figuring out the values that change there are several tests which are done and additional information needs to be stored such

Re: [ubuntu-uk] Reverse engineering data files

2014-11-23 Thread Bruno Girin
On 23 November 2014 at 00:26, Gareth France wrote: > I have already been peeking in hex editors. I have picked out 80% of the > data and been able to read it into perl (since posting this). However I > have noticed some characters which appear to act as boundries between > certain fields which ar

Re: [ubuntu-uk] Reverse engineering data files

2014-11-22 Thread Gareth France
I have already been peeking in hex editors. I have picked out 80% of the data and been able to read it into perl (since posting this). However I have noticed some characters which appear to act as boundries between certain fields which are not in the standard ascii set, so I'll have trouble eva

Re: [ubuntu-uk] Reverse engineering data files

2014-11-22 Thread Tony Pursell
Ghex will show you what is in the file in hex and ascii format. Tony On 22 November 2014 at 22:12, Gareth France wrote: > I am a PAT tester and have found over my time in the role that the > software is a total rip off! If you purchase a digital camera, scanner, > webcam or anything else that i

Re: [ubuntu-uk] Reverse engineering data files

2014-11-22 Thread Bruno Girin
On 22 November 2014 at 22:12, Gareth France wrote: > I am a PAT tester and have found over my time in the role that the > software is a total rip off! If you purchase a digital camera, scanner, > webcam or anything else that interfaces with a PC you get the software to > make it go. Spend £1,000

[ubuntu-uk] Reverse engineering data files

2014-11-22 Thread Gareth France
I am a PAT tester and have found over my time in the role that the software is a total rip off! If you purchase a digital camera, scanner, webcam or anything else that interfaces with a PC you get the software to make it go. Spend £1,000 on a PAT tester and you are then expected to pay £300 on