Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGPS Download #5

Open
mru00 opened this issue Dec 6, 2014 · 5 comments
Open

AGPS Download #5

mru00 opened this issue Dec 6, 2014 · 5 comments

Comments

@mru00
Copy link
Owner

mru00 commented Dec 6, 2014

Download EPO file from http://epodownload.mediatek.com/EPO.DAT to the watch
Download MTK7d.EPO from krippl ftp server.

http://www.gtop-tech.com/en/software/Software_Services_07.html

http://sourceforge.net/p/bt747/feature-requests/17/

http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides

https://docs.google.com/file/d/0ByI4WbhJsiyqZjVjNTczNWEtZjczYi00YjY4LTlmMTgtNGIxZDcxZmFhMjEw/edit?hl=en&pli=1

ftp://ftp.leadtek.com.tw/gps/9023/G-monitor%203.26/User%20Manual/EPO%20Format%20and%20Protocol/LEADTEK%20EPO%20Format%20and%20Protocol%20Reference%20Manual%20V1.0.pdf

http://www.bt747.org/article/agps-servers

@mru00
Copy link
Owner Author

mru00 commented Dec 12, 2014

First step implemented, in testing. MTK7d.EPO must be downloaded manually. The program now accepts a --epo option to specify the EPO file.

@Pierke
Copy link
Contributor

Pierke commented Feb 13, 2015

With respect to the EPO data and the strange block of data that ends the transfer;
I have 2 bytes different from MRU00's block.
But the 2 EPO download logs I have made so far only have 1 byte difference between them.

MRU00's block:
// some unknown data...
*it++ = 0x2C; *it++ = 0x01; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x00; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x0D; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0xF3; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x00; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0xB0; *it++ = 0xEE; *it++ = 0x2E; *it++ = 0x02; // in my block 0xE2 = 0x35 respectively 0x36.
*it++ = 0xDC; *it++ = 0xAE; *it++ = 0x57; *it++ = 0x00; // in my block 0xDC = 0x74
*it++ = 0x00; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x01; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x00; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;
*it++ = 0x00; *it++ = 0x00; *it++ = 0x00; *it++ = 0x00;

I have the Conrad Multi NAV-3 with firmware 1.20.22_DLES0_00

@Happyfeet01
Copy link

Happyfeet01 commented Aug 27, 2017

which files must i use for updasting the AGPS Data from the watch? the Files from mediathek.com dont work
have this error

lars@Homebase-Linux ~/crane_gps_watch $ sudo crane_gps_watch_client --epo --verbose '/home/lars/Downloads/EPO(2).DAT' Autodetecting serial ports Opening serial port '/dev/ttyUSB0' Connected to watch on '/dev/ttyUSB0' watch begin p=Laufen l=German version='Ver1.20' firmware='1.20.26_RUNT0_00' timezone=28=0x1c profiles: Laufen Radfahren Wandern Segeln Benutzer 0 workouts read from watch downloading EPO data error: Failed to open EPO file Terminating

@ajfclark
Copy link
Contributor

ajfclark commented Sep 14, 2020

The original source I had for the MTK7dEPO file has ceased updating.

Using https://github.com/StevenMaude/armstrong I could get a file, but the byte count is wrong.

https://github.com/scrapper/postrunner/blob/93b5fc82a4d8ef9c6587abdd43b2e91ea829cfda/lib/postrunner/EPO_Downloader.rb has the format here: http://www.vis-plus.ee/pdf/SIM28_SIM68R_SIM68V_EPO-II_Protocol_V1.00.pdf

Which looks the same with 72 bytes per record instead of 60. Dumping them out, the last 12 bytes in each record look different to the old files, so I wrote a python script to chop those off:

#!/usr/bin/python3
import struct

inFile = open("EPO.BIN", "rb")
outFile = open("EPO-fixed.BIN", "wb")
for eposet in range(7*4):
	for sat in range(32):
		for byte in range(60):
			inData = struct.unpack("B", inFile.read(1))[0]
			outFile.write(struct.pack("B", inData))
		for byte in range(12):
			inData = struct.unpack("B", inFile.read(1))[0]
inFile.close()
outFile.close()

I think that's correct as a hex dump then looks like the old files.

@ajfclark
Copy link
Contributor

I cleaned up my script and made it update with a timestamp, etc. f8cef28

ajfclark@f8cef28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants