feat: cross-platform NetFinder for CS203XL discovery on iOS/Android/Windows#2
Merged
Merged
Conversation
…/Android/Windows - NEW: Source/HAL/TCPIP/NetFinder.cs — CSLibrary.NetFinder namespace wrapper - Wraps CSLibrary.NetFinder.CS203XL.NetFinder (UDP port 3000) - Singleton pattern, static SearchDevice() / StopSearch() - Cross-platform: System.Net.Sockets works on iOS, Android, Windows - MODIFIED: Source/HAL/TCPIP/ClassDeviceFinder.cs - Changed #if __MwwmCrossPluginBLE to #if TCP - Removed Windows-only DeviceWatcher code - Wires to CSLibrary.NetFinder.NetFinder for discovery - MODIFIED: Source/CSLibrary.cs - Added: using CSLibrary.NetFinder; - ConnectAsync(string ip, int port) already wired in CodeFileTCPIP.cs
- NEW: Source/Properties/AndroidPermissions.cs
- [assembly: Android.Runtime.UsesPermission] for ACCESS_WIFI_STATE,
ACCESS_NETWORK_STATE, CHANGE_WIFI_MULTICAST_STATE, INTERNET
- Also BLUETOOTH_* permissions (Plugin.BLE coverage)
- Only compiles when targeting Android (#if ANDROID)
- UPDATED: CSLibrary2026.csproj TargetFrameworks
- Added: net10.0-android, net10.0-ios, net10.0-maccatalyst
- (netstandard2.0, net10.0, net10.0-windows already present)
Co-authored-by: OpenClaw <openclaw@openclaw>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
CSLibrary.NetFinder.NetFinderfor discovering CS203XL readers over UDP (port 3000) on Windows, Android, and iOS.What changed
NEW: Source/Properties/AndroidPermissions.cs
[assembly: Android.Runtime.UsesPermission]attributes for:ACCESS_WIFI_STATE,ACCESS_NETWORK_STATE,CHANGE_WIFI_MULTICAST_STATE,INTERNET— required for NetFinder UDP broadcast on AndroidBLUETOOTH_*permissions — Plugin.BLE coverage#if ANDROID)NEW: Source/HAL/TCPIP/NetFinder.cs — CSLibrary.NetFinder namespace
CSLibrary.NetFinder.CS203XL.NetFinder(UDP port 3000)SearchDevice()/StopSearch()/ClearDeviceList()OnSearchCompletedevent withDeviceFinderArgs(IP, MAC, name, port)MODIFIED: Source/HAL/TCPIP/ClassDeviceFinder.cs
#if __MwwmCrossPluginBLE→#if TCPDeviceWatchercodeDeviceFinder.SearchDevice()→CSLibrary.NetFinder.NetFinderMODIFIED: Source/CSLibrary.cs
using CSLibrary.NetFinder;MODIFIED: CSLibrary2026.csproj TargetFrameworks
net10.0-android,net10.0-ios,net10.0-maccatalystUsage (MAUI app)
Platform Notes
ACCESS_WIFI_STATE,CHANGE_WIFI_MULTICAST_STATE— declared via assembly attributes in this PR; also add to your app AndroidManifest.xml as fallbackNext Steps
1.0.0-beta.3to NuGet from Windows/macOS build machine with Android/iOS SDKs