Improved wildcard search results (still not all meters were found)
- sleep 1 second after each init frame - select secondary address with enabled FCB bit
This commit is contained in:
parent
989eada28a
commit
c2f7c0d48e
@ -137,6 +137,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void) mbus_recv_frame(handle, &reply);
|
(void) mbus_recv_frame(handle, &reply);
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
frame->control = MBUS_CONTROL_MASK_SND_NKE | MBUS_CONTROL_MASK_DIR_M2S;
|
frame->control = MBUS_CONTROL_MASK_SND_NKE | MBUS_CONTROL_MASK_DIR_M2S;
|
||||||
frame->address = 0xFF;
|
frame->address = 0xFF;
|
||||||
@ -149,6 +150,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void) mbus_recv_frame(handle, &reply);
|
(void) mbus_recv_frame(handle, &reply);
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
mbus_scan_2nd_address_range(handle, 0, addr_mask);
|
mbus_scan_2nd_address_range(handle, 0, addr_mask);
|
||||||
|
|
||||||
|
@ -3762,7 +3762,7 @@ mbus_frame_select_secondary_pack(mbus_frame *frame, char *address)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->control = MBUS_CONTROL_MASK_SND_UD | MBUS_CONTROL_MASK_DIR_M2S;
|
frame->control = MBUS_CONTROL_MASK_SND_UD | MBUS_CONTROL_MASK_DIR_M2S | MBUS_CONTROL_MASK_FCB;
|
||||||
frame->address = 253; // for addressing secondary slaves
|
frame->address = 253; // for addressing secondary slaves
|
||||||
frame->control_information = 0x52; // mode 1
|
frame->control_information = 0x52; // mode 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user