Skip to content

Conversation

@ljanecek
Copy link
Contributor

@ljanecek ljanecek commented Nov 5, 2025

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)

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)
@Harry-Chen Harry-Chen requested a review from Copilot November 5, 2025 11:10
Copy link

Copilot AI left a 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 WifiRecord class 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.

@Harry-Chen
Copy link
Contributor

@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.

@ljanecek
Copy link
Contributor Author

ljanecek commented Nov 6, 2025

Thanks! I’ve applied the suggestions and added tests using "real" payloads from other libraries for validation.

@Harry-Chen Harry-Chen requested a review from Copilot November 6, 2025 07:31
Copy link

Copilot AI left a 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.

@Harry-Chen Harry-Chen merged commit c5297c1 into nfcim:master Nov 6, 2025
8 checks passed
@Harry-Chen
Copy link
Contributor

@ljanecek Thank you again! I will release a new version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants