the other thing is that usually you would need to somehow bring your device into a "discoverable" mode.
and yes, thanks for pointing to this device, I've seen it before and wondered about if it could be used with iOS, but then forgot it again (I didn't buy one at that time :))
Best
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To post to this group, send email to btsta...@googlegroups.com.
> To unsubscribe from this group, send email to btstack-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/btstack-dev?hl=en.
>
I prefer the original .pklg format but the pdf was a good start. If you look at the service requests, you can see that the only one with a response (5-6 bytes == don't support) is the Serial Port Profile - which isn't too surprising for custom stuff.
Now, by pairing, you should have got a new serial port on your mac - or a new COM port if you're on Windows. Try opening that one and log to a file. On mac just "cat /dev/tty.NEW-SERIAL-PORT-FOR-POLAR > logfile. Let it running for a while until you've got some data in there. now, the tricky part starts: what do does bytes mean?
If you can figure that out, we can talk to it from Mac/Win/Linux/BTstack,... and please don't forget to post it publicly. :)
Good luck
Matthias
On 14.06.2011, at 13:37, Robert Lange wrote:
> Hi Matthias,
> here a new log as pklg file.
> http://mobile-parts-discount.net/formulare/polar-wearlink-bt-log.pklg
Thanks.
>
> I will try to work out how I get the serial log you want on the mac
> today.
> But I reckon its gonna be a lot easier for me to do it on my Windows
> System.
As it is SPP, you can do on any OS where you're able to record a serial data stream.
> Need to give back the Mac tonite.
> So if you need anything else based on the Mac system pls let me know
> asap :)
Nope.
>
> ps. what did you mean with "post it publicly"? isnt the link to the
> file public?
Sorry, "publicly" was redundant in that sentence. I meant that you, after you figure out what the data means, write a little text that explains how to interpret the data.
Best
Matthias
> Please check the following two files:
> http://mobile-parts-discount.net/formulare/polar.csv
> http://mobile-parts-discount.net/formulare/polar2.txt
The first one is very verbose and I don't know how to read that format. The second looks fine but uses some funny symbols.
Can your tool just dump the received data with a time stamp and as hex data (11:23:00 0x01 0x02 0x03 ...)
If that's not possible, you should be able to just save the binary data and e.g. open it with a hex viewer.
> So far I can tell the IRP_MJ_READ must be the bit we need.
> But. every second collect the HEX value is "fe".
At the end, there are some other lines with actual data in there.
Did you browse the web if someone already wondered about that data? usually it's nice linux people who figure out stuff. :)
Best
Matthias
> Quick question.
> With the details we have so far, could we connect the Wearlink with the iPhone already?
yes. you can run the rfomm-cat example to receive the data with the iPhone
Best
Matthais
On 22.06.2011, at 11:14, Robert Lange wrote:
>
> I tried to get any information of the guys behind runtastic.
> Unfortunately, the doc to the Wearlink+ seems to be under NDA and
> as we need a Jailbreak to be able to use the Wearlink+ BT with the
> iPhone they dont care
> anymore :(
Well, I seriously would have been surprised if you would have gotten any useful information. Even if those guys would be very nice, they would have to ask a lawyer, who, as it is his job, has to say "No WAY!". There's zero benefit for them to hand out information, but a very high risk of getting sued if they would do.
> I will tried to get hold of the guys from Polar directly as they
> should be very interest to get the product
> used as much as possible => more sales...
Again, please try, but I don't expect a more positive result . At least they will learn that more people are interested. Polar will also have a lawyer and they didn't put the guy from runtastic under an NDA just to provide you with information. If they wanted to have an iPhone app, they would try to join the Made for iPhone program, which they might actually do, but won't tell anybody.
> Hope you can figure out anything and may set up a tiny app to show the
> heart beat on the iPhone.
> I would like to give you a hand on it but I'm very bad in coding :(
So, now we're in the game of reverse engineering of data formats. And it looks like we will have a public exercise right away. And by the way, reverse engineering data formats only requires logic and maths skills, programming skills are not needed.
So... you have this file here, which is cluttered with useless status information.
> Please let me know what you reckon and how I can help.
> ..http://mobile-parts-discount.net/formulare/polar3.txt
Trying to clean this up, I used the grep tool:
$ grep -A 2 IRP_MJ_READ Desktop/polar3.txt | grep -v IRP | grep -v STA | grep " "
to get data like this:
08 f7 01 d1 00 06 0c .˜.—...
fe ˛
08 f7 02 d1 00 06 0c .˜.—...
fe ˛
08 f7 03 d1 00 06 0c .˜.—...
fe ˛
08 f7 04 d1 00 06 0c .˜.—...
fe ˛
08 f7 05 d1 00 06 0c .˜.—...
fe ˛
08 f7 06 d1 00 06 0c .˜.—...
fe ˛
08 f7 07 d1 00 06 0c .˜.—...
fe ˛
08 f7 08 d1 00 06 0c .˜.—...
fe ˛
0a f5 09 d1 4c 02 cf 03 34 .ı.—L.œ.4
fe ˛
08 f7 0a d1 4a 03 4b .˜.—J.K
fe ˛
0a f5 0b d1 4a 03 5c 03 0d .ı.—J.\..
fe ˛
08 f7 0c d1 4d 02 e5 .˜.—M.Â
fe ˛
0a f5 0d d1 4f 02 b5 02 aa .ı.—O.µ.™
fe ˛
0a f5 0e d1 4f 02 c3 03 29 .ı.—O.√.)
fe ˛
08 f7 0f d1 4f 03 aa .˜.—O.™
fe ˛
0a f5 00 d1 4f 03 88 03 25 .ı.—O.à.%
fe ˛
Now, we have to look carefully. Do you see any patterns?
The first byte of the longer packet is either 8 or 10.
The second byte is either 0xf7 or 0xf5. Note that 8 in the first byte always has 0xf7 in the second and vice versa.
Some random idea tells me that this is a way to detect the start of the transmission and that the second byte is the inverse for the first, or... second byte = 255 - first byte.
Then, I can see that the 3. byte looks like a counter, which only counts until 15 and then resets.
The fourth byte is always 0xd1 - no idea what it's good for.
Now, it's getting interesting. The fifth byte changes and has values in the range of 0x4a - 0x50. These are 74-90, which look like perfectly legit heart rate measurements.
After that, I have no idea what the rest of the data is. Hm.. I would expect the battery value to be in there, too. Can you check if the 0xd1 goes down over time?
Finally, we have two different packet lengths, and a single 0xfe in every second line. The 8 and the 10 as the first byte look like a packet length, and together with the 0xfe, it sums up. But I cannot explain why the 0xfe is send in-between. I bet it's an artifact of using a serial port emulation to send packets, but cannot put my finger down on the logic for this.
Anyway, that's enough for a first prototype. The algorithm would look like this: read data and try to find two bytes, where the first is 8 or 10 and the second is 255-the first. The fifth then gives the heart rate in beats/minute. I may write a quick command line test over the weekend, if nobody beats me.
Best
Matthias
Here a dump file the way you may like it :)
http://mobile-parts-discount.net/formulare/polar-dump.txt
I will use the Wearlink+ all day and see if the battery value drops
down til tomorrow.
On some websites I found the information that the Wearlink+ send the
battery value as well together with the heart rate.
May I get a second battery and drain one to about 50% so we can see
the change and will be able to figure out what the
sent value means.
/rob
On Jun 22, 1:48 pm, Matthias Ringwald <matthias.ringw...@gmail.com>
wrote:
Do you actually have a Nike+ or a Bluetooth transmitter?
Jérôme.
/rob
--
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/btstack-dev/-/d1uymz425ZQJ.
I guess you found my analysis, and I'm pretty confident that I've identified the right byte as heart rate. Aside from some new companies, most companies won't tell you anything because a) lawyers or b) nobody is responsible or c) nobody wants to accept the "risk" of publishing those formats. Sometimes it is even something else, who knows?
Anyway, the heart rate value is there, and maybe also the battery level, what else are you looking for?
Best
Matthias
thanks for the logs. What program did you use to connect to the Polar on the iPhone? Was it using the POSIX run loop or the Cocoa/CoreFoundation one?
Best
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/btstack-dev/-/Ws7MDSkA1G4J.
--
You received this message because you are subscribed to the Google Groups "btstack-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/btstack-dev/-/L7cxqLEKpzcJ.