libosdp
libosdp copied to clipboard
Flush PD rx buffer when osdp_channel_receive fails due to ring buffer overflow
Discussed in https://github.com/goToMain/libosdp/discussions/255
Originally posted by HaydosR November 10, 2025 I have an OSDP network of approximately 80 devices deployed, without logging from anything but the CP. At present I believe one of my devices has gone rogue and is talking atop other devices, contributing to overflowed receive buffers (ie, its sending random junk data atop other valid devices). Obviously this in itself is an issue, but my concern is that if it was disabled, I dont seem to see the Rx buffer properly recover itself.
E (1900603) LIBOSDP: [0] osdp_phy.c:73 - RX ring buffer overflow!
E (1900603) LIBOSDP: [3] osdp_phy.c:549 - Packet sequence mismatch (expected: 0, got: 1)
W (1900603) LIBOSDP: [4] osdp_cp.c:752 - NAK(SEQ_NUM); restarting communication
E (1902823) LIBOSDP: [0] osdp_phy.c:73 - RX ring buffer overflow!
E (1902823) LIBOSDP: [3] osdp_phy.c:549 - Packet sequence mismatch (expected: 1, got: 0)
W (1902823) LIBOSDP: [4] osdp_cp.c:752 - NAK(SEQ_NUM); restarting communication
E (1907053) LIBOSDP: [0] osdp_phy.c:73 - RX ring buffer overflow!
E (1907053) LIBOSDP: [3] osdp_phy.c:549 - Packet sequence mismatch (expected: 0, got: 1)
W (1907053) LIBOSDP: [4] osdp_cp.c:752 - NAK(SEQ_NUM); restarting communication
E (1909093) LIBOSDP: [0] osdp_phy.c:73 - RX ring buffer overflow!
E (1911313) LIBOSDP: [0] osdp_phy.c:73 - RX ring buffer overflow!
E (1911313) LIBOSDP: [3] osdp_phy.c:475 - Invalid crc 0x81f3/0x0045
I (1911483) CMDS: Board info: Vin=19.945V, Batt=23.97V, Charge State=Disconnected,