-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support for Suunto Spartan models #232
Comments
Hi Panu, I just had a quit look into your capture files but it seems that that the protocol is completly different. I don't have a Spartan and I even don't know if they are still USB HID devices or a driver is needed. All I know for now is, that SuuntoLink seems to be build with node.js and electron, the communication goes through tcp websocket. With the "Browser WebSocket Client" addon for Firefox, you can connect to "SDSApplicationServer. exe" from a SuuntoLink subfolder. No need to start "SuuntoLink.exe", only "SDSApplicationServer. exe". Than enter the server URL: Because SuuntoLink works with the Ambit Kailash, I can also use it with my Ambit 2S. To read the battery level from my connected Ambit 2S, I send the message {"Type":"Request","Method":"GET","Uri":"suunto://29AE095103001800/Dev/Battery/Level","Body":"","RequestId":260} And I get { If you want to test it with your Spartan, replace the SN or send another message like: {"Type":"Request","Method":"GET","Uri":"suunto://SDS/ConnectedDevices","Body":"","RequestId":259} All the log files from SuuntoLink are very verbose and helpfull. Maybe you can publish these files too together with the capture files. Because Suunto use node.js and electron, maybe they plan a UI for Linux too. Not sure if "SDSApplicationServer. exe" runs under Wine or Crossover. Will test it later. Gerold |
"SDSApplicationServer. exe" is running using Wine 4.12.1 (Mint 19.1) and I am able to request data from my Ambit 2S. On the other hand, "SuuntoLink.exe" is not starting. Probably the same problem as with Moveslink: they use the Internet Explorer ActiveX. |
Hi Gerold, my trials to run SDSApplicationServer.exe ended due to too many missing libraries (14 .dll files). I just wonder, if it was worth of trying to implement a method to automatically download the watch data in Linux using this SDS executable through a websocket client, e.g. https://pypi.org/project/websocket_client/ ? I don't have too much experience, written only small Python apps earlier... Of course, first those Uris and RequestIds of the watch should be found. |
Hi Panu, why do you have missing DLL's? I never installed SuuntoLink, just downloaded the SuuntoLink installer from here: Maybe it's not needed to download any data from the watch. I have written my own GUI for Linux which uses one DLL that comes with MovesLink to sync my Ambit 2S on Linux. Of course I need WINE but never needed to analyze the USB protocol. Just used the exported functions from the DLL to sync the watch. And thats what I would to if I would have a Spartan. Use RawCap to capture the traffic on localhost and Wireshark to view the captured file. You will find the WebSocket request to sync the watch. I already synced my Ambit 2S using SuuntoLink with MovesCount and friends synced their Ambit 3 models successfully with SuuntoLink. I guess for the Spartan models, the commands are similar. Also have a look at all the different LOG files from SuuntoLink. And if you want more details in the LOG files, set the debug level to LOG_LEVEL_TRACE. This debug level also exists in Moveslink. Much more difficult to set, but was very usefull while developping my own GUI. SuuntoLink creates for the Ambit models SML files like MovesLink. Dont know if this is the case for Spartan models (if yes, could you upload such a file?) There exists a Python script to convert to GPX and a friend of me and myself have written a Windows program (runs on Linux with Wine) to convert to GPX and TCX. I'll upload it on my Google Drive account here: When I got more time, I will send the sync command via WebSocket to my Ambit 2S and see and wait what happens. Gerold |
Hi Gerold! |
Hi Panu, realy strange that you needed to install .NET 4.5 as for me it seems that all the .NET 4.5 DLL's are in the nupkg file and that even more than ones! Do you know the names of the missing DLL files? Dont know anymore with WINE 3.0. They added HID Support first in WINE 2.x (dont remember the exact version number anymore) and it worked perfectly. Than they changed something and it did not work anymore. I reported this problem several times since I found the bug in WINE 3.x (not sure about the exact version: 3.0.3 was working and 3.17 not, that's all I remember). The bug could be finally resolved in WINE 4.6. But there is another thing to take care of. See also WineHQ Bugzilla: I guess it is possible to write a Python script to sync your Spartan using WebSocket. No need to analyze the Spartan protocol. Using WebSocket, you can create eventlisteners and the SDS AS will inform you, when a watch is connected or how many % from an exercise is downloaded from the watch. In fact the behavior is exactly the same as with Moveslink. Example: Send these two commands: {"Type":"Request","Method":"POST","Uri":"suunto://SDS/EventListener","Body":{"Uri":"SDS/ConnectedDevices"},"RequestId":255} {"Type":"Request","Method":"POST","Uri":"suunto://SDS/EventListener","Body":{"Uri":"SDS/ConnectingDevices"},"RequestId":256} You will get these answers: {"RequestId":255,"Method":"POST","Type":"Response","Status": 200, "TaskId": 38, "Reason": "OK", "Content-Length": 0, "Uri": "suunto://SDS/EventListener", "Location": "SDS/EventListener/38","Body":""} {"RequestId":256,"Method":"POST","Type":"Response","Status": 200, "TaskId": 39, "Reason": "OK", "Content-Length": 0, "Uri": "suunto://SDS/EventListener", "Location": "SDS/EventListener/39","Body":""} Now connect your watch (in my case an Ambit 2S) and you will receive messages that shows you information about the connected watch. Using the DLL that comes with Moveslink, it was exactly the same just via CallBacks from the DLL. So writing an application to support Spartan on Linux should be very easy with the SDS AS running under WINE or CrossOver (I prefer). |
If you want to install older versions of wine, play on linux has all machinery in place to install different versions of wine for different applications: https://www.playonlinux.com/en/ |
Gerold,
I tried the commands, that you suggested above, in Ubuntu 18.04 & wine 3.0: <---------suuntoapp.log--------- Yes, Spartan looks like a HID device, but I cannot get wine to understand it - please have look at the attached suuntoapp.log from a win10 installation: one sync without new data in the watch. panu |
@panumaijala SuuntoLink.exe does not work correctly using Wine on Linux but it starts SDSApplicationServer.exe, just with another port 9701 as parameter and overwriting the default port 9002. I have 2 suuntoapp.log files. One created by the SuuntoLink.exe and the other from SDSApplicationServer.exe. Could you try with Wine 4.12.1? You could use PlayOnLinux. The latest CrossOver beta is also using Wine 4.12.1 Is the Spartan detected using my testprogram if have written for WineHQ? |
Hi all, Not sure if its appropriate to follow on this thread, but I am looking for support for a Suunto Spartan watch. The .fit file seems to import swim sessions I have available perfectly, other than for the lack of any GPS data (assumed from the fact that the Track tab states "No track data available". I am willing to do any testing or provide .fit files for testing. The Suunto API guide: https://apizone.suunto.com/fit-description On Linux, GPXSee opens the .fit file perfectly, showing map and route. Thanks in advance! |
Hi, I have a Suunto Spartan and I was able to connect to "SDSApplicationServer. exe" and get the connected devices. I'm trying to test the other messages in order to read the logbook and if possible change a flag to re-sync an activity from the watch to suunto app again. Can you please help me? I can't send any other messages with success. Even for the battery level. |
Are you sure sync flag manipulation is actually needed? At least for Ambit3, Suunto App does not set sync flags in watch itself nor cares about previous sync flag states. Meaning that app reads all those activities it doesn't have a record for. So all you have to do for re-syncing a deleted activity is to clear app data or re-install it, at least on Android. |
That's right @marguslt 🤦♂️ I lost a lot of time before discover that... my bad. But it was a good investigation time that I spent. I was able to find some interesting endpoints for Spartan watch. |
@vascotenner: You asked if I could open a new issue for Spartan models. Here it is.
Please find some USB capture files attached (for Wireshark). There is a README file included.
BR, panu
SuuntoSpartanSuuntoLinkCaptures.zip
The text was updated successfully, but these errors were encountered: