Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

libupnp for windows

santhoshunnikrishnan
1,514 Views
Hi ,
I am trying to create one application to communicate between one windows PC and linux pc using libupnp.

I could successfully develop the application in linux using libupnp-1.4.6. But i am not able to make a upnp dll for windows. In the README file which i got along with libupnp1.4.6 it mentioned that the build\libupnp.dsw file can be opened in VC++ 6 and can be used to create the dll file...
I tried as per the README file ,ie
1) downloaded the pthreads-w32 package and copied the Pre-build.2 folder to the top level source folder.
2) Renamed Pre-build.2 to pthreads.
3) Opened the provided workspace build\libupnp.dsw with Visual C++ 6.0 .. but after opening the libupnp.dsw it dint list any thing.. i couldn't build the project.. no source files were listed.

I am really in need of help in this , Can anyone please help me to build a upnp library in windows from libupnp 1.4.6 .. i tried the same with libupnp 1.6.6 but the same problem occurred.
0 Kudos
4 Replies
enzoenzo
Beginner
1,514 Views
One solution is to take an sds drill to your PC. XD
0 Kudos
santhoshunnikrishnan
1,514 Views
Quoting - enzoenzo
One solution is to take an sds drill to your PC. XD

Hi all,
Finally i solved the issue by myself. I created a new project (libupnp project) and got some compilation errors and resolved those errors.. But one run time error occured ... http_download api failed... i debugged it and found that ... in the function sprintf, the type specifier used is "%zu" and windows wont identify "%zu" and hence instead of converting the interger to string .. it gets subsituted as "zu" ..so i changed the type specified in the function sprintf is changed from "%zu" to "%u" and the problem in downloading the description document is solved..

I am posting this to help others to save time in debugging these issues...

Thanking You,
Santhosh
0 Kudos
ajjiang
Beginner
1,514 Views
Hi, Santhosh,

I'm running in the same problem with yours (I use libupnp 1.6.6).
Would you please help send me the corrected VC project files ? so that
it could save my time to debug it.
by the way, is there any Windows based sample code for using the libupnp.dll ?

My e-mail address: aj.jiang@msa.hinet.net

Thanks,
A.J.


Hi all,
Finally i solved the issue by myself. I created a new project (libupnp project) and got some compilation errors and resolved those errors.. But one run time error occured ... http_download api failed... i debugged it and found that ... in the function sprintf, the type specifier used is "%zu" and windows wont identify "%zu" and hence instead of converting the interger to string .. it gets subsituted as "zu" ..so i changed the type specified in the function sprintf is changed from "%zu" to "%u" and the problem in downloading the description document is solved..

I am posting this to help others to save time in debugging these issues...

Thanking You,
Santhosh

0 Kudos
Aarushi_Gupta
Beginner
1,514 Views
Quoting - ajjiang
hi , I am also trying to connect from linux machine to the windows box using UPnP.
I downloaded libupnp compiled it and to check the samples, i tried to run the TV sample
device and control point example gives. Here, control point always gives "Discovery Timeout".

Also, I have UPnP enabled in Windows XP and in windows I can see other UPnP devices like printer.
Now, I try changing the Device type in the control point of the TV written for TV device to
char TvDeviceType[] = "ssdp:all";
so that it can take all other devices,
in this case also its showing "Discovery timeout"
Can you please guide me how exactly i can make a control point which can discover all the devices on
network.

-- Regards

0 Kudos
Reply