modbus_send only sending 64 bytes

Asked by Pat W.

Hello,

I am using libmodbus as an RTU slave. The port is /dev/ttyUSB0 which is a Keyspan USB to 232 converter. The slave works fine until the master sends a request whose response is > 64 bytes.

In modbus_send() I added the following line: printf("ret=%d query_length=%d\n", ret, query_length);

The output: "ret=64 query_length=69"

Message responses of < 64 bytes work fine.

Any suggestions? Is my write buffer really only 64 bytes long?

Here's some verbose output:
Waiting for a message...
<02><10><00><00><00><0A><14><04><2C><AA><55><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00><36><93>
[02][10][00][00][00][0A][40][3D]
Waiting for a message...
<02><10><00><00><00><0A><14><04><9B><AA><55><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00><E5><3D>
[02][10][00][00][00][0A][40][3D]
Waiting for a message...
<02><03><00><10><00><20><45><E4>
[02][03][40][00][02][00][03][00][04][00][05][00][06][00][07][00][08][00][09][00][0A][00][0B][00][0C][00][0D][00][0E][00][0F][00][10][00][11][00][12][00][13][00][14][00][15][00][16][00][17][00][18][00][19][00][1A][00][1B][00][1C][00][1D][00][1E][00][1F][00][20][00][21][47][99]
ret=64 query_length=69

ERROR Write port/socket failure (-13)

-Pat W.

Question information

Language:
English Edit question
Status:
Solved
For:
libmodbus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Stéphane Raimbault (sra) said :
#2

It's certainly a limitation of your slave which doesn't handle request longer than 64 bytes.