Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-11

UPnP Component

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

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,

Dimitrios Chr. Ioannidis
Dmitry Boyarintsev
to Dimitrios Chr. Ioannidis

On Mon, Nov 11, 2013 at 9:25 AM, Dimitrios Chr. Ioannidis <

Show quoted text 24 lines
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, -- Dimitrios Chr. Ioannidis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Dmitry Boyarintsev
to Dmitry Boyarintsev

Denis Poop (seen very often on this list) have asked about this recently. http://lists.freepascal.org/lists/fpc-pascal/2013-June/038577.html

So he might have some work already done or know about the existing solution.

And basic googling brings these results: http://www.whitebear.ch/upnp.htm

http://francois-piette.blogspot.de/2013/02/using-universal-plug-and-play-upnp-with.html

http://stackoverflow.com/questions/15531441/how-to-implement-upnp-on-delphi-xe2

thanks,
Dmitry

On Mon, Nov 11, 2013 at 10:25 AM, Dmitry Boyarintsev <

Show quoted text 32 lines
wrote: On Mon, Nov 11, 2013 at 9:25 AM, 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, > > -- > Dimitrios Chr. Ioannidis > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >
Dennis Poon
to Dimitrios Chr. Ioannidis: at work, i have a project which needs very limited UPnP capabilities. All it needs, is to…
Dimitrios Chr. Ioannidis wrote 17 lines
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