cybergarage / mupnp

mUPnP for C is a development package for UPnP™ developers. mUPnP controls these protocols automatically, and supports to create your devices and control points quickly.
http://www.cybergarage.org/
Other
82 stars 46 forks source link

No method to get Service Port and address #8

Open rahulvyas opened 10 years ago

rahulvyas commented 10 years ago

Hi Satoshi, We can get services array from device but we are not able to get port of the service in objective-c wrapper.

Could you please update wrapper to get service port ?

cybergarage commented 10 years ago

Hi Rahul,

What is the service port ? Do you want to know more detail information for services such as controlURL or eventURL ?

Please tell me your suggestion in more detail :-)

rahulvyas commented 10 years ago

Hi Satoshi,

I had sent you mail few days ago but you didn't replied to that mail. Basically I'm working on set top box remote controller app for iOS. We have android source. In android code KeyboardService is used. I want to know how we can get this "RemoteKeyboardService" to send command to set top box using iOS App.

Please guide me in right direction. Thanks.

cybergarage commented 10 years ago

Hi Rahul,

To send command to your device, get the action by CGUpnpDevice::getServiceForID() and CGUpnpService::getActionForName(). Then, use CGUpnpAction::postWithArguments().

Please check the following programming guide if you want to know the other functions in more detail :-)

http://www.cybergarage.org/twiki/bin/view/Main/CyberLinkForObjC

Regards,

Satoshi Konno

rahulvyas commented 10 years ago

Hi Satoshi,

I'm using socket to send UDP packet. I am not using CGUPnp for sending command. Is there a way to get name of service and IP and Port of service ?

cybergarage commented 10 years ago

Hi Rahul,

It is depend on the device implementation. If the controlURL or eventURL of the device description are specified as absolute URLs, you may know the address and the port from the URLs. However, you have to check other elements of the device description such as URLBase or SSDP messages.

Please check an official document from UPnP Forum, 'UPnP Device Architecture', to know about UPnP specification in more detail.

Regards,

Satoshi Konno

rahulvyas commented 10 years ago

Hi Satoshi,

I think it will be better to discuss in mail. Did you got my previous mail I sent to you few days ago ?

I have one doubt. I have one set top box named RBox3 (Android OS). It does not appear in the Upnp Device Discovery however If I turn DLNA it shows in the sample app you have created. I got this XML

http://pastie.org/9195115

Now can you guide me or create a sample code to send command to set top box. I want to send remote input command like 1,2,3,4 as we have in physical remote controller.

I hope you will guide me in right direction.

Thanks,