Jump to content

Read/Write NFC Tags


xperiment

Recommended Posts

Posted · Read/Write NFC Tags

Yes, the tags can be written and read. what exactly you want to achieve?

here's the recommendation:

Before working with the Ultimaker S5, I've never really put my mind to NFC technology, so there are very probably some gaps in my understanding. Most of what I've learned, I've deduced from comparing the data from different spools and with different amounts of remaining material. The rest I could fill in reading the relevant python code of the firmware after ssh-ing into the printer.

You can also check the demonstration code on github to understand even batter. The code is: https://gist.github.com/gandy92/a7eef12009045f7b3fc01d778c3b79a7

Hope it'll help!

  • Link to post
    Share on other sites

    • 3 weeks later...
    Posted · Read/Write NFC Tags

    Hey, im using this Printer for work and i have the "job" to eliminate User errors. After two weeks of trying everything i finally found out that my colleague sent me the wrong driver for my nfc reader🙄. Now its working as i can read and write Ntags. The Problem is that our printer isnt connected to the Network and i would need to sync the Materials to the UM3 for it to work right? Tested the Tags on the UM3 and it only shows "UNKNOWN" and a string of letters and numbers.

    even tried to export the Ultimaker PLA file and write it onto the tag but also shows unknown. Its My last week at this workplace so i would really like to finish this project or atleast as much finished so that they only need to connect the UM3 to the Network and its working. Could someone Maybe try to write a Ultimaker Filament onto a Tag and remove the Printer from the network?

    Would be greatly appreciated.

     

    Best Regards,

    Florian

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags
    2 hours ago, Hiabst said:

    Hey, im using this Printer for work and i have the "job" to eliminate User errors. After two weeks of trying everything i finally found out that my colleague sent me the wrong driver for my nfc reader🙄. Now its working as i can read and write Ntags. The Problem is that our printer isnt connected to the Network and i would need to sync the Materials to the UM3 for it to work right? Tested the Tags on the UM3 and it only shows "UNKNOWN" and a string of letters and numbers.

    even tried to export the Ultimaker PLA file and write it onto the tag but also shows unknown. Its My last week at this workplace so i would really like to finish this project or atleast as much finished so that they only need to connect the UM3 to the Network and its working. Could someone Maybe try to write a Ultimaker Filament onto a Tag and remove the Printer from the network?

    Would be greatly appreciated.

     

    Best Regards,

    Florian

    So got it connected to my network after IT patched my port. Cura showed a message that there are materials getting sent over but they arent showing up in my UM3 anyone got a idea what the problem could be ?

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags

    The new materials can be imported into the machine through the USB stick. Go into Cura, into the materials area of the settings menu, and find the “sync materials” button (I may have the name a little off, I’m working from memory). It will try to do it over the network and find no printers, but on that screen is an option to sync over USB. I haven’t used it, but I believe the procedure is Cura will write the materials file to the USB stick, you put that into the printer, then find the import materials from USB option in the printer menus. I may have the button names off a bit, but that’s the basic procedure, through the USB. You can’t import materials into the printer using the NFC tag, that’s only an identifier for the spool in hand. 

    Edited by rachael7
  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags
    6 minutes ago, rachael7 said:

    The new materials can be imported into the machine through the USB stick. Go into Cura, into the materials area of the settings menu, and find the “sync materials” button (I may have the name a little off, I’m working from memory). It will try to do it over the network and find no printers, but on that screen is an option to sync over USB. I haven’t used it, but I believe the procedure is Cura will write the materials file to the USB stick, you put that into the printer, then find the import materials from USB option in the printer menus. I may have the button names off a bit, but that’s the basic procedure, through the USB. You can’t import materials into the printer using the NFC tag, that’s only an identifier for the spool in hand. 

    Dont see that Option for my UM3 in cura 5.1.1.

     

  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    Hey @Hiabst,

     

    Sending materials over USB is not available for the UM3.
    So I would suggest to rely on sending the materials over network. 

    I personally like this page with tips when troubleshooting sending materials
    https://support.ultimaker.com/hc/en-us/articles/360016857859-How-to-troubleshoot-issues-with-material-printer-synchronization-

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags
    4 minutes ago, MariMakes said:

    Hey @Hiabst,

     

    Sending materials over USB is not available for the UM3.
    So I would suggest to rely on sending the materials over network. 

    I personally like this page with tips when troubleshooting sending materials
    https://support.ultimaker.com/hc/en-us/articles/360016857859-How-to-troubleshoot-issues-with-material-printer-synchronization-

    Hi, i already got it conected to my UM3 and it said that the materials were beeing sent over, but cant find them anywhere im gonna try fixxing it via your link, thank you.

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags

    Nope, The NFC tags still dont work i checked if the XMLs are on the Printer, checked if the GUID is the only one. wrote it to my tag but the nfc reader doesnt pick it up / the NFC diagnosis says Unknown 😞

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    Hey @Hiabst,

     

    If that doesn't work there might be a broken part. 

    Then it's better to reach out to our support experts.

    You can create a ticket here: 

    https://support.ultimaker.com/hc/en-us/requests/new?ticket_form_id=360000516360

  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    You can ssh into the UM3 if you are good with linux and you can see all the code (it's all in python).  So if you are a programmer and know python and with a little "grep"ing you can find the code and you can debugging to see what is going on.  it may already be logging this information.

     

    To ssh to the printer you have to put it into "developer mode" in the menu system on the printer (probably under maintenance?  I forget).  Then it shows an ip address and you can ssh to that username/password root/ultimaker.

     

    Search for files that end in ".py".  I forget where they are - it's a bit tricky but once you find the right folder it's a treasure trove.  You can search for NFC perhaps.

     

    You can dump the Ultimaker python log files with journalctl. For example, to see all python errors since most recent boot do:
    journalctl -b

     

    google journalctl for more options.  In there there *might* be some info already logged about the NFC tags.  If not, and if you know python you can add your own logging to help you debug the issue.  It sounds like you are putting in the right serial number but maybe something else is missing such as a checksum.
     

    • Like 1
    Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    I will do this tomorrow.

    My workday is almost over but thanks for the help, much appreciated.

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags
    14 hours ago, gr5 said:

    You can ssh into the UM3 if you are good with linux and you can see all the code (it's all in python).  So if you are a programmer and know python and with a little "grep"ing you can find the code and you can debugging to see what is going on.  it may already be logging this information.

     

    To ssh to the printer you have to put it into "developer mode" in the menu system on the printer (probably under maintenance?  I forget).  Then it shows an ip address and you can ssh to that username/password root/ultimaker.

     

    Search for files that end in ".py".  I forget where they are - it's a bit tricky but once you find the right folder it's a treasure trove.  You can search for NFC perhaps.

     

    You can dump the Ultimaker python log files with journalctl. For example, to see all python errors since most recent boot do:
    journalctl -b

     

    google journalctl for more options.  In there there *might* be some info already logged about the NFC tags.  If not, and if you know python you can add your own logging to help you debug the issue.  It sounds like you are putting in the right serial number but maybe something else is missing such as a checksum.
     

    Hi, im not sure if i know not enough linux, but tried with "grep" and "find" but couldnt find any files which contain the word NFC or end in .py . I think The Printer hasnt had an update in a minute i think imma try to update it rn.

     

    Edit: I checked the currently installed Firmware and its from May(?) 2019 lol. Gotta tell my coworkers to update th printer more.

     

    Edit2: still not finding any files : (

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags

    Im getting this from the Spoolmaker.py

    Connected to NFC Tag. ATR Response = 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 03 00 00 00 00 68
    UID = 04 67 39 92 66 5A 80      status = 90 00  data=[4, 103, 57, 146, 102, 90, 128]
    Finding: 611699d6-1466-4bd8-80a1-adf87de07159

     

    that would be correct right? I want to eliminate the possibility that my NFC Reader isnt working correctly.

    And I just found out that the String above "unknown" is the Serial Number of the Tag.

     

    Edit: just found out that all my tags have the same serial Number(UID). But the original Tag from a Ultimaker spool should still work after i changed the GUID right ?

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    1) There are 4 pages of posts in this topic.  Did you realize that?  Did you go back to the first posts?  In particular read the first post by tinkerGnome.  And the posts right after.  It gives one hints about how it all works.

     

    2) I know almost nothing about the NFC tags but I know that some types of IDs have an uneditable serial number (that is globally unique) and that 100% can not be edited and if that is the case for NFC tags then that part can be ignored because it's useless for determining filament type.

     

    3) There's nothing wrong with code from 2019.  That might even be what I have on my UM3 right now

     

    4) Finding the folder with all the code is a search through windy passages but once you find it it's all there.  I was hoping you knew linux very well and could find it easily.  Try these folders:

    /usr/share/griffin

    /var/lib/griffin

     

    I think the first one has the python files maybe (and in subfolders)

    And the second one has some configuration json files maybe?

    These are old notes and I don't remember details and I'm too lazy to turn on my UM3 and connect it to the network right now.

     

    Once you find all the python files you can do:

     

    grep -iR nfc *

     

    I think that will search the current folder and all subfolders (the "R" part) and the "i" will do a case insensitive search.  If you change it to "*.py" it will only search python files but it will not go into any of the subfolders.  For that you want something like "find".  Just search all files for the initial search (starting in /usr/share/griffin or a subfolder of that)  until you know what folder has all the nfc stuff.

     

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags
    1 hour ago, gr5 said:

    1) There are 4 pages of posts in this topic.  Did you realize that?  Did you go back to the first posts?  In particular read the first post by tinkerGnome.  And the posts right after.  It gives one hints about how it all works.

     

    2) I know almost nothing about the NFC tags but I know that some types of IDs have an uneditable serial number (that is globally unique) and that 100% can not be edited and if that is the case for NFC tags then that part can be ignored because it's useless for determining filament type.

     

    3) There's nothing wrong with code from 2019.  That might even be what I have on my UM3 right now

     

    4) Finding the folder with all the code is a search through windy passages but once you find it it's all there.  I was hoping you knew linux very well and could find it easily.  Try these folders:

    /usr/share/griffin

    /var/lib/griffin

     

    I think the first one has the python files maybe (and in subfolders)

    And the second one has some configuration json files maybe?

    These are old notes and I don't remember details and I'm too lazy to turn on my UM3 and connect it to the network right now.

     

    Once you find all the python files you can do:

     

    grep -iR nfc *

     

    I think that will search the current folder and all subfolders (the "R" part) and the "i" will do a case insensitive search.  If you change it to "*.py" it will only search python files but it will not go into any of the subfolders.  For that you want something like "find".  Just search all files for the initial search (starting in /usr/share/griffin or a subfolder of that)  until you know what folder has all the nfc stuff.

     

    Hey, thanks for the reply. I read it trough again because the last time was almost 2-3 weeks ago i somewhat understand it again now.

    I attached what i found in my logs, i really have no idea of what i should be searching for but here were a few errors with the NFC at the time i was at my printer.

    Folder with the NFC files would be /usr/share/griffin/nfc .

     

    Best Regards,

    Hiabst

    NFC.log

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    I can't make any sens of that, sorry.  I'd have to read the python code.  @CarloK?  Any ideas?

    • Like 1
    Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    I just did a Factory reset and i can choose my Material now on the UM3, NFC still isnt working tho : (

    @CarloK do you have any ideas regarding my Log i sent two posts ago?

  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags
    On 11/9/2022 at 2:36 AM, Hiabst said:

    Edit: just found out that all my tags have the same serial Number(UID). But the original Tag from a Ultimaker spool should still work after i changed the GUID right ?

    I assume that is the command line response, on which I can offer no advice since I use the GUI version of spoolmaker. But I can tell you that in addition to setting the GUID for the material, you also need to reset the weight and print time fields or the roll will read as empty.

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags
    40 minutes ago, rachael7 said:

    I assume that is the command line response, on which I can offer no advice since I use the GUI version of spoolmaker. But I can tell you that in addition to setting the GUID for the material, you also need to reset the weight and print time fields or the roll will read as empty.

    Set the weight to about 800g as its not full and print time to 0. That would be the correct settings right?

    I also use the GUI to write but when i read the tag i used the command line once to check.The GUI shows everything is correct when i read the tag

    Edited by Hiabst
  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags
    14 hours ago, Hiabst said:

    Set the weight to about 800g as its not full and print time to 0. That would be the correct settings right?

    I also use the GUI to write but when i read the tag i used the command line once to check.The GUI shows everything is correct when i read the tag

    There is the full weight, which lives in data register 2E, the remaining weight, which lives in register 2F, and the elapsed printing time in seconds (it's shown in hours in the GUI, but stored in seconds), which uses the first three bytes of register 31.

     

    If you used the GUI to make the tag, and after writing, it is showing the same weight for total, remaining, and "new", along with 0.0 for the printing time, you should be correctly set up as a fresh roll.  The GUI doesn't let you change the remaining weight or the printing time, only the "new" weight number, so if you want to make it a partial roll, you can make the tag with SpoolMaker, then manually edit the data registers using nfctoolsgui or something similar.

     

    Here's what mine looks like after making a tag for one of my materials:

     

    image.thumb.png.4e948abaeb82c378942a09dd81621bdd.png

    • Heart 1
    Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    @Hiabst I'm a bit at a loss for what you are trying to achieve. I assume you want to create NFC labels for non-ultimaker spools? This is not officially supported from Ultimaker. Here in the thread smart people figured out how to do it, but there are many small details where it can fail and is difficult to debug.

    Creating custom NFC-tags is a great use case for printers with a Material Station, but that's not supported on the UM3 printer and I don't see large benefits for the UM3. Why is it so important to your company?

     

    On 11/9/2022 at 7:57 AM, Hiabst said:

    Edit: I checked the currently installed Firmware and its from May(?) 2019 lol. Gotta tell my coworkers to update th printer more.

    The version from May 2019 would be 5.2.11, a very stable release. Most recent release is 5.3.0 from October 2021 and has some small improvements and fixes. Worth to do the upgrade, but not essential.

     

    Your log files show the text:

    Quote

    Failed to open NFC hardware. Starting the service with dummy hardware, so the system does not fail as a whole.

    This indicates a problem with the NFC hardware. It's difficult to break the electronics, double check that the connector at the bottom of the UM3 is seated correctly.

     

    First ensure you can get the printer to work with original Ultimaker NFC tags again before trying new steps.

    • Heart 1
    Link to post
    Share on other sites

    Posted · Read/Write NFC Tags
    5 hours ago, CarloK said:

    Creating custom NFC-tags is a great use case for printers with a Material Station, but that's not supported on the UM3 printer and I don't see large benefits for the UM3. Why is it so important to your company?

    ...

    First ensure you can get the printer to work with original Ultimaker NFC tags again before trying new steps.

    I don't have an S3, but wouldn't custom NFC tags still have the same function of allowing the user to have something other than a single "generic" profile for each custom material? If using two colors of the same custom material for example, there is no way to differentiate them on the machine without an NFC tag, is there? That being the case, that would seem to provide justification, would it not?

     

    I agree with the advice to make sure it works with UM NFC tags first - eliminating variables is always the best place to start.

  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    I'm new to the UltiMaker S5 with Material Station and thought the same about the generic profile when using 2 colors (only load one generic material at a time, and unload when changing colors for the same print core); however, I realized after following these posts to create a NFC tag that you can create "Custom" profiles and set the settings the same as a "Generic" profile with the appropriate colors (specifically "custom" to create a new UUID or the S5 doesn't recognize it as a new material). I would have to do this anyway to have the NFC tag associate with this new material and color.

     

    To load the new materials in the S5 i used a USB, because the material network sync didn't work for some reason. Now the S5 shows the new material profiles are now added to the S5 and I can manually chose them per bay with the appropriate color. In Cura, the material/color is selectable from what is loaded in the material station. This negates the need for the RFID tags for all but amount left on the spool and having to manual enter what's loaded.

  • Link to post
    Share on other sites

    Posted · Read/Write NFC Tags

    That’s exactly right. That capability (color) was only added a few firmware versions back though. Before that it was a much bigger issue. I’m glad UM addressed it. I still like making tags though 🙂 

  • Link to post
    Share on other sites

    Posted (edited) · Read/Write NFC Tags

    I use the S5 as a hobby; if someone's use case is similar to mine (i.e., small set of spools/colors), you can try this location for NFC tags and re-write to them when you replace a spool.

     

    I 3D modeled an NFC tag holder (26mm square and staple shaped), then printed it in each filament. I attached the NFC tag (written per filament brand/type/color, using all the great information from this thread) to the inside left side of the material station bays. In this location, the NFC tags are recognized and updated. This works for all but the left most bay as it has a side wall there. For me, I used that bay for Ultimaker Breakaway filament, so it's not an issue.

    MaterialBay_Clip.png

    Edited by dainon
    • Like 2
    • Heart 2
    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

    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...