# AsReaderRFIDDevice ## `sharedInstance` Returns the singleton instance of `AsReaderRFIDDevice`. Used to share a single instance throughout the application. ```objectivec + (instancetype)sharedInstance; ``` --- ## `startReadTagsAndRssiWithTagNum` Starts reading RFID tags along with RSSI (signal strength). **After this method is executed, the result is returned via [`pcEpcRssiReceived`](./5_AsReaderRFIDProtocol.md#pcepcrssireceived).** > ⚠️ **Note** > `ASR-M30S` does not support `maxTags` or `repeatCycle` settings. ```objectivec - (BOOL)startReadTagsAndRssiWithTagNum:(int)maxTags maxTime:(int)maxTime repeatCycle:(int)repeatCycle; ``` ### Parameters ```{list-table} :header-rows: 1 :widths: 20 15 65 * - Name - Type - Description * - maxTags - int - Maximum number of tags to read * - maxTime - int - Maximum read time per scan * - repeatCycle - int - Number of times to repeat the read cycle ``` ### Return Value ```{list-table} :header-rows: 1 :widths: 20 80 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice startReadTagsAndRssiWithTagNum:1 maxTime:1 repeatCycle:1]; if (status) { // Success } else { // Failure } ``` --- ## `startReadTagAndTidWithTagNum` Reads both EPC and TID from tags. **After this method is executed, the result is returned via [`epcReceived:tid:`](./5_AsReaderRFIDProtocol.md#epcreceived-tid).** > ⚠️ **Note** > `ASR-M30S` does not support `maxTags` or `repeatCycle` settings. ```objectivec - (BOOL)startReadTagAndTidWithTagNum:(int)maxTags maxTime:(int)maxTime repeatCycle:(int)repeatCycle; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - `maxTags` - `int` - Maximum number of tags to read * - `maxTime` - `int` - Maximum read time per cycle (in milliseconds) * - `repeatCycle` - `int` - Number of repeat cycles ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice startReadTagAndTidWithTagNum:5 maxTime:300 repeatCycle:2]; if (status) { // Success } else { // Failure } ``` --- ## `startScan` Starts scanning RFID tags with the AsReader device. The result is returned via [`receivedScanData`](../common/common/8_AsReaderDeviceProtocol.md#receivedscandata). > ⚠️ **Note** > `ASR-M30S` does not support `numberOfTags` or `repeatCycle` settings. ```objectivec - (BOOL)startScan:(int)numberOfTags readUntilInSec:(int)readUntilInSec repeatCycle:(int)repeatCycle; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - `numberOfTags` - int - Maximum number of tags to read * - `readUntilInSec` - int - Maximum scan time in seconds * - `repeatCycle` - int - Number of repeat cycles ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice startScan:1 readUntilInSec:1 repeatCycle:1]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `stopScan` Stops RFID tag scanning. Call this method after starting a scan. ```objectivec - (BOOL)stopScan; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice stopScan]; if (status) { // Success } else { // Failure } ``` --- ## `getChannel` Gets the RF channel used in non-FH (non-frequency-hopping) mode. The result is returned via [`channelReceived`](./5_AsReaderRFIDProtocol.md#channelreceived). > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getChannel; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getChannel]; if (status) { // Success } else { // Failure } ``` --- ## `setChannel` Sets the RF channel to use in non-FH (non-frequency-hopping) mode. The result is returned via [`didSetChannelParamReceived`](./5_AsReaderRFIDProtocol.md#didsetchannelparamreceived). > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setChannel:(int)channel channelOffset:(int)channelOffset; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - channel - int - Channel number * - channelOffset - int - Offset value for mirrored subcarrier ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setChannel:1 channelOffset:0]; if (status) { // Success } else { // Failure } ``` --- ## `getFhLbtParameter` Retrieves FH and LBT parameters. The result is returned via the following methods: - [`fhLbtReceived`](./5_AsReaderRFIDProtocol.md#fhlbtreceived) - [`rfidOnOffTimeReceived`](./5_AsReaderRFIDProtocol.md#rfidonofftimereceived) > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getFhLbtParameter; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getFhLbtParameter]; if (status) { // Success } else { // Failure } ``` --- ## `getOutputPowerLevel` Gets the current, maximum, and minimum output power levels. The result is returned via [`txPowerLevelReceived`](./5_AsReaderRFIDProtocol.md#txpowerlevelreceived). ```objectivec - (BOOL)getOutputPowerLevel; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getOutputPowerLevel]; if (status) { // Success } else { // Failure } ``` --- ## `setOutputPowerLevel` Sets the output power level. The result is returned via [`didSetOutputPowerLevel`](./5_AsReaderRFIDProtocol.md#didsetoutputpowerlevel). ```objectivec - (BOOL)setOutputPowerLevel:(int)powerLevel; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - powerLevel - int - Output level (unit: dBm, range for US and EU regions: 13–27 for ASR-03xD/023xD and 1~27 for ASR-M30S) ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setOutputPowerLevel:27]; if (status) { // Success } else { // Failure } ``` --- ## `writeTagMemoryWithAccessPassword` Writes data to a tag. The result is returned via [`writeTagMemoryWithAccessPassword`](./5_AsReaderRFIDProtocol.md#id39). ```objectivec - (BOOL)writeTagMemoryWithAccessPassword:(int)accessPassword epc:(NSData *)epc memoryBank:(int)memoryBank startAddress:(int)startAddress dataToWrite:(NSData *)dataToWrite; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - accessPassword - int - Access password (e.g., 00000000) * - epc - NSData - Target tag * - memoryBank - int - Tag memory bank: 0=RFU, 1=EPC, 2=TID, 3=User * - startAddress - int - Starting address (in word units) * - dataToWrite - NSData - Data to write ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice writeTagMemoryWithAccessPassword:11111111 epc:epcs memoryBank:1 startAddress:1 dataToWrite:data]; if (status) { // Success } else { // Failure } ``` --- ## `killTagWithPassword` Kills a tag. The result is returned via [`killedReceived`](./5_AsReaderRFIDProtocol.md#killedreceived). > ⚠️ **Note** > A kill password must be set to kill a tag. ```objectivec - (BOOL)killTagWithPassword:(int)killpassword epc:(NSData *)epc; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - killpassword - int - Kill password (tags cannot be killed with 00000000) * - epc - NSData - EPC of the tag to kill ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice killTagWithPassword:11111111 epc:epc]; if (status) { // Success } else { // Failure } ``` --- ## `lockTagMemoryWithAccessPassword` Locks the tag memory. **After executing this method, the result will be returned via the callback [`lockedReceived`](./5_AsReaderRFIDProtocol.md#lockedreceived).** ```objectivec - (BOOL)lockTagMemoryWithAccessPassword:(int)accessPassword epc:(NSData *)epc lockData:(int)lockData; ``` ### Parameters ```{list-table} :header-rows: 1 :widths: 20 15 65 * - Name - Type - Description * - accessPassword - int - Access password (Cannot lock if set to 00000000) * - epc - NSData - EPC of the tag to be locked * - lockData - int - Lock data ``` ### Return Value ```{list-table} :header-rows: 1 :widths: 20 80 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice lockTagMemoryWithAccessPassword:11111111 epc:epc lockData:1]; if (status) { // Success } else { // Failure } ``` --- ## `getSession` Retrieves the current session value. **After executing this method, the result will be returned via the callback [`sessionReceived`](./5_AsReaderRFIDProtocol.md#sessionreceived).** ```objectivec - (BOOL)getSession; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - Return - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice getSession]; if (status) { // Success } else { // Failure } ``` --- ## `setSession` Sets the session value. **After executing this method, the result will be returned via the callback [`didSetSession`](./5_AsReaderRFIDProtocol.md#didsetsession).** ```objectivec - (BOOL)setSession:(int)session; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - session - int - Session value: 0: S0, 1: S1, 2: S2, 3: S3 ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setSession:1]; ``` --- ## `getAnticollision` Retrieves the anti-collision settings. **After executing this method, the result will be returned via the callback [`anticolParamReceived`](./5_AsReaderRFIDProtocol.md#anticolparamreceived).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getAnticollision; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice getAnticollision]; ``` --- ## `setAnticollision` Sets anti-collision parameters. **After executing this method, the result will be returned via the callback [`didSetAntiCollision`](./5_AsReaderRFIDProtocol.md#didsetanticollision).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setAnticollision:(int)mode Counter:(int)counter; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - mode - int - 0: Fixed Q, 1: Dynamic Q * - counter - int - Counter (Default is 1) ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setAnticollision:1 Counter:1]; ``` --- ## `updateRegistry` Updates the registry. **After executing this method, the result will be returned via the callback [`updatedRegistry`](./5_AsReaderRFIDProtocol.md#updatedregistry).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)updateRegistry; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice updateRegistry]; ``` --- ## `getRFIDModuleVersion` Retrieves basic information about the RFID reader. **After executing this method, the result will be returned via the callback [`rfidModuleVersionReceived`](./5_AsReaderRFIDProtocol.md#rfidmoduleversionreceived).** ```objectivec - (BOOL)getRFIDModuleVersion; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice getRFIDModuleVersion]; ``` --- ## `setHoppingOnOff` Sets frequency hopping and LBT parameters. **After executing this method, the result will be returned via the callback [`didSetFhLbt`](./5_AsReaderRFIDProtocol.md#didsetfhlbt).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setHoppingOnOff:(BOOL)isOn; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - isOn - BOOL - YES: Frequency hopping 2 / LBT 1, NO: Frequency hopping 1 / LBT 2 ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setHoppingOnOff:YES]; ``` --- ## `writeTagMemoryWithEPC` Writes data to a tag. **After executing this method, the result will be returned via the callback [`writtenReceived`](./5_AsReaderRFIDProtocol.md#writtenreceived).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)writeTagMemoryWithEPC:(NSData *)epc dataToWriteAscii:(NSString *)dataToWrite; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - epc - NSData - EPC of the tag to write * - dataToWrite - NSString - Data to be written ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - Method result: YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice writeTagMemoryWithEPC:epc dataToWriteAscii:dataToWrite]; ``` --- ## `readTagWithAccessPassword` Reads the specified memory bank of a tag using an access password. **After executing this method, the result will be returned via the callback [`tagMemoryReceived`](./5_AsReaderRFIDProtocol.md#tagmemoryreceived).** > ⚠️ **Note** > On ASR-M30S, if `dataLength` is 0 and the memoryBank is EPC or TID, data is read from `startAddress` to the end. For other memory banks, this will result in an error. ```objectivec - (BOOL)readTagWithAccessPassword:(int)accessPassword epc:(NSData*)epc memoryBank:(int)memoryBank startAddress:(int)startAddress dataLength:(int)dataLength; ``` ### Parameters ```{list-table} :header-rows: 1 * - Name - Type - Description * - accessPassword - int - Access password * - epc - NSData - EPC data of the target tag * - memoryBank - int - Tag memory bank (0: RFU, 1: EPC, 2: TID, 3: User) * - startAddress - int - Start address (word units) * - dataLength - int - Length to read (word units) ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice readTagWithAccessPassword:11111111 epc:epcs memoryBank:1 startAddress:1 dataLength:dataLength]; if (status) { // Success handling } else { // Failure handling } ``` --- ## `setOptimumFrequencyHoppingTable` Sets the optimal frequency hopping table. **After executing this method, the result will be returned via the callback [`didSetOptiFreqHPTable`](./5_AsReaderRFIDProtocol.md#didsetoptifreqhptable).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setOptimumFrequencyHoppingTable; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setOptimumFrequencyHoppingTable]; if (status) { // Success } else { // Failure } ``` --- ## `getFrequencyHoppingMode` Retrieves the frequency hopping mode. **After executing this method, the result will be returned via the callback [`hoppingTableReceived`](./5_AsReaderRFIDProtocol.md#hoppingtablereceived).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getFrequencyHoppingMode; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice getFrequencyHoppingMode]; if (status) { // Success } else { // Failure } ``` --- ## `setFrequencyHoppingMode` Sets the frequency hopping mode. **After executing this method, the result will be returned via [`didSetFHmodeChanged`](./5_AsReaderRFIDProtocol.md#didsetfhmodechanged).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setFrequencyHoppingMode:(int)mode; ``` ### Parameters ```{list-table} :header-rows: 1 * - Item - Type - Description * - mode - int - Frequency hopping mode. The value's meaning depends on the protocol. ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setFrequencyHoppingMode:1]; if (status) { // Success } else { // Failure } ``` --- ## `getRegion` Gets the current region setting of the device. **After executing this method, the result will be returned via [`regionReceived`](./5_AsReaderRFIDProtocol.md#regionreceived).** ```objectivec - (BOOL)getRegion; ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice getRegion]; if (status) { // Success } else { // Failure } ``` --- ## `setRegion` Sets the region setting of the device. ```objectivec - (BOOL)setRegion:(int)region; ``` ### Parameters ```{list-table} :header-rows: 1 * - Item - Type - Description * - region - int - Region code (e.g., 17 = Korea, 33 = North America, etc.) ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setRegion:82]; if (status) { // Success } else { // Failure } ``` --- ## `setReadTime` Sets the tag reading on/off time. **After executing this method, the result will be returned via [`onOffTimeChanged`](./5_AsReaderRFIDProtocol.md#onofftimechanged).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setReadTime:(int)onTime offTime:(int)offTime; ``` ### Parameters ```{list-table} :header-rows: 1 * - Item - Type - Description * - onTime - int - Reading active time (e.g., in milliseconds) * - offTime - int - Reading pause time (e.g., in milliseconds) ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice setReadTime:100 offTime:200]; if (status) { // Success } else { // Failure } ``` --- ## `startReadTagsRFM` Starts reading RFID tags with sensor data. **After executing this method, the result will be returned via [`pcEpcSensorDataReceived`](./5_AsReaderRFIDProtocol.md#pcepcsensordatareceived).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)startReadTagsRFM:(int)maxTags maxTime:(int)maxTime repeatCycle:(int)repeatCycle; ``` ### Parameters ```{list-table} :header-rows: 1 * - Item - Type - Description * - maxTags - int - Maximum number of tags to read * - maxTime - int - Maximum time for a single read session * - repeatCycle - int - Number of repeat cycles ``` ### Return Value ```{list-table} :header-rows: 1 * - Type - Description * - BOOL - YES: Success, NO: Failure ``` **Sample Code**: ```objectivec BOOL status = [asReaderDevice startReadTagsRFM:10 maxTime:500 repeatCycle:2]; if (status) { // Success } else { // Failure } ``` --- ## `getSelectParameter` Retrieves the tag selection parameters. **After executing this method, the result will be returned via [`selectParamReceived`](./5_AsReaderRFIDProtocol.md#selectparamreceived).** > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getSelectParameter; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` **Sample Code** ```objectivec BOOL status = [asReaderDevice getSelectParameter]; if (status) { // Successfully executed } else { // Execution failed } ``` --- ## `setSelectParameter` Sets the tag selection parameters. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setSelectParameter:(int)target action:(int)action memoryBank:(int)memoryBank pointer:(int)pointer length:(int)length truncate:(int)truncate mask:(NSData *)mask; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Description * - target - Session: S0(000), S1(001), S2(010), S3(011), SL(100) * - action - Action specified according to ISO18000-6C * - memoryBank - Memory bank: RFU(00), EPC(01), TID(10), User(11) * - pointer - Starting address of the filter memory * - length - Length of the filter data * - truncate - Whether to truncate tag data when matched: Enable(1), Disable(0) * - mask - Filter data body ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` **Sample Code** ```objectivec uint8_t bytes[] = { 0x01, 0x02, 0x03 }; NSData *selParamData = [NSData dataWithBytes:bytes length:sizeof(bytes)]; BOOL status = [asReaderDevice setSelectParameter:selParamData]; if (status) { // Successfully executed } else { // Execution failed } ``` > **Note** > Be sure to configure the parameters according to the device specifications. Incorrect settings may cause unexpected behavior. --- ## `setQueryParam` Sets the Query parameters of the 18000-6C Air Interface protocol. Used for detailed control such as session behavior and slot count. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setQueryParam:(int)divideRatio m:(int)m trext:(int)trext selection:(int)selection session:(int)session target:(int)target qValue:(int)qValue; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `divideRatio` - `int` - ・`0`: DR = 8
・`1`: DR = 64/3 * - `m` - `int` - ・`0`: M = 1
・`1`: M = 2
・`2`: M = 4
・`3`: M = 8 * - `trext` - `int` - ・`0`: No pilot tone
・`1`: With pilot tone * - `selection` - `int` - ・`0` or `1`: All
・`2`: ~SL
・`3`: SL * - `session` - `int` - ・`0`: S0
・`1`: S1
・`2`: S2
・`3`: S3 * - `target` - `int` - ・`0`: A
・`1`: B * - `qValue` - `int` - Slot count in range 0–15 (power of 2: e.g., `4` → 16 slots) ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success
NO: Failure ``` --- ## `getModulation` Retrieves the current modulation settings. **After executing this method, the result will be returned via [`modulationParamReceived:rxMod:dr:`](./5_AsReaderRFIDProtocol.md#modulationparamreceived-rxmod-dr).** ```objectivec - (BOOL)getModulation; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` --- ## `setModulationBLF` Sets the modulation mode. **After executing this method, the result will be returned via [`didSetModulation`](./5_AsReaderRFIDProtocol.md#didsetmodulation).** ```objectivec - (BOOL)setModulationBLF:(int)blf rxMod:(int)rxMod dr:(int)dr; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `blf` - `int` - Example: 160 (BLF_160), 250 (BLF_250), 320, 640, etc. * - `rxMod` - `int` - Example: 0 (FM0), 1 (M2), 2 (M4), 3 (M8) * - `dr` - `int` - Example: 0 (8), 1 (64/3) ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` --- ## `getRSSIThreshold` Retrieves the RSSI threshold setting. **After executing this method, the result will be returned via [`rssiThresholdReceived:`](./5_AsReaderRFIDProtocol.md#rssithresholdreceived).** ```objectivec - (BOOL)getRSSIThreshold; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` --- ## `setRSSIThreshold` Sets the RSSI threshold. ```objectivec - (BOOL)setRSSIThreshold:(uint16_t)threshold; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `threshold` - `uint16_t` - RSSI threshold value to set ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - YES: Success, NO: Failure ``` --- ## `setFrequencyHoppingTableSize` Sets the frequency hopping table. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setFrequencyHoppingTableSize:(int)tableSize channels:(NSData *)channels; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `tableSize` - `int` - Size of the table (in bytes) * - `channels` - `NSData` - List of channel numbers ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` --- ## `getQueryParameter` Retrieves the query parameters (Query A/I Class C). > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getQueryParameter; ``` --- ## `setRfCw` Sets RF CW signal output. *This command is only valid in idle state.* > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setRfCw:(BOOL)on; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `on` - `BOOL` - CW signal output: YES = On, NO = Off ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` --- ## `blockEraseTagMemoryWithAccessPassword` Erases tag memory in blocks. ```objectivec - (BOOL)blockEraseTagMemoryWithAccessPassword:(int)accessPassword epc:(NSData *)epc memoryBank:(int)memoryBank startAddress:(int)startAddress dataLength:(int)dataLength; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `accessPassword` - `int` - Access password * - `epc` - `NSData` - EPC of the target tag * - `memoryBank` - `int` - Memory bank (0: RFU, 1: EPC, 2: TID, 3: User) * - `startAddress` - `int` - Start address (word-based) * - `dataLength` - `int` - Data length to erase (in words) ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` --- ## `getTemperature` Retrieves the temperature. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getTemperature; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getTemperature]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getRegistryItem` Retrieves a registry item. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)getRegistryItem:(int)registryItem; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `registryItem` - int - Registry item code Examples: 0x0000: Registry version 0x0001: Firmware date 0x0002: Frequency band 0x0003: Output power 0x0004: FH/LBT 0x0005: Anti-collision mode 0x0006: Modulation mode 0x0007: Query (Q) 0x0008: Frequency hopping table 0x0009: Output table ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getRegistryItem:1]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setFrequencyHoppingMode` Sets the frequency hopping mode. > ⚠️ **Note** > Some models such as **ASR-M30S** does not support this function. ```objectivec - (BOOL)setFrequencyHoppingMode:(int)mode; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `mode` - int - Frequency hopping mode 0: Normal mode 1: Smart frequency hopping mode ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setFrequencyHoppingMode:1]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setReadRSSIMode` Sets whether to read the tag's RSSI value in RFID mode. ```objectivec - (void)setReadRSSIMode:(BOOL)isReadRSSIMode; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `isReadRSSIMode` - BOOL - YES: Read RSSI NO: Do not read ``` ### Sample Code ```objectivec [AsReaderDevice setReadRSSIMode:YES]; ``` --- ## `getAutoOffTime` Gets the auto-off time of the device. **The result is returned via [`didGetAutoOffTimeReceived`](./5_AsReaderRFIDProtocol.md#didgetautoofftimereceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getAutoOffTime; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getAutoOffTime]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setAutoOffTime` Sets the auto-off time of the device. **The result is returned via [`didSetAutoOffTime`](./5_AsReaderRFIDProtocol.md#didsetautoofftime) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setAutoOffTime:(int)time; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `time` - int - Auto-off time (seconds) Range: 0–1800 seconds 0 = No auto-off ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setAutoOffTime:0]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getContinuousMode` Gets the tag read mode (single or continuous). **The result is returned via [`didGetContinuousModeReceived`](./5_AsReaderRFIDProtocol.md#didgetcontinuousmodereceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getContinuousMode; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getContinuousMode]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setContinuousMode` Sets the tag read mode (single or continuous). **The result is returned via [`didSetContinuousMode`](./5_AsReaderRFIDProtocol.md#didsetcontinuousmode) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setContinuousMode:(BOOL)isContinuousMode; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Item - Type - Description * - `isContinuousMode` - BOOL - YES: Continuous mode NO: Single mode ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setContinuousMode:YES]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getQValue` Gets the Q value. **The result is returned via [`didGetQValueReceived`](./5_AsReaderRFIDProtocol.md#didGetQValueReceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getQValue; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getQValue]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setQValue` Sets the Q value. **The result is returned via [`didSetQValue`](./5_AsReaderRFIDProtocol.md#didSetQValue) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setQValue:(int)value; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Name - Type - Description * - `value` - int - Q value Range: 0~15 ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setQValue:10]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getSessionFlag` Gets the Session Flag. **The result is returned via [`didGetSessionFlagReceived`](./5_AsReaderRFIDProtocol.md#didGetSessionFlagReceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getSessionFlag; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getSessionFlag]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setSessionFlag` Sets the Session Flag. **The result is returned via [`didSetSessionFlag`](./5_AsReaderRFIDProtocol.md#didSetSessionFlag) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setSessionFlag:(int)sessionFlag; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Name - Type - Description * - `sessionFlag` - int - Session Flag 0:A, 1:B, 2:A or B ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setSessionFlag:1]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getHidMode` Gets the HID mode. **The result is returned via [`didGetHidModeReceived`](./5_AsReaderRFIDProtocol.md#didGetHidModeReceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getHidMode; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getHidMode]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setHidMode` Sets the HID mode. **The result is returned via [`didSetHidMode`](./5_AsReaderRFIDProtocol.md#didSetHidMode) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setHidMode:(BOOL)hidMode; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Name - Type - Description * - `hidMode` - BOOL - YES: HID mode. NO: Not HID mode. ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setHidMode:YES]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getDutyRatio` Gets the duty ratio. **The result is returned via [`didGetDutyRatioReceived`](./5_AsReaderRFIDProtocol.md#didGetDutyRatioReceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getDutyRatio; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getDutyRatio]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setDutyRatio` Sets the duty ratio. **The result is returned via [`didSetDutyRatio`](./5_AsReaderRFIDProtocol.md#didSetDutyRatio) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setDutyRatio:(int)dutyRatio; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Name - Type - Description * - `dutyRatio` - int - Duty ratio. Range: 0~15 0: Full load; 1: 5%; 2: 10%; 3: 15%; 4: 20%; 5: 25%; 6: 30%; 7: 35%; 8: 40%; 9: 45%; 10: 50%; 11: 55%; 12: 60%; 13: 70%; 14: 80%; 15: 90% *Note: For example, 5% means stopping for 5% of the base time. ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setDutyRatio:10]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `getDutyRatioBaseTime` Gets the duty ratio base time. **The result is returned via [`didGetDutyRatioBaseTimeReceived`](./5_AsReaderRFIDProtocol.md#didGetDutyRatioBaseTimeReceived) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)getDutyRatioBaseTime; ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice getDutyRatioBaseTime]; if (status) { // Method executed successfully } else { // Method execution failed } ``` --- ## `setDutyRatioBaseTime` Sets the duty ratio base time. **The result is returned via [`didSetDutyRatioBaseTime`](./5_AsReaderRFIDProtocol.md#didSetDutyRatioBaseTime) after execution.** > ⚠️ **Note** > This function is only supported by **some models**, such as **ASR-M30S**. ```objectivec - (BOOL)setDutyRatioBaseTime:(int)dutyRatioBaseTime; ``` ### Parameters ```{list-table} :align: left :class: list-table * - Name - Type - Description * - `dutyRatioBaseTime` - int - Duty ratio base time. Range: 0~65000 ms ``` ### Return Value ```{list-table} :align: left :class: list-table * - Type - Description * - `BOOL` - Result of execution: YES = Success, NO = Failure ``` ### Sample Code ```objectivec BOOL status = [asReaderDevice setDutyRatioBaseTime:10]; if (status) { // Method executed successfully } else { // Method execution failed } ```