• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

[Testing] NFC for Halium 9 ports

Scheduled Pinned Locked Moved Porting
25 Posts 7 Posters 5.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fredldotme
      last edited by fredldotme 4 Mar 2021, 12:16 25 Sept 2020, 07:03

      EDIT April 3rd 2021: NFC support is now in the devel channel and will be released with OTA-17
      Please use this thread as a place to exchange ideas regarding our NFC implementation.

      Original post:

      Hey! I have something new to play around with for people on Halium 9 builds of Ubuntu Touch: you can now test your device for NFC functionality!
      The only prerequisite is that your device needs to be on the devel-based rootfs, not the edge one.

      To install:

      sudo ubports-qa install xenial_-_android9_-_nfcd
      sudo mount -o remount,rw /
      sudo apt install nfcd nfcd-tools nfcd-binder-plugin nfcd-repowerd-plugin
      

      To get console output from nfcd:

      sudo stop nfcd
      sudo /usr/sbin/nfcd -p /usr/lib/nfcd/plugins -v
      

      App developers can try the QtNFC integration module to develop apps based on this technology. This requires the following change to be made to the rootfs before it can be used by (currently only unconfined) apps:

      sudo mount -o remount,rw /
      sudo apt install qml-module-qtnfc
      

      The API documentation is located here: https://doc-snapshots.qt.io/qt5-5.9/qtnfc-qmlmodule.html

      Please use this thread to share your experience with NFC enablement and even ask for help.

      1 Reply Last reply Reply Quote 6
      • M Offline
        mateo_salta
        last edited by 10 Mar 2021, 08:02

        Hi, Ive been experimenting with this test.

        I made a experimental test click https://drive.google.com/file/d/1xowIZQAyynsnLAjtzGX7Wxsa1iNkNeTb/view?usp=sharing

        It seems that it does not read my tag, or tries to read it in terminal. I will have to try more tags. This one is a small nxp mifare classic 1k "ISO 14443-3a" I have written a url on it with another phone.

        non-verbose, shows terminal "target is gone" - perhaps is a unsupported tag? verbose:
        http://paste.ubuntu.com/p/qr9tKvwDd8/

        Writing fails with this error(ignore the top, i misspelled the binary at first ;P): http://paste.ubuntu.com/p/QW47SKyJS9/

        "QNearFieldTarget::WriteNdefMessages() disabled. See QTBUG-43802"

        Very interesting testing, i will need to try more tags.

        F 1 Reply Last reply 10 Mar 2021, 21:16 Reply Quote 0
        • F Offline
          fredldotme @mateo_salta
          last edited by 10 Mar 2021, 21:16

          @mateo_salta Yes, this seems to be a non-NFC-Forum compliant tag at first sight. Nice to see you playing around with it though! It should be ready for OTA-17.

          M 1 Reply Last reply 11 Mar 2021, 15:07 Reply Quote 0
          • M Offline
            mateo_salta @fredldotme
            last edited by 11 Mar 2021, 15:07

            @fredldotme ah, looks like that is the case only certain types of readers can work with them: https://stackoverflow.com/questions/45523081/how-to-read-the-mifare-classic-tag-using-the-nfca-class

            If someone can confirm the program works, I can try and compile the other qt examples to use

            that it was detecting like it was, I think it is working as it should then πŸ™‚ Looks like I need to find some different tags πŸ™‚ no worries, these were old 1kb.

            researching more, perhaps these: https://www.adafruit.com/product/4032 , the website even sites problems with mifare: "Unlike "Classic 1K" cards (a.k.a MiFare S50s), these tags are more secure and work with almost any phone with RFID support since they avoid the patent issues with Mifare, which requires an NXP chipset or license fee."

            1 Reply Last reply Reply Quote 0
            • M Offline
              mateo_salta
              last edited by 12 Mar 2021, 14:58

              we could also make a system settings page,
              not sure what all will go in besides on/off right now
              ideas:
              -allow tags to wake device - or not, turn off service on sleep?
              -configure tag for long random string, for secondary login like fingerprint (then pin + tag unlock setting) (there are nfc rings perfect for this) or put on your favourite speaker and have it unlock and launch music player automatically?

              • maybe display plain text tag as notification?
              • emulate tag, for phone to phone, touching messages/browser url share,
              1 Reply Last reply Reply Quote 0
              • M Offline
                mateo_salta
                last edited by 12 Mar 2021, 15:15

                oh, I see the settings page in github, cool. is there going to be a indicator?

                P 1 Reply Last reply 12 Mar 2021, 17:01 Reply Quote 0
                • P Offline
                  PhoenixLandPirat @mateo_salta
                  last edited by 12 Mar 2021, 17:01

                  @mateo_salta maybe it should just be added to the bluetooth indicator instead of making a seperate one for it

                  1 Reply Last reply Reply Quote 1
                  • F Offline
                    fredldotme
                    last edited by 14 Mar 2021, 15:25

                    Maybe we can consolidate WIFI, Bluetooth and NFC into one indicator in the future, but that's out-of-scope for the initial release.

                    M 1 Reply Last reply 15 Mar 2021, 01:33 Reply Quote 0
                    • M Offline
                      mateo_salta @fredldotme
                      last edited by 15 Mar 2021, 01:33

                      @fredldotme yes, i think the plan is location, bluetooth, ect. as the other networking options are together, wifi, ethernet, cellular

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mateo_salta
                        last edited by 19 Mar 2021, 03:54

                        I think we would also want to build in automatic uri/url handling -
                        Many tags are written to launch a website/url, and we would want these to be sent to the url dispatcher automatically, would be simple to just call open url externally, url dispatcher takes care of the rest.

                        I have received new tags, and once written on another device the app i compiled reads then perfectly, we may need to recompile something to enable writing, as the code comments that it was disabled.

                        The tags I got are ntag 213 ( a watch style tag, and a ring style tag) I plan on writting a custom url (i think "clock://" to open the clock on the "watch band", then maybe we can see what it would take to make a password ring πŸ™‚

                        F 1 Reply Last reply 19 Mar 2021, 16:16 Reply Quote 0
                        • F Offline
                          fredldotme @mateo_salta
                          last edited by 19 Mar 2021, 16:16

                          @mateo_salta I've already taken a look into QtNfc not allowing writes, I know where to enable it. Might take some time though.

                          For the URL handling: Yes, this has also been requested by Nymea devs, but at the current pace it might not make the cut for OTA-17.

                          M 1 Reply Last reply 21 Mar 2021, 14:19 Reply Quote 0
                          • M Offline
                            mateo_salta @fredldotme
                            last edited by 21 Mar 2021, 14:19

                            @fredldotme cool, will be great to have the app usability at first, thank you for all the wor.

                            M 1 Reply Last reply 21 Mar 2021, 14:21 Reply Quote 0
                            • M Offline
                              mateo_salta @mateo_salta
                              last edited by 21 Mar 2021, 14:21

                              @mateo_salta i could probally write a basic app that just passes on the url to urldispatcher as a stopgap, i think that will be my next thing to try

                              F 1 Reply Last reply 26 Mar 2021, 18:30 Reply Quote 0
                              • F Offline
                                fredldotme @mateo_salta
                                last edited by 26 Mar 2021, 18:30

                                @mateo_salta Could you possibly release a version of your demo QtNfc writer app with the nfc policy group enabled? I would like to test it in a confined environment. Or even better, could you release the source code for it?

                                M 1 Reply Last reply 28 Mar 2021, 16:14 Reply Quote 0
                                • D Offline
                                  domubpkm
                                  last edited by 28 Mar 2021, 05:45

                                  NFC should be in next dev :
                                  https://github.com/ubports/ubuntu-touch/issues/1697
                                  But in concrete terms, what will this technology implemented on UT smartphones allow us to do in daily use?

                                  F 1 Reply Last reply 28 Mar 2021, 06:29 Reply Quote 1
                                  • F Offline
                                    fredldotme @domubpkm
                                    last edited by 28 Mar 2021, 06:29

                                    @domubpkm depends on what app developers can envision and implement with it. It could be used for home automation for example, triggering events via NFC tags.

                                    K 1 Reply Last reply 28 Mar 2021, 10:22 Reply Quote 0
                                    • K Offline
                                      kugiigi @fredldotme
                                      last edited by 28 Mar 2021, 10:22

                                      I almost never used NFC in my life. Maybe once or twice I used it to automatically pair bluetooth devices πŸ˜„
                                      But that's why I'm really looking forward having it on UT because I'm pretty sure I will use it. I've used a lot things just because they are available on UT 😁

                                      M 1 Reply Last reply 28 Mar 2021, 17:13 Reply Quote 0
                                      • M Offline
                                        mateo_salta @fredldotme
                                        last edited by mateo_salta 28 Mar 2021, 16:14

                                        @fredldotme oh yeah, the source is in the example folders of qt-master, they have a handfull of demos, I will try the apparmor, didn't know that was going yet πŸ™‚

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          mateo_salta @kugiigi
                                          last edited by 28 Mar 2021, 17:13

                                          @kugiigi I'm looking foward to trying this example, ( https://github.com/qt/qtconnectivity/blob/8618e25e01ca9c6c6b2221041f625ac69f6757b8/examples/nfc/corkboard/corkboards.qml) and sticking some of the stickers on my refrigerator as notes πŸ™‚

                                          1 Reply Last reply Reply Quote 1
                                          • flohackF Offline
                                            flohack
                                            last edited by 14 Apr 2021, 10:56

                                            Is there already a test app? I have at least one device here where I would love to test it...

                                            My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                            F 1 Reply Last reply 14 Apr 2021, 16:59 Reply Quote 0
                                            • First post
                                              Last post