I am using this SSDP gem
It depends on ipaddr, socket
I have addedd ipaddr to the main Rhodes gem framework.
I modified the ssdp gem and included the contents inside its lib folder to the main framework as well.
Upon compilation of the app, it shows no error. Neither the adb log shows any error. But there is no output.
Wonder if the gem functionality is not supported or there is some system error?
The SSDP gem creates a UDP socket to listen to Upnp devices on a network.
That is my goal. To build a Upnp control point in Rhodes.
- It requires access to native HTTP services, like sending requests over TCP/IP and UDP.
- It also needs to serve music files from the phone over network.
- It would also need to handle custom HTTP methods apart from GET/POST, like NOTIFY and SUBSCRIBE
As of now I am attempting task 1 and I dont see any errors in the adb. But it is not working.
This is the adb log - https://paste.ubuntu.com/26328082/
Testing on Android 6
EDIT
In application.rb
require 'socket'
require 'ipaddr'
require 'ssdp'
In index.erb
<%= finder = SSDP::Consumer.new :timeout => 3 %> <br />
<%= result = finder.search :service => 'ssdp:all' %> <br />
<%= IPAddr.new('239.255.255.250').hton + IPAddr.new('0.0.0.0').hton %> <br />
<%= Rho::Network.hasNetwork %> <br />
<%= result %>
The above code returns nothing in the Rhodes app.
Except IPAddr, which returns gibberish symbols. Only that works.
