附录
错误代码表
序号 |
值 |
名 称 |
描 叙 |
1 |
0x10 |
command_success |
命令成功完成 |
2 |
0x11 |
command_fail |
命令执行失败 |
3 |
0x20 |
mcu_reset_error |
CPU复位错误 |
4 |
0x21 |
cw_on_error |
打开CW错误 |
5 |
0x22 |
antenna_missing_error |
天线未连接 |
6 |
0x23 |
write_flash_error |
写Flash错误 |
7 |
0x24 |
read_flash_error |
读Flash错误 |
8 |
0x25 |
set_output_power_error |
设置发射功率错误 |
9 |
0x31 |
tag_inventory_error |
盘存标签错误 |
10 |
0x32 |
tag_read_error |
读标签错误 |
11 |
0x33 |
tag_write_error |
写标签错误 |
12 |
0x34 |
tag_lock_error |
锁定标签错误 |
13 |
0x35 |
tag_kill_error |
灭活标签错误 |
14 |
0x36 |
no_tag_error |
无可操作标签错误 |
15 |
0x37 |
inventory_ok_but_access_fail |
成功盘存但访问失败 |
16 |
0x40 |
access_or_password_error |
访问标签错误或访问密码错误 |
17 |
0x41 |
parameter_invalid |
无效的参数 |
18 |
0x42 |
parameter_invalid_wordCnt_too_long |
wordCnt参数超过规定长度 |
19 |
0x43 |
parameter_invalid_membank_out_of_range |
MemBank参数超出范围 |
20 |
0x44 |
parameter_invalid_lock_region_out_of_range |
Lock数据区参数超出范围 |
21 |
0x45 |
parameter_invalid_lock_action_out_of_range |
LockType参数超出范围 |
22 |
0x46 |
parameter_reader_address_invalid |
读写器地址无效 |
23 |
0x47 |
parameter_invalid_antenna_id_out_of_range |
Antenna_id 超出范围 |
24 |
0x48 |
parameter_invalid_output_power_out_of_range |
输出功率参数超出范围 |
频率参数对应表
频率参数 |
对应频点 |
频率参数 |
对应频点 |
0(0x00) |
865.00 MHz |
30(0x1E) |
913.50 MHz |
1(0x01) |
865.50 MHz |
31(0x1F) |
914.00 MHz |
2(0x02) |
866.00 MHz |
32(0x20) |
914.50 MHz |
3(0x03) |
866.50 MHz |
33(0x21) |
915.00 MHz |
4(0x04) |
867.00 MHz |
34(0x22) |
915.50 MHz |
5(0x05) |
867.50 MHz |
35(0x23) |
916.00 MHz |
6(0x06) |
868.00 MHz |
36(0x24) |
916.50 MHz |
7(0x07) |
902.00 MHz |
37(0x25) |
917.00 MHz |
8(0x08) |
902.50 MHz |
38(0x26) |
917.50 MHz |
9(0x09) |
903.00 MHz |
39(0x27) |
918.00 MHz |
10(0x0A) |
903.50 MHz |
40(0x28) |
918.50 MHz |
11(0x0B) |
904.00 MHz |
41(0x29) |
919.00 MHz |
12(0x0C) |
904.50 MHz |
42(0x2A) |
919.50 MHz |
13(0x0D) |
905.00 MHz |
43(0x2B) |
920.00 MHz |
14(0x0E) |
905.50 MHz |
44(0x2C) |
920.50 MHz |
15(0x0F) |
906.00 MHz |
45(0x2D) |
921.00 MHz |
16(0x10) |
906.50 MHz |
46(0x2E) |
921.50 MHz |
17(0x11) |
907.00 MHz |
47(0x2F) |
922.00 MHz |
18(0x12) |
907.50 MHz |
48(0x30) |
922.50 MHz |
19(0x13) |
908.00 MHz |
49(0x31) |
923.00 MHz |
20(0x14) |
908.50 MHz |
50(0x32) |
923.50 MHz |
21(0x15) |
909.00 MHz |
51(0x33) |
924.00 MHz |
22(0x16) |
909.50 MHz |
52(0x34) |
924.50 MHz |
23(0x17) |
910.00 MHz |
53(0x35) |
925.00 MHz |
24(0x18) |
910.50 MHz |
54(0x36) |
925.50 MHz |
25(0x19) |
911.00 MHz |
55(0x37) |
926.00 MHz |
26(0x1A) |
911.50 MHz |
56(0x38) |
926.50 MHz |
27(0x1B) |
912.00 MHz |
57(0x39) |
927.00 MHz |
28(0x1C) |
912.50 MHz |
58(0x3A) |
927.50 MHz |
29(0x1D) |
913.00 MHz |
59(0x3B) |
928.00 MHz |
int GetRSSI(uint8_t *buff,uint8_t mode)
{
uint8_t offset = 0;
union{
uint32_t u32;
uint8_t chr[4];
}Rssi;
if(mode == 0){
offset = 167;
}
else if(mode == 1){
offset = 164;
}
else if(mode == 2){
offset = 163;
}
else if(mode == 3){
offse = 162;
}
Rssi.chr[3] = buff[0];
Rssi.chr[2] = buff[1];
Rssi.chr[1] = buff[2];
Rssi.chr[0] = buff[3];
Rssi.u32 -= 6144;
if(Rssi.u32 < 8193)Rssi.u32 = 8193;
Rssi.u32 = (20*log10(Rssi.u32))-offset;
return (Rssi.u32);
}
校验和计算方法(C语言描述)
uint8_t CheckSum(uint8_t *uBuff, uint8_t uBuffLen)
{
unsigned char i, uSum = 0;
for (i = 0; i < uBuffLen; i++)
{
uSum = uSum + uBuff[i];
}
uSum = (~uSum) + 1;
return uSum;
}