Error Data length when reading
See original GitHub issueHello
I am working on the battery Modbus we talked about in issue and found my problem was I am using port RS232 instead of 485 (Battery has both ports).
So now I moved forward and I am getting a reply from the battery but it is not showing up in node-red
I am getting error Data length error, expected 9 got 1
, but when sniffy the serial port I see the below, 9 bytes with correct values have been returned.
Is it possible because I am using USB to RS485?
0x26 (&) 0x04 0x10 0x00 0x00 0x02 0x73 (s) 0xfc
0x26 (&) 0x04 0x04 0x14 0x8e 0x27 (') 0x10 0xd3 0x61 (a)
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Invalid Data Length Error while reading data - SAS Communities
I am trying to read data from a zipped file using a macro, and then labelling the data. I am using SAS Studio...
Read more >ResMonApp program terminates with error "Unexpected data ...
The error "Unexpected data length read from Resource Tracker Socket" is often an indication that the port used by ResMonApp (default port ...
Read more >Modbus RTU problem reading address - Node-RED Forum
The problem comes when I try to read the registers. The error I get is: "Error: Data length error, expected 7 got 1"....
Read more >Cannot read properties of undefined (reading 'length') - TrackJS
One of the most common errors we record, “Cannot read properties of undefined (reading 'length')”, turned up in our own logs recently while ......
Read more >15.00 - 3944 Data length is invalid for the data type.
The error occurs when the data length is not valid for its data type (for example, ... 2525 Fatal read error encountered during...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Worked perfectly, now I am able to read the data. I noticed sometimes it is showing timeout but still i get the data in the debug.
Thanks for your help
I thinks that the
RTUBufferedPort
should solve this, but AFAIK it is the one used by node-red, @biancode ?