Skip to content

Repository files navigation

OpenPrintTag NFC Reader/Writer

A web-based tool for reading and writing binary data to/from OpenPrintTag NFC tags, specifically designed for 3D printing applications and FDM Monster integration.

Features

  • 📖 Read NFC Tags: Scan OpenPrintTag NFC tags and extract binary data
  • ✍️ Write NFC Tags: Write binary files or hex data to NFC tags
  • 💾 File Management: Upload binary files or download read data
  • 🔍 Data Analysis: Basic OpenPrintTag format analysis and hex/text preview
  • 🌐 Web-Based: No installation required, runs in modern browsers

Requirements

Browser Support

  • Chrome/Edge on Android (primary support)
  • Must be served over HTTPS or accessed via localhost
  • Requires Web NFC API support

Device Requirements

  • NFC-enabled Android device
  • NFC must be enabled in device settings
  • Supported NFC tag types (NDEF-compatible)

Usage

Getting Started

  1. Open index.html in a supported browser
  2. Ensure you're accessing via HTTPS or localhost
  3. Grant NFC permissions when prompted

Reading NFC Tags

  1. Click "Start NFC Scan"
  2. Bring the OpenPrintTag NFC close to your device
  3. View the extracted binary data in hex and text format
  4. Download the binary file if needed

Writing NFC Tags

  1. Option 1: Upload a binary file using the file input
  2. Option 2: Enter hex data directly in the text area
  3. Click "Write to NFC Tag"
  4. Touch the NFC tag to your device when prompted

OpenPrintTag Format

OpenPrintTag is a standardized format for storing 3D printing information on NFC tags. The binary format typically includes:

Structure

[Magic Header] [Version] [Print Settings] [Metadata] [Checksum]

Common Data Fields

  • Temperature Settings: Nozzle and bed temperatures
  • Print Speed: Speed settings for different print phases
  • Material Info: Filament type, brand, color
  • File Metadata: Original filename, creation date, etc.
  • Checksum: Data integrity verification

Technical Details

Web NFC API

This application uses the experimental Web NFC API:

  • Reading: Uses NDEFReader.scan() to detect and read tags
  • Writing: Uses NDEFReader.write() to write binary data as MIME records
  • Format: Stores binary data as application/octet-stream MIME type

Data Processing

  • Binary data is displayed as hex strings for inspection
  • Automatic analysis attempts to identify embedded strings
  • Support for files up to NFC tag memory limits (typically 1-8KB)

Security Considerations

  • HTTPS required for Web NFC API access
  • User gesture required for NFC operations
  • Permission prompts for NFC access

Troubleshooting

Common Issues

"NFC not supported"

  • Use Chrome/Edge on Android
  • Ensure NFC is enabled in device settings
  • Check that Web NFC API is available

"NFC requires HTTPS"

  • Access via HTTPS URL or localhost
  • Self-signed certificates may work for testing

"NFC write failed"

  • Ensure tag is NDEF-compatible
  • Check tag memory capacity
  • Try different NFC tag brands/types

"No data found on NFC tag"

  • Tag may be empty or use unsupported format
  • Try reading with other NFC apps to verify tag works

Browser Console

Check the browser console (F12) for detailed error messages and debugging information.

Development

File Structure

fdm-monster-openprinttag/
├── index.html          # Main application file
└── README.md          # This documentation

Extending the Application

The code is designed to be easily extensible:

  • Add custom OpenPrintTag format parsers in analyzeOpenPrintTag()
  • Implement additional data validation in the write functions
  • Add support for multiple NDEF records if needed

Integration with FDM Monster

This tool can be integrated with FDM Monster workflows:

  • Export print settings to NFC tags
  • Import settings from physical tags
  • Link tags to specific print files or configurations

Browser Compatibility

Browser Platform Support
Chrome Android ✅ Full
Edge Android ✅ Full
Firefox Android ❌ No support
Safari iOS ❌ No support
Chrome Desktop ❌ No support

License

This project is open source and available under standard web development practices.

Contributing

Feel free to submit issues and enhancement requests. This tool is designed to be simple and focused on OpenPrintTag NFC operations.

About

OpenPrintTag tool hosted at opt.fdm-monster.net

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages