ErgData: scan NFC tag instead of (new) PM5?

Topics relating to online racing and training with 3rd party software.
a669
Paddler
Posts: 3
Joined: October 27th, 2021, 2:12 am

Re: ErgData: scan NFC tag instead of (new) PM5?

Post by a669 » October 27th, 2021, 6:04 pm

wivku wrote:
October 27th, 2021, 8:45 am
According to the instructions the app should show the "N))" in the lower right, but on my (iPhone) that is no longer the case so testing will be difficult.
I just found an iPhone 7 with iOS14 lying around...
  • ErgData (V1.4.4) installed just a few minutes ago did have the N)) button and using it did switch on and connect the PM5.
  • Using the NFC reader built into Control Center (instead of ErgData's NFC reader) sadly took me to the Concept 2 website (that's what record 3 is for I suppose.)
  • Using the app "NFC Tools" for iOS showed me identical three records that NFC Tools for Android did (including record 2 -- instructions for opening ErgData on Android) which presumptuous me thinks is a pretty good indication that the NFC in the PM5 is not used for communication but simply a tag that says "Hey, I"m a PM5 and my Serial Number is XXX" like you hoped.
Hopefully only record 1 is required to connect, but you'd need that N)) in ErgData (though a quick search does suggest that some iOS devices will do Background Tag Reading similar to my Android 12 Pixel 3a.)

wivku
Paddler
Posts: 21
Joined: December 19th, 2014, 12:03 pm

Re: ErgData: scan NFC tag instead of (new) PM5?

Post by wivku » October 31st, 2021, 11:59 am

Excellent, thanks for the follow up.
Good to hear the N)) icon shows on your device. Not sure why it does not on mine (iPhone 12). Yes, it does background NFC scanning but don't think that matters for the app functionality.

BTW. turns out the NFC details are also in the SDK documentation (page 33):
https://www.concept2.co.uk/files/pdf/us ... nition.pdf
Near Field Communication NDEF Records
The PM5 unit configures itself as a Near Field Communication Tag A. The tag consists of two records.
The first record is an External record type used for pairing the mobile device with the PM5. The information in this
record is sufficient for establishing a BLE connection between the mobile device and the PM5. The record format is
as follows.

BLE Pairing Record Identifier String: concept2.com:bleconnectinfo
PM5 BLE address (6 bytes): e.g. 0x54 0x96 0xA2 0x56 0x10 0xF0 (will vary from unit to unit)
PM5 BLE Address Type (1 byte): 0x01
PM5 Advertising Name (up to 31 bytes): PM5 430343693 (will vary from unit to unit)

The second record is an Android Application Record (AAR) containing the following string. The record is used to
launch the Ergdata application on an Android platform. The data in this record does not change.

BLE Launch App Identifier String: android.com:pkg
Android Package to Launch: com.concept2.ergdata
So, in line with what @a669 wrote. In short: the PM5 name is sent and the "PM5 BLE address".
Not sure where to get that 6 byte PM5 BLE address for my PM5.
Table 3 in the documentation (page 10) shows what data is available. Don't see a 6 byte value there.
Also tried scanning the PM5 with the Lightblue app.

a669
Paddler
Posts: 3
Joined: October 27th, 2021, 2:12 am

Re: ErgData: scan NFC tag instead of (new) PM5?

Post by a669 » October 31st, 2021, 11:20 pm

wivku wrote:
October 31st, 2021, 11:59 am
Not sure where to get that 6 byte PM5 BLE address for my PM5.
Good find on the documentation.
Looks like those six bytes are the PM5's Bluetooth MAC address in reverse byte order, so the address in the documentation is F0:10:56:A2:96:54.
I couldn't find the MAC address in any PM5 menu so I had to use a BLE Scanner app. The scanner identifies it as "PM5 431XXXXXX Row", so the "Row" in my example is part of its identifier.

The reason I mentioned background NFC scanning is that ErgData on my Android does not have the N)) button; perhaps that button only appears on devices that require user interaction (like the iPhone 7 I used).

It would be interesting to hear from other iPhone 12 users how they connect to an NFC capable PM5.

wivku
Paddler
Posts: 21
Joined: December 19th, 2014, 12:03 pm

Re: ErgData: scan NFC tag instead of (new) PM5?

Post by wivku » November 2nd, 2021, 11:26 am

I asked Concept2 support about the missing N)) icon in the Ergdata app:
We determined reinitializing this feature will require an update to the app. I cannot provide a date when we will release a new copy [...]
So, not much else I can do for now. But the main question is answered. Conclusion so far seems to be: the NFC tag inside the PM5 "simply" contains static data so the reader (Phone+Ergdata) knows what device to connect with. The data on the tag consists of the PM5's serial number and bluetooth MAC address. Both are retrievable with a bluetooth scanner. That data can then be written to any NFC tag (e.g. NTAG213 - Type A, Mifare Ultralight) using e.g. NFC Tools.

Of course all of this is of limited use when the PM5 is not always actively listening for devices trying to connect.

Thanks again to @a669 for the useful example.
(I've sent you a DM using this forum, but it seems the message is stuck in the outbox?)

Post Reply