Thanks for the reply @carlrowan, I’ll provide all I can think of below. The idea of the screenshot showing the Simply Modbus was to show that the device is returning something…unlike the 2470. I also use a RAK7431 with this device and it works ok too.
Here is the settings of the device I’m connecting to…
Here is the poll that I currently use with the 7431, I’d like to get these producing a response from the slave.
01040002001451C5. So that’s 20 registers.
Here’s a paste of the RAK Serial Port Tool with the startup of the 7431…
EVENT:0:STARTUP
SYSLOG:4:OTAA Join Request
SYSLOG:4:OTAA Join Success
EVENT:1:JOIN_NETWORK
SYSLOG:4:LoRa Tx :
SYSLOG:4:DTU Tx : 01040002001451C5
SYSLOG:4:DTU Rx : 0104280000000045E9BEF6000000000000000045668C294159EB853EFAE148000000000000000044E1F7AEECC3
SYSLOG:4:LoRa Tx :
SYSLOG:4:LoRa Tx : 810001002E010104280000000045E9BEF6000000000000000045668C294159EB853EFAE148000000000000000044E1F7AEECC3
The decoded payload looks good from this device…ttn result…
“decoded_payload”: {
“1”: 0,
“2”: 7479.8701171875,
“3”: 0,
“4”: 0,
“5”: 3688.760009765625,
“6”: 13.619999885559082,
“7”: 0.49000000953674316,
“8”: 0,
“9”: 0,
“10”: 1807.739990234375
And this is the payload decoder…
function Decoder(bytes, port) {
var decoded = {};
// In your example payloads, Modbus starts after a 6-byte RAK header
var modbusStart = 6;
// Modbus RTU response layout:
// [slave][func][byteCount][data…][crcLo][crcHi]
var byteCount = bytes[modbusStart + 2];
var dataStart = modbusStart + 3;
// Safety: if payload is shorter than expected, bail gracefully
if (bytes.length < dataStart + byteCount) {
decoded[“error”] = “Truncated payload”;
return decoded;
}
// We expect float32 values (4 bytes each): 40 bytes => 10 floats
var buf = new ArrayBuffer(4);
var view = new DataView(buf);
var fieldId = 1; // this recreates your old ids: 1…10
for (var i = 0; i + 3 < byteCount; i += 4) {
view.setUint8(0, bytes[dataStart + i + 0]);
view.setUint8(1, bytes[dataStart + i + 1]);
view.setUint8(2, bytes[dataStart + i + 2]);
view.setUint8(3, bytes[dataStart + i + 3]);
// Big-endian float32 (matched your sample)
var num = view.getFloat32(0, false);
decoded[JSON.stringify(fieldId)] = num;
fieldId++;
}
return decoded;
}
So with all that information, I go back to the 2470, check the settings, but every time I select the “Check”, I get zero response.
Here are more screenshots of what I’m seeing…btw I’m using a usb c to connect to the RAK2470, as I can’t seem to get the usb serial connection (second one, first one failed) to the device. It seems to connect fine and I/O.box picks it up immediately. Is that ok?
No matter how I send the command, I get this…

Here is the setup I’m using to get the poll to match the RAK7431 exactly, however I still get the same response…no response from slave device (It’s actually spelt salve, but I assume it’s meant to be slave?