CocoaPod Framework for CSL CS710S RFID SDK - A comprehensive iOS framework for interfacing with CSL CS710 RFID handheld readers via Bluetooth Low Energy (BLE).
The CSL-CS710S SDK provides a complete solution for iOS applications to communicate with CSL CS710 series RFID readers. It implements the EPC Class 1 Gen 2 RFID protocol and offers comprehensive functionality for:
- RFID Tag Operations: Inventory, read, write, lock, and kill operations
- BLE Communication: Low-level Bluetooth LE device discovery and connection management
- Tag Access Control: Memory bank operations (RESERVED, EPC, TID, USER)
- Barcode Scanning: Integrated barcode scanner support
- Temperature Tags: Magnus S3 temperature tag support
- Regional Compliance: Support for FCC, ETSI, JP, MY, TW, CN, and other regional frequency standards
- Advanced Features: Impinj extensions, tag focusing, FastID, multi-bank operations
- iOS 13.0 or later
- Xcode 12.0 or later
- CocoaPods 1.10 or later
Add the following line to your Podfile:
pod 'CSL-CS710S'Then run:
pod install- Clone this repository
- Open the
.xcworkspacefile in Xcode - Build the framework for your target platform
- Add the built framework to your project
#import <CSL_CS710S/CSL_CS710S.h>
// Get the singleton instance
CSLRfidAppEngine *appEngine = [CSLRfidAppEngine sharedAppEngine];
CSLBleReader *reader = appEngine.reader;// Set up delegates
reader.delegate = self;
reader.scanDelegate = self;
// Start scanning for devices
[reader startScanDevice];
// Connect to discovered device
[reader connectDevice:peripheral];// Set power level (0-30 dBm)
appEngine.settings.power = 30;
// Set session and target
appEngine.settings.session = S1;
appEngine.settings.target = ToggleAB;
// Set link profile for optimal performance
appEngine.settings.linkProfile = MID_323;
// Apply configurations
[CSLReaderConfigurations setConfigurationsForTags];
[CSLReaderConfigurations setAntennaPortsAndPowerForTags:YES];// Start continuous inventory
[reader startTagInventory];
// Implement delegate to receive tag data
- (void)didReceiveTagResponsePacket:(CSLBleTag *)tag {
NSLog(@"EPC: %@, RSSI: %d", tag.EPC, tag.rssi);
}
// Stop inventory
[reader stopTagInventory];// Read tag memory
[reader setParametersForTagAccess];
[reader TAGACC_BANK:USER acc_bank2:RESERVED];
[reader TAGACC_PTR:0x00];
[reader TAGACC_CNT:4 secondBank:0];
[reader sendHostCommandRead];
// Write tag memory
[reader TAGACC_BANK:USER acc_bank2:RESERVED];
[reader TAGACC_PTR:0x00];
[reader setTAGWRDAT:TAGWRDAT_0 data_word:0x1234 data_offset:0];
[reader sendHostCommandWrite];The SDK is organized into two primary modules:
- CSLBleInterface: Core Bluetooth LE manager for device discovery and connection
- CSLBleReader: Main RFID reader class implementing command/response protocol
- CSLBleReader+AccessControl: Tag access operations (read/write/lock/kill)
- CSLBlePacket: BLE packet structure and encoding
- CSLCircularQueue: Thread-safe circular buffer for packet queuing
- CSLBleTag: Tag data model (EPC, RSSI, phase, PC bits)
- CSLRfidAppEngine: Singleton managing reader lifecycle and settings
- CSLReaderSettings: Application settings and configurations
- CSLReaderInfo: Reader hardware metadata
- CSLReaderFrequency: Regional frequency table generator
- CSLReaderConfigurations: Static configuration utilities
- CSLReaderBattery: Battery monitoring
- CSLReaderBarcode: Barcode scanner integration
- CSLTemperatureTagSettings: Temperature tag configurations
- CS710: Full support with E710 register-based commands
- CS108: Legacy support with CS108 command protocol
Optimized link profiles for different use cases:
- Range-focused:
RANGE_DRM,RANGE_THROUGHPUT_DRM - Throughput-focused:
MAX_THROUGHPUT - Balanced modes:
MID_323,MID_344,MID_103, and 30+ additional profiles - CS710S firmware 2.1.2+: Extended link profile support
Automatic frequency table generation based on OEM data:
- FCC (United States)
- ETSI (Europe)
- JP (Japan)
- MY (Malaysia)
- TW (Taiwan)
- CN (China)
- And more...
- Multi-bank read operations
- Selective tag filtering with mask operations
- Tag focusing (Impinj extension)
- FastID support for M4 tags
- BlockWrite mode configuration
- Tag locking and kill operations
// Called when a tag is read
- (void)didReceiveTagResponsePacket:(CSLBleTag *)tag;
// Called when tag access operation completes
- (void)didReceiveTagAccessData:(CSLBleTag *)tag;
// Called when barcode is scanned
- (void)didReceiveBarcodeData:(CSLReaderBarcode *)barcode;
// Called when connection status changes
- (void)didInterfaceChangeConnectStatus:(CSLBleInterface *)sender;
// Called when trigger key is pressed
- (void)didTriggerKeyChangedState:(BOOL)state;
// Called when battery level changes
- (void)didReceiveBatteryLevelIndicator:(int)batteryPercentage;// Called when a new device is discovered
- (void)deviceListWasUpdated:(CBPeripheral *)deviceDiscovered;
// Called when device connection succeeds
- (void)didConnectToDevice:(CBPeripheral *)deviceConnected;
// Called when device disconnects
- (void)didDisconnectDevice:(CBPeripheral *)deviceDisconnected;
// Called when device connection fails
- (void)didFailedToConnect:(CBPeripheral *)deviceFailedToConnect;Settings are automatically saved to and loaded from NSUserDefaults:
// Save current settings
[appEngine saveSettingsToUserDefaults];
// Reload settings
[appEngine reloadSettingsFromUserDefaults];
// Temperature tag settings
[appEngine saveTemperatureTagSettingsToUserDefaults];
[appEngine reloadTemperatureTagSettingsFromUserDefaults];- Command operations are synchronous with timeout mechanisms
- Critical sections are protected with
@synchronizedblocks - Packet decoding runs on background threads
- Important: Reader operations are NOT thread-safe at the command level - always wait for completion before issuing the next command
- Removed MQTTClient dependency
- Streamlined codebase for pure RFID operations
- Updated framework imports to use module syntax
- Bug fix on
getRfidFwVersionNumber - Improved firmware version detection
- Added support for link profiles of CS710S RFID firmware 2.1.2+
- Extended link profile options (30+ profiles)
- Updated device scanning functionality
- Improved BLE connection stability
- Implemented regional and frequency configurations for CS710S
- Enhanced OEM data handling
# Clone the repository
git clone https://github.com/cslrfid/CSL-CS710S.git
cd CSL-CS710S
# Open the workspace (NOT the .xcodeproj)
open CSL-CS710S.xcworkspace
# Build via command line
xcodebuild -workspace CSL-CS710S.xcworkspace \
-scheme CSL-CS710S \
-configuration Release
# Validate podspec
pod spec lint CSL-CS710S.podspec// Enable pre-filter for specific EPC mask
appEngine.settings.prefilterIsEnabled = YES;
appEngine.settings.prefilterBank = EPC;
appEngine.settings.prefilterMask = @"E2801170";
appEngine.settings.prefilterOffset = 32;
[CSLReaderConfigurations setConfigurationsForTags];
[reader startTagInventory];// Configure for temperature tags
appEngine.temperatureSettings.sensorType = MAGNUSS3;
appEngine.temperatureSettings.unit = YES; // Celsius
appEngine.temperatureSettings.isTemperatureAlertEnabled = YES;
appEngine.temperatureSettings.temperatureAlertLowerLimit = 2.0;
appEngine.temperatureSettings.temperatureAlertUpperLimit = 8.0;
[CSLReaderConfigurations setConfigurationsForTemperatureTags];
[CSLReaderConfigurations setAntennaPortsAndPowerForTemperatureTags:YES];
[reader startTagInventory];// Set access password
[reader TAGACC_ACCPWD:0x12345678];
// Configure write operation
[reader TAGACC_BANK:USER acc_bank2:RESERVED];
[reader TAGACC_PTR:0x00];
[reader TAGACC_CNT:4 secondBank:0];
// Write data
for (int i = 0; i < 4; i++) {
[reader setTAGWRDAT:TAGWRDAT_0 + i data_word:writeData[i] data_offset:i];
}
[reader sendHostCommandWrite];- Ensure Bluetooth is enabled on the iOS device
- Check that the reader is powered on and within range
- Verify the reader firmware version is compatible
- Try disconnecting and reconnecting
- Adjust power level based on environment (reduce power in dense tag environments)
- Select appropriate link profile for your use case
- Enable tag focusing for faster singulation
- Configure Q value based on tag population
- Ensure correct region is selected in settings
- Read OEM data before configuring frequencies
- Verify reader hardware supports the selected region
This project is licensed under the MIT License - see the LICENSE file for details.
Convergence Systems Limited Leading provider of RFID solutions and hardware
Note: This SDK is designed for professional RFID applications. Ensure compliance with local regulations regarding RF emissions and frequency usage.