Is there an NFC API for the Smartwatch 3 (SWR50)
Asked Answered
S

4

4

Just to be sure and have clarification of that at first, is the NFC of the Smartwatch 3 just an embedded tag or is it a theoretically fully functioning NFC-chip?

Hoping it's not just a tag, we want to build an Android Wear app using NFC and for this the biggest question is:

  • Is there (gonna be?) a API to use the NFC chip of the SWR50?
  • If not is there any other way to activate it, or maybe might an updated version of Android Wear bring support for the chip to the smartwatch? Any help is appreciated!

Thanks, Chris


TLDR: Basically it's the same question for the new smartwatch 3 of sony: Is NFC usable for developers? Is there an NFC API for the Sony SmartWatch 2?

Soho answered 6/11, 2014 at 0:41 Comment(0)
N
2

There is a fully functional chip in the SmartWatch 3. It is today acting according to the spec linked by CM787 (here's a new one as the old one seems dead).

When Android Wear officially expands on the support for NFC, the SmartWatch 3 will be able to follow.

Nano answered 4/2, 2015 at 9:40 Comment(3)
Has the NFC API been opened/released with Android 5.0.2 for the SWR50?Buskus
Any estimates on when the NFC API would be released?Agone
With Android Pay announced yesterday, it should hopefully not be long.Bilge
S
17

I finally got my hands on one of those smart watches. This is what I found so far.

  1. Scanning the SWR50 as a tag:

    The SWR50 is identified as an NFC Forum Type 2 Tag manufactured by Broadcom. The 7-byte-UID of the watch that I tested is 2e020d00000000. Both, the fact that I could not find any dedicated Type 2 tags from Broadcom and the many zeros in the UID, make me think that this might be a tag emulated using some NFC controller.

    The tag has 122 blocks (times 4 bytes makes 488 bytes in total) containing the following data:

     0: 2e 02 0d 0c     1: 00 00 00 00
     2: 00 00 ff ff     3: e1 11 3c 0f
     4: 00 00 00 01     5: 03 78 30 35
     6: 03 31 d4 0f     7: 1f 61 6e 64
     8: 72 6f 69 64     9: 2e 63 6f 6d
    10: 3a 70 6b 67    11: 63 6f 6d 2e
    12: 67 6f 6f 67    13: 6c 65 2e 61
    14: 6e 64 72 6f    15: 69 64 2e 77
    16: 65 61 72 61    17: 62 6c 65 2e
    18: 61 70 70 fe    19: ff ff ff ff
    20: 30 a8 db f2    21: 43 1c ff ff
    22: 30 a8 db f5    23: 2a 78 ff ff
    24: 14 39 2d 4d    25: f2 6a 91 40
    26: ff ff ff ff    27: ff ff ff ff
    (remaining blocks are all filled with ff ff ff ff)
    
    • The static lock bits (block 2, bytes 2 and 3) are all set (indicates locked state).

    • Block 3 contains a capability container for a Type 2 tag (magic byte 0xE1).

    • However, the mapping version number 1.1 (0x11) does not comply to any of the current mapping version documents provided by the NFC Forum! The only mapping version number that is currently defined is 1.0.

    • Block 4 contains 3 NULL TLVs (0x00) and the first byte of a Lock Control TLV (tag 0x01).

    • The Lock Control TLV indicates that there are 48 lock bits located starting at byte position 232 (= 7 * 25 + 8). I.e. 6 bytes starting at block 58, so they are all set (0xFFFFFFFFFFFF). Each lock bit locks 3 bytes, so they indicate that blocks 16 to 51 are locked.

    • Block 6 contains the start of an NDEF Message TLV (tag 0x03, length 0x31). The NDEF message consists of a single NDEF record (Android Application Record for app com.google.android.wearable.app):

      +--------------------------------------------+
      | TNF:  EXTERNAL TYPE                        |
      | Type: urn:nfc:ext:android.com:pkg          |
      +--------------------------------------------+
      | Payload: com.google.android.wearable.app   |
      +--------------------------------------------+
      
    • Block 18 contains a Terminator TLV (tag 0xFE) indicating the last TLV block within the tag memory area.

    • Blocks 20 and 21 (first 2 bytes) contain the device Bluetooth address.

    • Blocks 22 and 23 (first 2 bytes) contain something that looks like a Bluetooth address too.

    • Blocks 24 and 25 contain the device serial number.

    • The remaining blocks are all filled with FF FF FF FF.

  2. Android NFC API access:

    Requesting an instance of the NFC adapter fails (the getDefaultAdapter() method returns null):

    NfcManager nfcMgr = (NfcManager)mContext.getSystemService(Context.NFC_SERVICE);
    NfcAdapter nfcAdapter = nfcMgr.getDefaultAdapter();  // -> null
    

    In addition there is a log message that the device does not support NFC.

    V/NFC: this device does not have NFC support
    

    Looking at the NFC system features, none of the NFC system features are available:

    PackageManager pkgMgr = mContext.getPackageManager();
    boolean featureNfc = pkgMgr.hasSystemFeature("android.hardware.nfc");     // -> false
    boolean featureHce = pkgMgr.hasSystemFeature("android.hardware.nfc.hce"); // -> false
    

    Both featureNfc and featureHce are false, so neither android.hardware.nfc nor android.hardware.nfc.hce are available.

    So there is currently no NFC API available on the SWR50.

  3. Firmware analysis:

    • There is a file named BCM43341B0_002.001.014.0122.0174.hcd under /system/vendor/firmware/, so it seems that the watch actually does contain Broadcom's BCM43341 quad-radio chip which also contains an NFC controller.
    • /proc/misc lists bcm2079x, so it seems that the bcm2079x driver was compiled into the kernel.
    • There is no NFC service app (Nfc*.apk) on the /system partition.

    So there might be support for NFC from the hardware side and the kernel side, but the user-space part of the NFC stack is missing. Though the kernel driver might just as well point to nowhere. And the firmware of the BCM43341 might be coded in a way that the NFC controller simply emulates the Type 2 tag while being inaccessible from the operating system.

Sofar answered 15/12, 2014 at 11:34 Comment(4)
Thank you for your in-depth analysis of the watch! It answers most of my questions and complies with what I've found about the issue myself. I just accepted the other answer because it's from Sony officially and gives a definite statement. Your answer is a lot more detailed and that's very appreciated!Soho
@Soho You may want to check our blog at usmile.at/blog. I'll post my further findings there. So far I can confirm Sony's official answer, I was already able to detect tags and to perform HCE with the watch.Sofar
Do you know if NFC is now supported with the latest update to Android Wear? PS WiFi should now be working. It was similarly unavailable when SWR50 was first releasedBuskus
Can confirm that NFC isnt supported. I still get this message: "V/NFC﹕ this device does not have NFC support".Agone
N
2

There is a fully functional chip in the SmartWatch 3. It is today acting according to the spec linked by CM787 (here's a new one as the old one seems dead).

When Android Wear officially expands on the support for NFC, the SmartWatch 3 will be able to follow.

Nano answered 4/2, 2015 at 9:40 Comment(3)
Has the NFC API been opened/released with Android 5.0.2 for the SWR50?Buskus
Any estimates on when the NFC API would be released?Agone
With Android Pay announced yesterday, it should hopefully not be long.Bilge
M
1

Nope. It says the NFC is for powering on or pairing on the spec sheet. Doesn't look like 3rd party developers are going to get a crack at it this time around.

Miniaturize answered 6/11, 2014 at 0:54 Comment(4)
Could you provide a link to this spec sheet?Sofar
Here's the Spec Sheet Thanks for your help! I can't believe they won't open it up for developers. Maybe there's further news beyond the spec sheet from official side?Soho
@Soho There's not a lot you can do with NDEF that can't be done with Bluetooth. The fact that NFC can only carry a small payload is also a limiting factor. What exactly are you trying to do? (side note, don't forget to close the question if it's answered).Miniaturize
The neat thing about NFC is that it's passive and it's cheap and easy to place everywhere you can think of. Therefore it's well suited to track that the user is at a certain spot once a specific (pre-known) tag is read. This is kind of the scenario I'm thinking of, where BT is not the perfect technology to use imho. Of course I'll close the question once it's answered, but I'd like to get some official feedback from Sony on what kind of NFC we're talking about (tag or functioning chip?) and if there's any chance to ever get it up and running?Soho
P
0

The smartwatch supports NFC, based on the specs here http://www.smartwatchspecifications.com/Device/smartwatch-3-swr50/, yet there is no NFC API available as of now, hopefully there will be one, I'm also looking for this functionality, planning to develop apps with this feature

Punchboard answered 18/9, 2016 at 1:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.