chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
703 stars 547 forks source link

NFC Writting Error - Only one tag technology can be connected at a time #489

Open bevinGithub opened 11 months ago

bevinGithub commented 11 months ago

Hi guys, i have an issue with witting to NFC chips. The writing works fine on a few chips. My client rely heavily on writing the tags at high numbers lets say 30 tags. When they write to the tags there is a warning message only one tag technology can be connected at a time – there is only writing to one tag, there are no other tag near. This happens after about the 4th tag is written too.

Any assistance is much appreciated

Ionic:

Ionic CLI : 6.20.1 (C:\Users\Tigere Bervin\AppData\Roaming\npm\node_modules\@ionic\cli) Ionic Framework : @ionic/angular 6.2.2 @angular-devkit/build-angular : 13.0.4 @angular-devkit/schematics : 13.0.4 @angular/cli : 13.0.4 @ionic/angular-toolkit : 5.0.3

Cordova:

Cordova CLI : 11.0.0 Cordova Platforms : android 10.1.2 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 14 other plugins)

Utility:

cordova-res : 0.15.4 native-run (update available: 1.7.2) : 1.5.0

System:

Android SDK Tools : 26.1.1 (C:\Users\Tigere Bervin\AppData\Local\Android\Sdk) NodeJS : v14.20.0 (C:\Program Files\nodejs\node.exe) npm : 6.14.17 OS : Windows 10

don commented 10 months ago

The error message is talking about tag technology not tags. Somehow Android (or my code) is connecting 2 tag technologies. If I recall correctly this plugin is using Ndef. So it sounds like I'm telling it to connect as Ndef but something else is connected to the tag as say NfcA. This could be the plugin, or another app, or something in the Android OS.

https://developer.android.com/reference/android/nfc/tech/TagTechnology

bevinGithub commented 10 months ago

Thank you very much for the response.

Yes l can reproduce this error message, every time l write to the tags lets say from 1 to 15 tags, the writing works for the first 7 or 8 or so, after that l start getting the error message of tag technology and once the error starts the writing to the tag won't work and l have to close the app completely and start it again for it to start writing. Reading the tags is work perfectly.

Devices is mainly Samsung A33, A31, A72, OPPO brands

All devices are on Android 12 and brands above.

One thing to note, Samsung I have A31 does have an inbuilt tag reader which does read the tag also, not sure if that is what you referring to "something else is connected to the tag as say NfcA". It does read the tag not sure what takes priority for the built in reader to activate or my app NFC writer.

I hope this explains my issue.

bevinGithub commented 10 months ago

Hi Don.

Any feedback on the issue of One technology can be connected at a time. I am stuck with this issue and l have implemented the documentation correctly but after a couple of scans the message starts up e.g. 5 and above writing to chips.

bevinGithub commented 9 months ago

Hi Don.

any feedback or is the plugin still been maintained or supported as we haven't had any feedback on the forum, this is critically urgent.

bommen commented 2 months ago

@bevinGithub, Did you manage to find a solution for this issue?

bevinGithub commented 2 weeks ago

Hi Bommen.

It's not really a solution, the NFC is buffering after a number of tag reading like 15 reads continuously. So what l ended up doing was just leave the page and unsubscribe the NFC event and go back to the page again after it has cleared the buffer. and resume reading.