A Windows Forms (.NET Framework 4.8) application that discovers, connects to, and inventories UHF RFID tags with the CSL CS710S handheld reader over Bluetooth 5.x. The app is backward compatible with CS108 devices.
CS710SDesktopDemo(WinForms app)- UI for scanning/connecting to readers, starting/stopping tag inventory, and viewing tags/battery.
- Main form:
FormMain.
Library/CSLibrary2024(class library, .NET Framework 4.8)- CSL Unified API implementation for Bluetooth, RFID, barcode, and device services.
- Key classes used by the app:
HighLevelInterface,DeviceFinder,ClassRFID,Notification.
- Discovery
- Uses
DeviceFinder.SearchDevice()to scan for nearby readers. Results are raised throughDeviceFinder.OnSearchCompletedand added to the readers list. - Optional MAC address filtering can be toggled.
- Uses
- Connection lifecycle
HighLevelInterface.ConnectAsync()establishes a Bluetooth connection to the selected device.- The app listens for
rfid.OnStateChanged. WhenRFState.INITIALIZATION_COMPLETEis received, the UI enables inventory controls and loads the reader’s active RF link profiles into a dropdown. Disconnectcleanly tears down the connection viaHighLevelInterface.DisconnectAsync()and disables inventory controls. The app enforces disconnect before exit.
- Inventory flow
- On
Start Inventory, the app:- Enables antenna port
0(AntennaPortSetState), sets RF power withSetPowerLevel(300), and applies the selected link profile viaSetCurrentLinkProfile. - Starts tag ranging with
StartOperation(Operation.TAG_RANGING). - Subscribes to
rfid.OnAsyncCallbackand updates the tag grid with EPC and latest RSSI, de-duplicating on EPC.
- Enables antenna port
- On
Stop Inventory, the app stops the RFID operation and unsubscribes from callbacks.
- On
- Battery monitoring
- Subscribes to
notification.OnVoltageEventand displays battery% / volts. - A local
ClassBatteryconverts voltage to percentage with mode-dependent curves forINVENTORYvsIDLE.
- Subscribes to
Scan: searches for nearby readers (status shows progress). Results appear in the list (device name, MAC, model).Connect: connects to the selected reader and enables inventory controls when ready.RF Modes / Link Profile: list of supported link profiles read from the device. Choose one before starting inventory.Start Inventory: begins continuous tag ranging, showing EPC and current RSSI (dBuV). Re-seen EPCs update RSSI instead of adding duplicates.Stop Inventory: stops tag ranging.Clear Tag records: clears the EPC table.Disconnect: cleanly disconnects the reader.Exit: the app will prompt you to disconnect first if still connected.- Battery indicator: shows remaining percentage and voltage in real time when connected.
Prerequisites
- Windows with Bluetooth 5.x support
- Visual Studio 2019 or 2022 with .NET Framework 4.8 developer pack
Steps
- Open the solution in Visual Studio.
- Set startup project to
CS710SDesktopDemo. - Restore/build the solution.
- Deploy/run on a PC with Bluetooth enabled.
- Turn on the CS710S and ensure it is in Bluetooth advertising mode.
- Launch the app and click
Scan. Wait for discovery to complete. - Select your reader in the list and click
Connect. - After connected, choose an RF link profile from the dropdown.
- Click
Start Inventoryto begin reading tags. EPCs and RSSI will appear in the grid. - Click
Stop Inventoryto stop. UseClear Tag recordsto clear the grid as needed. - Click
Disconnectwhen finished. Exit the app afterward.
- Power level: adjust in
FormMainbefore starting inventory viarfid.SetPowerLevel. - Antenna selection: uses port
0by default; change viarfid.AntennaPortSetState. - Link profiles: populated from
rfid.GetActiveLinkProfileName. The selected profile is applied throughrfid.SetCurrentLinkProfile. - Tag handling: customize the
OnAsyncCallbackhandler to add filtering, persistence, or business logic.
- No devices found
- Ensure Windows Bluetooth is enabled and the reader is powered and advertising.
- Toggle
Mac Address Filteringoff and rescan if your device is filtered out.
- Connect fails or never completes
- Move closer to the reader and retry.
- Power-cycle the reader and/or disable/enable Bluetooth on the PC.
- Inventory starts but no tags are shown
- Verify the chosen RF profile is valid for your region.
- Increase power level if needed and ensure tags are within range.
- Unable to exit
- Click
Disconnectfirst. The app requires a clean disconnect before closing.
- Click
- The app window title includes the version and indicates backward compatibility with CS108.
- The library provides additional features (e.g., barcode, engineering APIs) not exercised in this simple demo but available for integration.