Recent

Author Topic: Purchase of service: Read and save data from piko measuring cart.  (Read 8613 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2791
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #15 on: October 16, 2020, 09:34:14 am »
unzip -d ./extracted_dfw_1412 dfw_14142.pfw

No, the file you download is a zip file, it contains the pwf file.

The file command says the pwf file is data, strings command shows nothing recognizable.  I'd suggest its encrypted or encoded some other way and requires some specific application to make use of it.

I would line up with Mark, it would be easier to build a new system using the existing rolling stock than to reverse engineer. While agree its possible it contains GPL software, you cannot establish that with out breaking terms of the (possibly but only possibly invalid) license.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #16 on: October 16, 2020, 09:49:11 am »

$ mkdir MesswagenComplete_v1_06_00
$ cd $_
$ unzip ../MesswagenComplete_v1_06_00.zip
Archive:  ../MesswagenComplete_v1_06_00.zip
  inflating: MesswagenComplete_v1_06_00.pfw 
$ ls
MesswagenComplete_v1_06_00.pfw
$ file *
MesswagenComplete_v1_06_00.pfw: data


Right, so the .pfw file is data. but the instructions you are being given clearly say

"If it is zipped, simply..." and it's not zipped.

However at that point the filesize is not what that site suggests it should be, and it doesn't mount as an ext3. xxd shows that it starts


00000000: c6c4 83c9 79eb 9944 2ea3 212c 7736 679c  ....y..D..!,w6g.
00000010: 72dd b90a 6dac 5050 0884 2ad0 6f3f 29ec  r...m.PP..*.o?).
...


which doesn't match the description of cramsfs at https://www.kernel.org/doc/Documentation/filesystems/cramfs.txt but it could still possibly be some variant... or been obfuscated to make this kind of inspection difficult.

I'm afraid that that's as far as I'm prepared to go. I still feel it might be worth your while poking at that firmware image a bit more, but otherwise you're very much on your own (form the POV of this forum) if you start trying to unpick a compiled VB or whatever program to run on the host PC.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #17 on: October 16, 2020, 09:54:30 am »
I would line up with Mark, it would be easier to build a new system using the existing rolling stock than to reverse engineer. While agree its possible it contains GPL software, you cannot establish that with out breaking terms of the (possibly but only possibly invalid) license.

There's a single block of ffff in that image which suggests it's not compressed/encrypted, and the location of that relative to the end of the image is interesting. Don't think OP's told us what kind of chip it is... the bottom doesn't look like jump vectors but the loader might not be putting it at 0x0000, which complicates the usual "the bottom of Flash contains a recognisable jump opcode so the chip is a xxxx" trick.

I think that's about as much as can be done.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

lgrfbs

  • Jr. Member
  • **
  • Posts: 68
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #18 on: October 16, 2020, 11:09:45 am »
CPU1: Atmel XM32E5-U 1714B  PH A93QQA - This is on the LCD board
CPU2: XMEGA 32A4U MH1710 KOREA-AB 35965E A88P8A  - Main PCB, This is on the key and USB board
FLASH1: adaslot1711 45DB641E SHN

Sure, I could build and program my own measuring trolley, but now I want to get to this so that other model railway hobby practitioners can also get much more out of this wagon as it is already on the market.
I have got the feeling that PIKO is done with this product and will not update or correct the program to Windows and let alone give Mac/Linux users a program for this cart.

How hard would it be to write a program that listens to the raw data from the cart?
What I need to tell the program is the IP number that the cart has for the rest is known from WireShark:
UDP on port 55555.

I am deeply grateful for all the answers I have received so far, THANK YOU.

All photos:
http://hobbywebb.se/Q/PIKO_MW.zip (142Mb) 

//edit:
//fixed images link.
« Last Edit: October 25, 2020, 03:16:42 pm by lgrfbs »
OS : Win 10 64bit Home * Win 7 64bit Professional
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64
Delphi 7.0 (Build 4.453)

lgrfbs

  • Jr. Member
  • **
  • Posts: 68
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #19 on: October 16, 2020, 11:31:13 am »
Don't think OP's told us what kind of chip it is...
I couldn't tell you before which CPU was used in the cart.
Because the wagon was not opened until today to read the text on the circuit parts and take some photos.
OS : Win 10 64bit Home * Win 7 64bit Professional
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64
Delphi 7.0 (Build 4.453)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #20 on: October 16, 2020, 11:50:48 am »
CPU2: XMEGA 32A4U MH1710 KOREA-AB 35965E A88P8A  - Main PCB, This is on the key and USB board

OK, that's new info. I'm not going back to check, but I suspect that the link I gave you that discusses decoding the file is for a different target in which case it's clearly not relevant. An ATMEGA disassembler might make some sense of that binary, but the important thing is that it's not something simple like a Python script which is immediately readable.

Quote
Sure, I could build and program my own measuring trolley, but now I want to get to this so that other model railway hobby practitioners can also get much more out of this wagon as it is already on the market.

Which is likely to mean new electronics as a drop-in replacement.

Quote
How hard would it be to write a program that listens to the raw data from the cart?
What I need to tell the program is the IP number that the cart has for the rest is known from WireShark:
UDP on port 55555.

Well, you've got the Wireshark captures. My own recollection from looking at them in the past is not very easy... at the very least I think you're going to need to make a "rolling road" arrangement so that you can move the wagon at a simulated controlled speed, simulate different cambers and so on.

Seriously. Your best bet is going to be to look at how that wagon is put together, and work out whether you could both make a drop-in replacement for existing wagons and apply the same thing to a new design... providing that you use cleanroom code you're probably legally OK. Oh, and for this you probably want to use TCP, unless you're pretty confident that your code is handshaking at a higher level.

Railways have used dynamometer cars since the C19th, and I'd remind you of Babbage's story of helping out when the only way to check the track was to release a wagon and time how long it took to stop (in his case, he arrived at the next station after jury-rigging a sail). There's almost certainly a niche market for somebody who can convert a wagon in a customer's chosen livery into an effective dynamometer, and being in control of the physical side of that would probably be adequate to protect against flagrant reuse of any code you choose to open-source.

Go for it man, and remember that if you don't there's multiple people in here that might see a viable opportunity... and many more reading courtesy of Google.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

lgrfbs

  • Jr. Member
  • **
  • Posts: 68
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #21 on: October 16, 2020, 12:23:19 pm »
The term "cleanroom code" I have not heard before, guess that means I have written everything myself and not looked at anyone else's code.
In the same way as React OS has done.

Babbage's story was new information for me as a Swede, thanks for it was interesting.

Quote from: MarkMLl
"Go for it man, and remember that if you don't there's multiple people in here that might see a viable opportunity... and many more reading courtesy of Google."
So it may be but NO ONE has given me any price proposal at all on what was the start of this thread.
OS : Win 10 64bit Home * Win 7 64bit Professional
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64
Delphi 7.0 (Build 4.453)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6682
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #22 on: October 16, 2020, 12:37:51 pm »
The term "cleanroom code" I have not heard before, guess that means I have written everything myself and not looked at anyone else's code.
In the same way as React OS has done.

In the most rigorous case, there's one team who develops a specification from a program, which possibly includes disassembling it, and a completely distinct team who develops a replacement which is functionally identical. My understanding is that European law allows disassembly in order to develop something which is functionally equivalent, but the ReactOS- and for that matter FPC- approach that people intimately familiar with the Windows/Delphi codebase should not contribute to the open-source one is preferable.

Quote
Babbage's story was new information for me as a Swede, thanks for it was interesting.

He was an interesting man. More interesting, I'm afraid, than Per Georg Scheutz :-)

Quote
So it may be but NO ONE has given me any price proposal at all on what was the start of this thread.

Well, you must admit that the information has dribbled out fairly slowly, and I'm afraid that most of us- for the moment at least- have our own interests and demands on our time.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dbannon

  • Hero Member
  • *****
  • Posts: 2791
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #23 on: October 17, 2020, 06:56:06 am »
.....
So it may be but NO ONE has given me any price proposal at all on what was the start of this thread.

Honestly, I don't think its a commercial prospect. Someone may do it because its fun, they enjoy the challenge or really want the outcome. But if someone was to agree to work at an hourly rate and just do it for the money, you might be looking at 100 hours to make a start, perhaps get to the point where you can tell if its viable or not. What would you accept as an hourly rate ?

A much better approach would be for you to keep working on that wireshark data, if you can find some sort of API, then getting someone to write some code that uses the API would be heaps more practical. Put that research up on (eg) github and see who is also interested.

The data coming from the thing will probably be in some common format, maybe xml, json etc. If you can spot the deliminator, maybe you can start breaking each lump of data down. You may be able to label each field one by one.  very slow process !

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #24 on: October 17, 2020, 07:16:39 am »
So it may be but NO ONE has given me any price proposal at all on what was the start of this thread.

Without access to the hardware, it's not going to be something someone knocks up in a week. If you're not wanting to do it, it would be best to tap into the community of users of the hardware and see if anyone else wants to (a) help (b) fund it.

lgrfbs

  • Jr. Member
  • **
  • Posts: 68
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #25 on: October 17, 2020, 08:12:18 am »
Thanks for an honest estimate of the time, when I'm not a professional programmer so I don't know what a reasonable hourly/total cost of the "1- Basic function" program would be.

Thank you for helping me to see that the only economic thing is that I myself dive into the internet's waves to find code segments so that I can write the "1 - Basic function" program.

A few of the reasons I added the thread on this forum were that I like Lazarus as well as that I know there are model railers here too.
Thought it was a double win type.

I know the first post may feel poor on information, but that's what I knew then and when this thread took some momentum I "had to" look for that information, so you (the reader) and I have learned more about this cart.

So I withdraw my offer to pay someone to create a program for me.
OS : Win 10 64bit Home * Win 7 64bit Professional
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64
Delphi 7.0 (Build 4.453)

 

TinyPortal © 2005-2018