A robust and efficient library for interfacing with the GWIOT 7941W RFID/NFC module, designed for dual-frequency communication with a focus on flexibility and ease of use. This is one of the cheapest module available on AliX that can read/write both HF and LF tags. However, the module is given with no documentation (or better to say, the documentation is in Chinese and very short), so i tried my best to give this module a decent library. This library is designed to help you get started with the module and integrate it into your projects.
- Dual-frequency support: Seamlessly handle both high-frequency (HF) and low-frequency (LF) tags.
- Flexible communication: Works with GPIO ports or serial communication on microcontrollers.
- Comprehensive data parsing: Read and parse tag data effortlessly.
- Lightweight: Minimal dependencies for easy integration.
Clone this repository and include the library in your project.
git clone https://github.com/AndreaIannoli/GWIOT-7941w.git
Include the library in your project and initialize the module.
#include "7941W.h"
GWIOT_7941W:rfidModule(16, 17); // Example with GPIO pins 16 (RX) and 17 (TX)
Scan for tags and retrieve the ID.
// Read LF tag
ModuleResponse response = gwiot_7941w.read_LF_UID();
Serial.println(response.getHexData());
// Write LF tag
ModuleResponse response = gwiot_7941w.write_LF(rfidUidString);
Serial.println(response.getHexData());
// Read HF tag uid
ModuleResponse response = gwiot_7941w.read_HF_UID();
Serial.println(response.getHexData());
// Read HF tag, only Mifare Classic 1K is supported
HFTagInfo tagInfo = gwiot_7941w.read_HF_Card();
Serial.println(tagInfo.getUID());
Serial.println(tagInfo.getTagType());
Serial.println(tagInfo.getTagData());
Serial.println(tagInfo.getSectorsReadCount());
Serial.println(tagInfo.getBlocksReadCount());
Use advanced settings for custom behavior.
// Explicitly declare the number of hardware serial ports (default is UART2)
GWIOT_7941W:rfidModule(uint8_t numberOfHWSerial, uint8_t rx_pin, uint8_t tx_pin)
📂 gwiot-7941w-library
├── 📄 README.md # Project documentation
├── 📄 LICENSE # Licensing details
├── 📂 examples # Example usage files
├── 📂 src # Library source code
└── 📂 docs # Additional documentation
Detailed documentation is available in the docs
folder included the very raw one in chinese. Topics include:
- Setup and initialization
- Advanced configuration
- Command reference
- Tag information
- Tag data parsing
- Troubleshooting
Contributions are welcome! Please:
- Fork the repo.
- Create a feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a pull request.
- Microcontrollers: ESP32, Arduino
- Languages: C++
- Communication Protocols: UART
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Special thanks to the developers who will contribute to mantain and improve this library.
If you find this library helpful, please ⭐️ this repository and spread the word!
CHEERS!🍻