Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPnP integration for network discovery #20

Merged
merged 2 commits into from
Feb 24, 2023
Merged

UPnP integration for network discovery #20

merged 2 commits into from
Feb 24, 2023

Conversation

tbm0115
Copy link
Member

@tbm0115 tbm0115 commented Feb 23, 2023

Implemented UPnP service to publish SSDP messages on the network to allow the Adapter service to be discovered without prior configuration.

When configured in the generic Service, an internal UDP client will begin publishing SSDP "NOTIFY' messages on the network (239.255.255.250:1900). Additionally, a HTTP client will begin serving the UPnP device description file and icon.

With these messages advertising the network service (TCP Adapter, for example) a listener, such as an Agent, could determine if the Adapter is already configured. If it hasn't been configured in the Agent, then referring to the LOCATION header field, a UPnP Device Description file (XML) can be downloaded and used to determine what type of Adapter (ie. TcpAdapter, MqttAdapter, etc.) and where to find it.

In the future, with the help of the MtconnectTranspiler, it may be possible for the MtconnectAdapter to automatically generate a Devices.xml based on the IAdapterSource being used. This generated Devices.xml could then also be published via the HTTP client used in the UPnP service and available for download by an Agent. Then, the Agent could decide to validate the document and/or download it as part of the configuration.

 - Changed the UDP message to be in the UPnP notification format
 - Added HTTP client to support UPnP document requests
 - Added supplementary files for UPnP support
 - Changed names and namespaces of the "Broadcast" objects to reflect `UPnP`.
 - Implemented construction of UPnP in `AdapterFactory` of the generic `Service`.
@tbm0115 tbm0115 added the enhancement New feature or request label Feb 23, 2023
@tbm0115 tbm0115 requested a review from jmurphy2973 February 23, 2023 23:54
@tbm0115 tbm0115 self-assigned this Feb 23, 2023
@tbm0115 tbm0115 changed the title Tbm0115/discovery UPnP integration for network discovery Feb 23, 2023
@tbm0115 tbm0115 linked an issue Feb 24, 2023 that may be closed by this pull request
@tbm0115 tbm0115 merged commit 9f97757 into master Feb 24, 2023
@tbm0115 tbm0115 deleted the tbm0115/Discovery branch February 24, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Network Discovery
1 participant