Recent

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

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Purchase of service: Read and save data from piko measuring cart.
« on: September 27, 2020, 04:40:45 am »
To those of you reading this, I posted in another thread but that thread went in a different direction, so I try in my own thread.

I am in need of someone who can write together a program described below.
I am in Sweden and am NOT a company, but am willing to pay for the job (within reasonable levels that both can live with)

What do you consider to be the minimum amount for a small job that has the following parts: WiFi, reads data and saves to CSV file?
Please specify which version of my idea (1 to 3) you can build and what it will cost.

--- More info ---------------------------------------------
Some time ago I went and bought PIKO's measuring cart which in itself is a nice cart but the software for Windows has some bugs that PIKO has not done anything about, to get rid of the errors.
The main problem with PIKO's software is that the radius of the curves is not saved in the CVS file.
Values for the radius of the curves are displayed live in the program, so I know that the cart transmits the measure value and that the program receives the data, but the CVS save function does not include the real measurement values for the radius of the curves, but it will only be 0 at that position in the CVS file.
PIKO's measuring cart homepage: https://www.piko-shop.de/?a=mw

This is a model railway wagon in scale HO (1:87).
What is measured is:
* DCC data
* DCC Volts
* Track inclined width - right/left (dosed curve)
* Track inclined length - up/down (hill)
* Track Radius
* Mileage
* Speed

 --*---

This is what I want the program to do:
1 - Basic function:
* Connects to the measuring cart's WiFi AP
* Reads streamed data from the measuring cart.
* Saves the received raw data as a CSV file locally on the computer/drive.
* Target OS Windows, MaC & Linux
* Open source and publicly downloadable.

2 - Luxury version 1:
* The received data is decoded to human readable values before being saved in the CSV file.
* The program has a GUI that presents received data live in some neat way.

3 - Giant luxury version:
* All measured data is saved as CSV and STEP/STL (3D) file.
* GUI has a 3D window where measuring data is presented as 3D graphics.
* A function to be able to virtually "ride around" on the virtual model railway that collected data has created.


Some row data from Wireshark:
http://lgrfbs.org/SEF/MW20190216.zip (140 Mbyte)
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #1 on: September 27, 2020, 10:55:53 am »
Looks fun, but I suggest that the place to start is asking them if they'll share their source with you, and if they decline a very careful examination of the binary to see if in actual fact it includes anything which is GPLed: they have download links for .pfw files and from elsewhere "The pfw file is basically a filesystem for an embedded linux system. It is in the ext3 format, and can be mounted on linux."

Does the wagon really contain a WiFi access point? Decoding that data looks non-trivial, and you'd be far better finding a community of people with the same interest to attack it.

MarkMLl





https://pacemakerdevice.org/forum/viewtopic.php?t=165
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #2 on: September 27, 2020, 05:59:11 pm »
PIKO does not normally respond to technical suggestions or complaints, I have informed them that there is errors in the Windows program.
They have simply considered (my guess) it is NOT worth answering me regarding questions like if there is an API or what license the software is under and this has been going on type since I bought the cart.

Presumably PIKO has purchased the service "create windows programs for us" and that the contract on this service has ended and PIKO does not have or owns the program code themselves.
Have researched a bit and the Windows program is written in Visual Basic.

"Does the wagon really contain a WiFi access point?"
Yes, it does - a small one with a maximum of 4 connections and it can even connect to your local router and thus support more clients as I understood it.
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #3 on: September 27, 2020, 06:11:28 pm »
It doesn't look particularly difficult to duplicate. You'd need something like an ESP32 board, an OLED display, and a small handful of sensors (voltage, accelerometer, optical sensor looking at a reflective patch on a wheel to count chains and furlongs or whatever your equivalent is :-)

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #4 on: September 28, 2020, 07:46:09 am »
You are absolutely right, with a little time you can build your own measuring trolley that has the same or better specifications than the PIKO wagon.

Now it is that I'm not very interested in building my own measuring cart right now, the problem with PIKO's Windows program is that once you save your run , so it will be only zeros for curve radius and when you load the CSV file, the diagram for the radius of the curves is just a straight line which means that the railway track never turns in any direction.
So I have some choices:
A; I find someone who is awesome at editing windows EXE files and just goes into the file and fixes what's wrong with PIKOS's program.
B; I get someone to build me a new listening program that fits the measuring cart.
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)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1014
  • Former Delphi 1-7, 10.2 User
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #5 on: September 28, 2020, 08:08:46 am »
I doubt hex editing the executable will work. I see there is an Android version which will no doubt reveal the source though...
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #6 on: September 30, 2020, 07:08:41 pm »
Really interesting trev, how do you get the source code out of Android software then?

MarkMLl, I've looked at the link you added to your post, but don't understand what to get out of it.

I appreciate any suggestions, I'd rather just get the PIKO software to work or fix a replacement that does almost the same job.

If we look at Option 1, what would it cost me?

The reason I didn't put any price idea in the first post of this thread is because I didn't want to offend anyone with that way level too low.

Another option is that I keep my money and install a VM and run decompulerning on the exe file and get out visual basic code.
Fixes the error and compiles a new exe file.
Have absolutely no idea if it will work as well in reality as it looks on Youtube.

Another option is that I sit down and write the program myself with the forum / internet as support, but then we are there again with having time for it too.
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #7 on: September 30, 2020, 07:24:42 pm »
Really interesting trev, how do you get the source code out of Android software then?

MarkMLl, I've looked at the link you added to your post, but don't understand what to get out of it.

I appreciate any suggestions, I'd rather just get the PIKO software to work or fix a replacement that does almost the same job.

If I understand that link correctly, you'll get a decompressed Linux filesystem that you can mount and inspect. There's a reasonable- not overwhelming but reasonable- chance that the authors have written that end in something like Python, which you will be able to inspect. Or alternatively, that you will be able to prove that they're abusing the GPL, in which case particularly if you could get a few more users together you could probably put pressure on them to make source available.

Attacking that end will probably be mechanical, i.e. as described in that link, and as such rather easier than decompiling VB.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #8 on: October 01, 2020, 09:56:01 am »
Thus these pfw files are for updating software in the wagon, so then should IF I read and understood correctly there is a small Linux computer or resembled in the wagon?!
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #9 on: October 01, 2020, 10:15:38 am »
Thus these pfw files are for updating software in the wagon, so then should IF I read and understood correctly there is a small Linux computer or resembled in the wagon?!

Probably, or at least- if that link describing the format is relevant and correct- something that uses a unix-style filesystem to load the processor. And that might expose useful information.

Now I'm not saying it's a sure-fire solution, but it's worth investigating before you wade into trying a decompilation... if nothing else so that you can finger the manufacturer for abusing the GPL.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #10 on: October 01, 2020, 10:48:29 am »
The manufacturer PIKO have not written that the license for the program is GPL
https://www.piko-shop.de/index.php?vw_type=5&vw_id=94&vw_name=detail
Quote from: Text from PIKO

** Licensing agreement for the usage of PIKO software
This licensing agreement is a legally binding agreement between you and the PIKO Spielwaren GmbH.
 It concerns software, that can be downloaded from this website.
 By downloading or using this software, you agree to these licensing terms. If you do not agree to these licensing terms, you do not have any rights to the software and you have to immediately delete any parts of the software you have already downloaded

1. Licensing The PIKO Spielwaren GmbH grants you the non-transferable, limited and non-exclusive right to use the software only for your personal purposes. You are not allowed to load the software on a RAM unit, on a hard drive, or install it on any other data carrier of a computer, a hardware product or a mobile device. By using the software, you do not gain any ownership rights, copyrights or any other rights of the software. The content of the software is licensed and not sold.
 
 2. Illegal usage
 Neither you nor any third party directed by you may license, copy, reproduce, transfer, lend, sell, lease or distribute the software to third parties or commercially offer it on a pay-for-play basis for a fee or any kind of payment.

 3. Copyright
 You acknowledge that all copyrights of the software are reserved by and remain at the PIKO Spielwaren GmbH. You will not interfere with or diminish these rights, neither through action or omission. You can be held responsible for any violation of copyright by the PIKO Spielwaren GmbH.

 4. No guaranties
 The PIKO Spielwaren GmbH offers the software “as seen” and excludes any guaranties, as long as it is legal. Especially, we exclude any guaranties for the quality of the content or its purpose of utilisation. The PIKO Spielwaren GmbH does not guaranty that the software works without interruptions, errors or viruses nor that it meets your special requirements. It is possible that rights differ, depending on the legislation.
 
5. Disclaimer
 The PIKO Spielwaren GmbH is not liable to prosecution for any damages that can directly or indirectly be associated with the software or parts any part of it. The PIKO Spielwaren GmbH can only be made responsible in cases, where it cannot be excluded by law. Under no circumstances it is possible to make the PIKO Spielwaren GmbH reliable for damages to business, data, profits, assets or for any other kinds of indirect economic damages.
 
 6. General information
 You are not allowed to pass on any rights you have been granted with this license to third parties.
 The PIKO Spielwaren GmbH is not obligated to offer you any warranty, technical support or upgrades for the software.
 
 You agree to comply to all applicable import and export regulations and that you are solely responsible to obtain all necessary licenses for the export, re-export, transfer or import of the content.
 In the case, that this licensing agreement or parts of this agreement turn out to be illegal or unenforceable, all other parts of the agreement remain untouched and legally binding.
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #11 on: October 01, 2020, 11:08:51 am »
Exactly, and there was really no need to C&P that boilerplate since I (and anybody else relevant here) have already read it. But if they've used GPL-licensed components in their software you can lean on them.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #12 on: October 13, 2020, 06:29:47 pm »
Sorry I copied the entire license from PIKO's website, the idea was just to archive what it looked like just when we discussed this.

Have run Wireshark against the cart today and it runs UDP on port 55555, I have recorded screen when I did the test, the movie was 1:07 hour long, so if anyone wants to watch please let me know from you so I post it on my web server.

MarkMLl, I have a LinuxMint box, how should I do to mount PFW files, as you suggested.
Namely, can not find anything online (bad keywords maybe?) that describes the approach.
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: 1373
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #13 on: October 13, 2020, 06:38:43 pm »
I gave you a link in #1 in this thread. Work through it as far as you can, then start asking questions... or ask questions if what you see appears to differ grossly from what's being discussed there.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

lgrfbs

  • Jr. Member
  • **
  • Posts: 58
    • My CV page (On Swedish only)
Re: Purchase of service: Read and save data from piko measuring cart.
« Reply #14 on: October 16, 2020, 08:53:50 am »
Problem the commando:
unzip -d ./extracted_dfw_1412 dfw_14142.pfw

do nothing at all, I thinking this file is not a Pacemaker firmware file.
Screencast:
http://hobbywebb.se/Q/Kazam_screencast_00000.mp4 (download)
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