use the max frame limit 16 also for serial multi-telegram transfers (some devices does not seems to stop reporting 'more data follows', so unless we set a hard limit it will loop forever. so this limit should probably be made a cmd line argument)
This commit is contained in:
parent
dadf3b4823
commit
7d482e47f7
@ -114,8 +114,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
// instead of the send and recv, use this sendrecv function that
|
||||
// takes care of the possibility of multi-telegram replies
|
||||
if (mbus_sendrecv_request(handle, address, &reply, -1) == -1)
|
||||
// takes care of the possibility of multi-telegram replies (limit = 16 frames)
|
||||
if (mbus_sendrecv_request(handle, address, &reply, 16) == -1)
|
||||
{
|
||||
fprintf(stderr, "Failed to send/receive M-Bus request.\n");
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user