Jump to content

Need help with Python Scripting!

TechFnatic

I'm trying to figure out how I can execute a python script via tapping against an NFC tag. For example, I would like to create a script that inputs my wifi credentials into my phone when I tap against the tag. How would I get this script to execute, does it have to redirect to a URL? What module is best for this project. 

 

I'm relatively new to python but challenging projects are the best way to learn, and I'm pretty interested in rfid and nfc atm.

Link to comment
Share on other sites

Link to post
Share on other sites

I haven't got any first-hand experience with Python - but from the sounds of it you may be able to do this via an Android application.

 

You would need to learn about Java if you've never used that before. If you're comfortable with Python you should be able to pick up the basics of Java quite easily, so you may be able to just jump into learning about Android app development and Android Studio. 

 

With this application specifically I would start off by learning how to get data from an NFC tag. Once you've achieved that, you can look into how to programmatically connect and configure a WiFi network connection. Now you would have to have the WiFi network information stored within the NFC tag, then you app would parse the tag and attempt to connect to that network.

CPU: i7-4790K --- HEATSINK: NZXT Kraken X61 --- MOBO: Asus Z97-A --- GPU: GTX 970 Strix --- RAM: 16GB ADATA XPG --- SSD: 512GB MX100 | 256GB BX200 HDD: 1TB WD Black --- PSU: EVGA SuperNova G2 --- CASE: NZXT H440 --- DISPLAY3 x Dell U2414H --- KEYBOARD: Pok3r (Clears) --- MOUSE: Logitech G Pro --- OS: Windows 10

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, spenser_l said:

I haven't got any first-hand experience with Python - but from the sounds of it you may be able to do this via an Android application.

 

You would need to learn about Java if you've never used that before. If you're comfortable with Python you should be able to pick up the basics of Java quite easily, so you may be able to just jump into learning about Android app development and Android Studio. 

 

With this application specifically I would start off by learning how to get data from an NFC tag. Once you've achieved that, you can look into how to programmatically connect and configure a WiFi network connection. Now you would have to have the WiFi network information stored within the NFC tag, then you app would parse the tag and attempt to connect to that network.

Thanks for the reply, Java does seem like it is more cut out for this project, maybe I'll pick up some Java this weekend and try to the project using that. Although I am sure there is a way to do this using python, some of those links really helped though, so thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, riklaunim said:

You need an app on the phone to react in such way to a NFC tag, like http://fieldguide.gizmodo.com/share-your-home-wi-fi-easily-using-an-nfc-tag-or-qr-cod-1624327128 and there is no scripting - most of the NFC tapping logic is in the app not in the tag, so it will work only for phones with given app.

I know that. I want to make my own script on purpose.. for fun

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, riklaunim said:

Check if QPython can do it. AFAIK they have some NFC support.

Great, I'll check it out, thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×