[fpc-pascal] UPnP Component

Dennis Poon dennis at avidsoft.com.hk
Mon Nov 11 16:55:28 CET 2013



Dimitrios Chr. Ioannidis wrote:
> Hi all,
>
>   at work, i have a project which needs very limited UPnP 
> capabilities. All it needs, is to open a port and do a port forwarding 
> for a limited period of time closing it afterwards. Nowdays almost 
> every Residential Gateway(Router) / ( Customer Premises Equipment ) 
> support that via uPnP.
>
>   I searched, if a portable ( i need it for windows, linux, ios and 
> android ) component exists for free pascal and i didn't find anything. 
> As i think that the UPnP functionality is very useful for various 
> purposes, i decided to write a full implementation of UPnP for free 
> pascal. But before i start, does anyone know any previous components / 
> libraries that i didn't find so i don't do duplicate work ?
>
>  regards,
>


I have searched for it in the past and found this:
http://www.whitebear.ch

I have not actually used it though. Don't remember why, probably because 
it does not compile without any extra work on my Delphi 5 or I did not 
understand the source code and how to use it.
You can start with this one. Please let us know your findings.

In the worst case and that did not work, you might try to use udp to do 
the upnp yourself for just that small portion of the protocol.

I would:
1) run winshark on the pc to monitor the udp traffic between the PC and 
the router,
2) launch skype or BitTorrent client and monitor what udp packets it 
exchanges with the router
3) go to the router browser page to see the upnp entries it set up after 
those packets were received by the router.

I sometimes think this reverse engineering is easier than reading the 
complex protocol which covers a lot of areas not related to my goal.

Good Luck.
Dennis




More information about the fpc-pascal mailing list