libosdp icon indicating copy to clipboard operation
libosdp copied to clipboard

CP send a broadcast

Open jason155392 opened this issue 1 year ago • 8 comments

Can CP send a broadcast to PD now? I checked the API and found that only the osdp_cp_send_command function is available. This function requires specifying the PD offset. However, osdp_cp_setup cannot be set up with osdp_pd_info_t for the 0x7F address. This will cause a "packet seq mismatch" issue.

How can libosdp handle this now?

jason155392 avatar Feb 21 '24 05:02 jason155392

The broadcast support that we have is entirely for the PD so if you need it for the CP, we should enable it. Can you describe what you are trying to achieve?

Also, as I recall, the broadcast message was underspecified in OSDP v2.2 for all practical purposes.

sidcha avatar Feb 21 '24 07:02 sidcha

I want to implement a function to get/set a Peripheral Device's (PD) address using broadcast messages.

Initially, I'm considering the following approach:

  1. The Control Panel (CP) can send an "osdp_MFG" broadcast to check the PD's address.
  2. Subsequently, the CP can send an "osdp_COMSET" broadcast to set the PD's address.

I've reviewed OSDP v2.2, which specifies that "the use of the broadcast address should be limited to controlled (single PD) configurations." Therefore, this method is suitable for closed environments, where the CP can utilize it to manage single PD information effectively.

jason155392 avatar Feb 22 '24 00:02 jason155392

Okay, that sounds compelling enough. Let me see how this can be implemented.

sidcha avatar Feb 22 '24 11:02 sidcha

Looks like #113 can make use of this too.

sidcha avatar Feb 22 '24 11:02 sidcha

Looks like #113 can make use of this too.

The proposed concept of OSDP auto addressing revision 2 does not rely on broadcast anymore, esp. because using broadcasts during operation sets back message sequence numbers (SQN) and this would harm the OSDP built-in error recovery

schmida2 avatar Mar 13 '24 08:03 schmida2

@schmida2 I turned #113 into a discussion. ~~Do you mind updating that thread with the most recent version of your proposal? (I think the current link points to the one with broadcast messages)~~

The last comment has the most recent revision: https://github.com/schmida2/libosdp/blob/osdp-extension-autoaddr/OSDP_Extension-AutoAddressingProtocol.md

sidcha avatar Mar 13 '24 10:03 sidcha

Is there any news on this functionality? We're using libosdp professionally and CP broadcast support is important for us.

dhopsonlb avatar Jul 12 '24 17:07 dhopsonlb

@dhopsonlb, What use case are you targeting? Is it the same as @jason155392? If not, the solution I had in mind (relatively simpler approach) would not work for the general case "CP can send any command as broadcast".

sidcha avatar Jul 20 '24 08:07 sidcha