Now I wanna add a polling instruction to the RAK7431 to get the value of register 1006 (U1) from slave 1. For this I asked an Online Modbus instruction Builder to build me the correct polling instruction. The generator gave me: SlaveID: 01, Function Code: 04, Register Offset(1005 = 31006): 03ED, Number of registers (1): 0001, CRC16 (48033):A1BB.
In this case i got the code “010403ED0001A1BB”.
Then I added the polling instruction via the service tool which says the following:
AT+POLLTASK
1:010403ED0001A1BB
OK
EVENT:3:LORA_TX_DONE:61:OK
As a response I am looking for a paket that starts with 0104… but I only get “C1003F00020101”. I am not sure if its an error or something else.
Can anybody help me with this?
You are on the right track; this message, “C1003F00020101” is indeed an error code.
This means something is wrong in the communication between the RAK7431 and PLPlano.
Can we see how you have connected the two devices?
Also, what is the response of RAK7431 to this “AT+GET_CONFIG”? (to get the full configuration of the device)
Hi Nikola,
Unfortunate I can not give you a fotograph of the connection now. On Monday i will be able to take a picture and deliver it to you.
The config is the following (AppKey here is deleted for obvious reason):
LoRaMode : LORAWAN
DevEUI : AC1F09FFFE104970
AppEUI : AC1F09FFF8687431
AppKey :
DevAddr : 02104970
AppsKey : 00000000000000000000000000000000
NwksKey : 00000000000000000000000000000000
JoinMode : OTAA
Region : EU868
CLASS : C
PingNb : 128
Confirm : 0
Retry : 3
AdrEnable : 1
Public : 1
channel : 0:868100000:DR0:DR5
1:868300000:DR0:DR5
2:868500000:DR0:DR5
ChanMask : 0007
It all looks fine to me.
Generally, the error you are receiving is due to the slave not answering RAK7431’s poll request. The problem may be from wiring (if you connected the cables on the wrong ports of RAK7431), incorrect configuration of the UART2 (if your slave device and RAK7431 do not match the Baud Rate, Data Bits, etc), or incorrect poll instructions (if you configured a wrong Modbus poll/polls in the RAK7431 to request the data from the slave device ).