-
Notifications
You must be signed in to change notification settings - Fork 9
Add WiFi Simple Configuration NDEF Record #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WiFi Simple Configuration NDEF Record #27
Conversation
Implements WiFi NDEF record (application/vnd.wfa.wsc) with support for: - Authentication types: Open, WPA, WPA2, WPA3 - Encryption types: None, WEP, TKIP, AES - Optional MAC address validation - Full encode/decode functionality - Comprehensive test coverage (7 tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for WiFi Simple Configuration (WSC) records to the NDEF library, enabling NFC-based WiFi credential sharing. The implementation follows the WSC specification for encoding WiFi network information (SSID, password, authentication type, encryption type) into NDEF records.
Key changes:
- New
WifiRecordclass implementing WiFi Simple Configuration format with TLV encoding - Support for multiple authentication types (Open, WPA/WPA2/WPA3 Personal and Enterprise)
- Support for encryption types (None, WEP, TKIP, AES)
- Comprehensive test coverage for various WiFi configuration scenarios
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lib/records/media/wifi.dart | New file implementing WifiRecord class with WSC TLV encoding/decoding for WiFi credentials |
| lib/record.dart | Added WifiRecord instantiation in the record factory method |
| lib/ndef.dart | Exported the new wifi.dart module for public API access |
| test/ndef_test.dart | Added comprehensive tests for WiFi record encoding/decoding with various authentication and encryption types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ljanecek Thank you very much for this new type! Please check out two unresolved copilot's review advice, I think they do make sense. And I think we need some "real" encoding / decoding tests, i.e. to compare the results with some ground truth bytes. |
|
Thanks! I’ve applied the suggestions and added tests using "real" payloads from other libraries for validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ljanecek Thank you again! I will release a new version soon. |
Implements WiFi NDEF record (application/vnd.wfa.wsc) with support for: