Closed qwe900 closed 4 years ago
I ended up adding the service url and control manually to the libary, then it works.
void TR064::initServiceURLs() {
String inStr = httpRequest(_detectPage, "", "");
int CountChar=7; //length of word "service"
int i = 0;
while (inStr.indexOf("<service>") > 0 || inStr.indexOf("</service>") > 0) {
int indexStart=inStr.indexOf("<service>");
int indexStop= inStr.indexOf("</service>");
String serviceXML = inStr.substring(indexStart+CountChar+2, indexStop);
String servicename = xmlTakeParam(serviceXML, "serviceType");
String controlurl = xmlTakeParam(serviceXML, "controlURL");
_services[i][0] = servicename;
_services[i][1] = controlurl;
++i;
USE_SERIAL.printf("Service no %d:\t", i);
USE_SERIAL.flush();
USE_SERIAL.println(servicename + " @ " + controlurl);
inStr = inStr.substring(indexStop+CountChar+3);
}
++i;
_services[i][0] = "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1";
_services[i][1] = "/igdupnp/control/WANCommonIFC1";
USE_SERIAL.printf("Service no %d:\t", i);
USE_SERIAL.println(_services[i][0] + " @ " + _services[i][1]);
}
and my action
String params[][2] = {{""}};
String req[][2] = {{"NewByteSendRate", ""}, {"NewByteReceiveRate", ""}, {"Newmax_ds",""}, {"Newmax_us",""}};
connection.action("urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1", "GetAddonInfos", params, 1, req, 4);
Hi @qwe900,
glad to hear you found a solution.
I would however like to fix this problem a bit more permanently - in principle the service should have been detected automatically. I would like to understand why not and fix it if possible. The obvious reason would be, that it does it not show up on the page 'http://fritz.box:49000/tr64desc.xml'. Could you check, if that is the case for you? Where did you find documentation about this service?
These function are the old ones, which are still implemented. AVM implemented the new protocoll after 6.50 fritz os http://fritz.box:49000/igddesc.xml http://fritz.box:49000/igdconnSCPD.xml http://fritz.box:49000/igdicfgSCPD.xml http://fritz.box:49000/igddslSCPD.xml
Hey, how about other urls? i want to use this from php on arduino:
Because this traffic is accurat, I can use this but its not accurat and very slow on changing.