Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Kadaj · Dec 08, 2015 at 12:02 PM · unity5externalusbsensor

Connecting an external NFC reader with Unity

Hi all,

After much research on the subject, most solutions are oriented on the Android NFC detection.

However, I'd like connected an external NFC reader (the ACR122U) with Unity to my game publishing on desktop (Windows).

What I found most similar to my project is ShadowRealmVR. But, they use a NFC reader created with Arduino.

Do you have any ideas for just reading the NFC Tag with my external NFC reader into Unity?

Thanks for your help.

Kadaj

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image arilicious · Nov 30, 2016 at 02:08 PM 0
Share

push, any answers to this? im trying the same (same reader)

avatar image Kadaj arilicious · Dec 06, 2016 at 11:19 AM 0
Share

Hi Arilicious,

No, unfortunately, I've finally buy an Arduino with a NFC shield to communicate simply with Unity.

$$anonymous$$adaj

avatar image arilicious Kadaj · Dec 06, 2016 at 01:15 PM 0
Share

Hey $$anonymous$$adaj,

thanks for your reply, even if you had no success with the ACR122U - imo the SD$$anonymous$$ and their examples.. just dont work properly. I also just ordered the RC522 RFID Reader to use it with an Arduino

Show more comments
avatar image wildbytesDev · Aug 27, 2019 at 02:09 PM 0
Share

Hey @$$anonymous$$adaj ! we're trying to do the same thing. Did you find a solution?

thanks!

avatar image Kadaj wildbytesDev · Aug 27, 2019 at 06:31 PM 0
Share

Hi @wildbytesDev ! Unfortunately no... I finally took an Arduino with a NFC shield.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by crazyrems · Aug 28, 2019 at 09:02 AM

I managed to make a Unity app that reads a tag from a ACR122U card reader.

My solution relies on a third part dll (https://github.com/g-rad/Lando)

I managed to build that dynamic library from Visual Studio. This gives me the Lando.dll file.

Then I imported the file into my Unity project.

 using Lando;

I can use an instance of it

 this.cardReader = new Lando.Cardreader();

It works with delegate methods

 private void CardReader_CardConnected(object sender, CardreaderEventArgs e)
 {
     Debug.Log(e.Card.Id);
 }

…and then

 this.cardReader.CardConnected += CardReader_CardConnected;

Now your reader can respond to reading a card asynchronously, but you still need to turn on and off the reading.

 this.cardReader.StartWatch();
 // you can read your tags now!
 ...
 this.cardReader.StopWatch();
 // read is over…

Don't forget to dispose of your card reader so you can use it later in the application lifetime.

 this.cardReader.Dispose();

The downside of this library is that I can only read the tag identifiers and not their content. I bypassed that limitation by creating different files the app reads at runtime to identify the nature of the IDs.


You may need to change the C# subset from the player settings.

Comment
Add comment · Show 12 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Charlin1712 · Feb 19, 2020 at 03:04 AM 0
Share

Hi!, i try to make a build too in visual studio, but visual show me two errors in the code and i cant solution it, can you share de dll dynamic library pls? :D

avatar image crazyrems Charlin1712 · May 05, 2020 at 10:04 AM 0
Share

Are you still looking for that dll?

avatar image tieum67 crazyrems · Jul 09, 2020 at 10:23 AM 0
Share

hello, i'm having the same issue to build the dll. Could you share it please ?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can I connect real-android-device with USB port and access 127.0.0.1 IP? 0 Answers

Custom Sensor integration 0 Answers

Devices connected with an USB bluetooth dongle stop responding when editor starts 2 Answers

Make a motor turn in real life. 0 Answers

Can unity send an output to an external device? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges