Aypac / Arduino-TR-064-SOAP-Library

Arduino library for the TR-064 protocol, most commonly used by the Fritz!Box router API
Other
63 stars 21 forks source link

not working with AVM6590 (07.12) #30

Closed jipp closed 1 year ago

jipp commented 4 years ago

Hi

I just copied the example caller and changed the credentials for wifi (working) also added username/password for the FB account using. Now trying to place a call. wit debug enabled I got the following output:

[action] with extraction
[action] with parameters
[action] no nonce/realm found. requesting...
[HTTP] prepare request to URL: http://192.168.178.1:49000
[HTTP] Posting XML:
---------------------------------
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
---------------------------------

[HTTP] POST... SOAPACTION: 'urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo'
[HTTP] request code: 500
[HTTP] Received back
---------------------------------

---------------------------------

[action]<error> nonce/realm request not successful!
[action]<error> Retrying in 5s
[action] no nonce/realm found. requesting...
[HTTP] prepare request to URL: http://192.168.178.1:49000
[HTTP] Posting XML:
---------------------------------
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
---------------------------------

[HTTP] POST... SOAPACTION: 'urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo'
[HTTP] request code: 500
[HTTP] Received back
---------------------------------

---------------------------------

[action]<error> nonce/realm request not successful!
[action]<error> Retrying in 5s
[action] no nonce/realm found. requesting...
[HTTP] prepare request to URL: http://192.168.178.1:49000
[HTTP] Posting XML:
---------------------------------
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
---------------------------------

[HTTP] POST... SOAPACTION: 'urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo'
[HTTP] request code: 500
[HTTP] Received back
---------------------------------

---------------------------------

[action]<error> nonce/realm request not successful!
[action]<error> Retrying in 5s
[HTTP] prepare request to URL: http://192.168.178.1:49000
[HTTP] Posting XML:
---------------------------------
<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:X_AVM-DE_DialNumber xmlns:u='urn:dslforum-org:service:X_VoIP:1'><NewX_AVM-DE_PhoneNumber>**1</NewX_AVM-DE_PhoneNumber></u:X_AVM-DE_DialNumber></s:Body></s:Envelope>
---------------------------------

[HTTP] POST... SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber'
[HTTP] request code: 500
[HTTP] Received back
---------------------------------

---------------------------------

[action] Response status: 
[action]<error> Giving up the request 

using some trial curl requests like: curl -s -k -m 5 --anyauth -u "xxx:1234567890" "http://Fritz.Box:49000/upnp/control/deviceinfo" -H 'Content-Type: text/xml; charset="utf-8"' -H "SoapAction:urn:dslforum-org:service:DeviceInfo:1#GetInfo" -d "<?xml version='1.0' encoding='utf-8'?><s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body><u:GetInfo xmlns:u='urn:dslforum-org:service:DeviceInfo:1'></u:GetInfo></s:Body></s:Envelope>"

works

do you have any hint what an I doing wrong?

thanks lot

Aypac commented 4 years ago

Hmmm, just a few scattered thoughts before I look deeper into it:

jipp commented 4 years ago

some quick answers - not all you asked for:

-- Could be related to #21 Don't think so as "Serial.println" is executed in the main loop

-- You use fritz.box instead of the IP for the cURL request. Maybe check if your box is really using 192.168.178.1

nslookup fritz.box
Server:         192.168.178.1
Address:        192.168.178.1#53

Name:   fritz.box
Address: 192.168.178.1

Also the web interface reacts on both: name and IP.

-- The first request that the library sends is to http://192.168.178.1:49000/tr64desc.xml - can you check what that returns if you cURL it?

same output with name and ip (click to expand) ``` pi@lemonpi:~ $ curl -s -k -m 5 http://192.168.178.1:49000/tr64desc.xml 1 0 220 148 7 12 72225 148.07.12 urn:dslforum-org:device:InternetGatewayDevice:1 FRITZ!Box 6590 Cable AVM www.avm.de FRITZ!Box 6590 Cable FRITZ!Box 6590 Cable - avm www.avm.de uuid:739f2409-bccb-40e7-8e6c-444E6DE56EBF image/gif 118 119 8 /ligd.gif urn:dslforum-org:service:DeviceInfo:1 urn:DeviceInfo-com:serviceId:DeviceInfo1 /upnp/control/deviceinfo /upnp/control/deviceinfo /deviceinfoSCPD.xml urn:dslforum-org:service:DeviceConfig:1 urn:DeviceConfig-com:serviceId:DeviceConfig1 /upnp/control/deviceconfig /upnp/control/deviceconfig /deviceconfigSCPD.xml urn:dslforum-org:service:Layer3Forwarding:1 urn:Layer3Forwarding-com:serviceId:Layer3Forwarding1 /upnp/control/layer3forwarding /upnp/control/layer3forwarding /layer3forwardingSCPD.xml urn:dslforum-org:service:LANConfigSecurity:1 urn:LANConfigSecurity-com:serviceId:LANConfigSecurity1 /upnp/control/lanconfigsecurity /upnp/control/lanconfigsecurity /lanconfigsecuritySCPD.xml urn:dslforum-org:service:ManagementServer:1 urn:ManagementServer-com:serviceId:ManagementServer1 /upnp/control/mgmsrv /upnp/control/mgmsrv /mgmsrvSCPD.xml urn:dslforum-org:service:Time:1 urn:Time-com:serviceId:Time1 /upnp/control/time /upnp/control/time /timeSCPD.xml urn:dslforum-org:service:UserInterface:1 urn:UserInterface-com:serviceId:UserInterface1 /upnp/control/userif /upnp/control/userif /userifSCPD.xml urn:dslforum-org:service:X_AVM-DE_Storage:1 urn:X_AVM-DE_Storage-com:serviceId:X_AVM-DE_Storage1 /upnp/control/x_storage /upnp/control/x_storage /x_storageSCPD.xml urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 urn:X_AVM-DE_WebDAV-com:serviceId:X_AVM-DE_WebDAVClient1 /upnp/control/x_webdav /upnp/control/x_webdav /x_webdavSCPD.xml urn:dslforum-org:service:X_AVM-DE_UPnP:1 urn:X_AVM-DE_UPnP-com:serviceId:X_AVM-DE_UPnP1 /upnp/control/x_upnp /upnp/control/x_upnp /x_upnpSCPD.xml urn:dslforum-org:service:X_AVM-DE_Speedtest:1 urn:X_AVM-DE_Speedtest-com:serviceId:X_AVM-DE_Speedtest1 /upnp/control/x_speedtest /upnp/control/x_speedtest /x_speedtestSCPD.xml urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 urn:X_AVM-DE_RemoteAccess-com:serviceId:X_AVM-DE_RemoteAccess1 /upnp/control/x_remote /upnp/control/x_remote /x_remoteSCPD.xml urn:dslforum-org:service:X_AVM-DE_MyFritz:1 urn:X_AVM-DE_MyFritz-com:serviceId:X_AVM-DE_MyFritz1 /upnp/control/x_myfritz /upnp/control/x_myfritz /x_myfritzSCPD.xml urn:dslforum-org:service:X_VoIP:1 urn:X_VoIP-com:serviceId:X_VoIP1 /upnp/control/x_voip /upnp/control/x_voip /x_voipSCPD.xml urn:dslforum-org:service:X_AVM-DE_OnTel:1 urn:X_AVM-DE_OnTel-com:serviceId:X_AVM-DE_OnTel1 /upnp/control/x_contact /upnp/control/x_contact /x_contactSCPD.xml urn:dslforum-org:service:X_AVM-DE_Dect:1urn:X_AVM-DE_Dect-com:serviceId:X_AVM-DE_Dect1/upnp/control/x_dect/upnp/control/x_dect/x_dectSCPD.xml urn:dslforum-org:service:X_AVM-DE_TAM:1urn:X_AVM-DE_TAM-com:serviceId:X_AVM-DE_TAM1/upnp/control/x_tam/upnp/control/x_tam/x_tamSCPD.xml urn:dslforum-org:service:X_AVM-DE_AppSetup:1 urn:X_AVM-DE_AppSetup-com:serviceId:X_AVM-DE_AppSetup1 /upnp/control/x_appsetup /upnp/control/x_appsetup /x_appsetupSCPD.xml urn:dslforum-org:service:X_AVM-DE_Homeauto:1 urn:X_AVM-DE_Homeauto-com:serviceId:X_AVM-DE_Homeauto1 /upnp/control/x_homeauto /upnp/control/x_homeauto /x_homeautoSCPD.xml urn:dslforum-org:service:X_AVM-DE_Homeplug:1 urn:X_AVM-DE_Homeplug-com:serviceId:X_AVM-DE_Homeplug1 /upnp/control/x_homeplug /upnp/control/x_homeplug /x_homeplugSCPD.xml urn:dslforum-org:service:X_AVM-DE_Filelinks:1 urn:X_AVM-DE_Filelinks-com:serviceId:X_AVM-DE_Filelinks1 /upnp/control/x_filelinks /upnp/control/x_filelinks /x_filelinksSCPD.xml urn:dslforum-org:service:X_AVM-DE_Auth:1 urn:X_AVM-DE_Auth-com:serviceId:X_AVM-DE_Auth1 /upnp/control/x_auth /upnp/control/x_auth /x_authSCPD.xml urn:dslforum-org:device:LANDevice:1 LANDevice - FRITZ!Box 6590 Cable AVM www.avm.de LANDevice - FRITZ!Box 6590 Cable LANDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e6b-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WLANConfiguration:1 urn:WLANConfiguration-com:serviceId:WLANConfiguration1 /upnp/control/wlanconfig1 /upnp/control/wlanconfig1 /wlanconfigSCPD.xml urn:dslforum-org:service:WLANConfiguration:2urn:WLANConfiguration-com:serviceId:WLANConfiguration2/upnp/control/wlanconfig2/upnp/control/wlanconfig2/wlanconfigSCPD.xmlurn:dslforum-org:service:WLANConfiguration:3urn:WLANConfiguration-com:serviceId:WLANConfiguration3/upnp/control/wlanconfig3/upnp/control/wlanconfig3/wlanconfigSCPD.xml urn:dslforum-org:service:Hosts:1 urn:LanDeviceHosts-com:serviceId:Hosts1 /upnp/control/hosts /upnp/control/hosts /hostsSCPD.xml urn:dslforum-org:service:LANEthernetInterfaceConfig:1 urn:LANEthernetIfCfg-com:serviceId:LANEthernetInterfaceConfig1 /upnp/control/lanethernetifcfg /upnp/control/lanethernetifcfg /ethifconfigSCPD.xml urn:dslforum-org:service:LANHostConfigManagement:1 urn:LANHCfgMgm-com:serviceId:LANHostConfigManagement1 /upnp/control/lanhostconfigmgm /upnp/control/lanhostconfigmgm /lanhostconfigmgmSCPD.xml urn:dslforum-org:device:WANDevice:1 WANDevice - FRITZ!Box 6590 Cable AVM www.avm.de WANDevice - FRITZ!Box 6590 Cable WANDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e6a-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WANCommonInterfaceConfig:1 urn:WANCIfConfig-com:serviceId:WANCommonInterfaceConfig1 /upnp/control/wancommonifconfig1 /upnp/control/wancommonifconfig1 /wancommonifconfigSCPD.xml urn:dslforum-org:service:WANDSLInterfaceConfig:1 urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1 /upnp/control/wandslifconfig1 /upnp/control/wandslifconfig1 /wandslifconfigSCPD.xml urn:dslforum-org:device:WANConnectionDevice:1 WANConnectionDevice - FRITZ!Box 6590 Cable AVM www.avm.de WANConnectionDevice - FRITZ!Box 6590 Cable WANConnectionDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e69-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WANDSLLinkConfig:1 urn:WANDSLLinkConfig-com:serviceId:WANDSLLinkConfig1 /upnp/control/wandsllinkconfig1 /upnp/control/wandsllinkconfig1 /wandsllinkconfigSCPD.xml urn:dslforum-org:service:WANEthernetLinkConfig:1 urn:WANEthernetLinkConfig-com:serviceId:WANEthernetLinkConfig1 /upnp/control/wanethlinkconfig1 /upnp/control/wanethlinkconfig1 /wanethlinkconfigSCPD.xml urn:dslforum-org:service:WANPPPConnection:1 urn:WANPPPConnection-com:serviceId:WANPPPConnection1 /upnp/control/wanpppconn1 /upnp/control/wanpppconn1 /wanpppconnSCPD.xml urn:dslforum-org:service:WANIPConnection:1 urn:WANIPConnection-com:serviceId:WANIPConnection1 /upnp/control/wanipconnection1 /upnp/control/wanipconnection1 /wanipconnSCPD.xml http://fritz.box ```
jipp commented 4 years ago

one more thing - when only posting the 1st xml statement using cURL:

curl -s -k -m 5 "http://192.168.178.1:49000/upnp/control/deviceinfo" -H 'Content-Type: text/xml; charset="utf-8"' -H "SoapAction:urn:dslforum-org:service:DeviceInfo:1#GetInfo" -d "<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Header><h:InitChallenge xmlns:h=\"http://soap-authentication.org/digest/2001/10/\" s:mustUnderstand=\"1\"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>"
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Header>
<h:Challenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
<Status>Unauthenticated</Status>
<Nonce>FBE96F5D7D9F3FDF</Nonce>
<Realm>F!Box SOAP-Auth</Realm>
</h:Challenge>
</s:Header>
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>503</errorCode>
<errorDescription></errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
jipp commented 4 years ago

Tried another example, same result

how to use https in your setup? cURL is also working with http

Aypac commented 4 years ago

I just started testing on my hardware and seeing the same thing. Looks like I messed up somewhere. I'll try to figure it out asap and let you know.

Aypac commented 4 years ago

Ok, so the reason why it was not working for me was simply because I deactivated the option to require a password to log into the UI; turns out the FB does not even provide Nonce's then (as it just allows you to do anything without authentication). I guess that is not the case for you? Can you maybe try the code on this branch ? Maybe it'll help...

Aypac commented 4 years ago

Ok, after delving into this for a few hours I ended up adding many improvements to the lib (see above mentioned branch). I hope one of them will help you. If you still get a 500, try the new example 'simple-router-info' (only available on that branch for now).

jipp commented 4 years ago

Hi

thanks a lot for your effort and time.

I have downloaded the branch you referred and started the "simple-router.info.ino". below the output. I think we are a step further. but I see a crash at the end of the execution - using a wemos d1 mini pro.

will try the original sketch as well.

Click to see full log ``` [SETUP] WAIT 4... scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 3 cnt connected with wobilix, channel 11 dhcp client start... ip:192.168.178.39,mask:255.255.255.0,gw:192.168.178.1 [SETUP] WAIT 3... [SETUP] WAIT 2... [SETUP] WAIT 1... Initialize TR-064 connection [init] Started initialization of the TR-064 library. [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/tr64desc.xml'. [HTTP] GET... [HTTP] Request code: 200 [HTTP] Printing received reply (between lines): --------------------------------- 1 0 220 148 7 12 72225 148.07.12 urn:dslforum-org:device:InternetGatewayDevice:1 FRITZ!Box 6590 Cable AVM www.avm.de FRITZ!Box 6590 Cable FRITZ!Box 6590 Cable - avm www.avm.de uuid:739f2409-bccb-40e7-8e6c-444E6DE56EBF image/gif 118 119 8 /ligd.gif urn:dslforum-org:service:DeviceInfo:1 urn:DeviceInfo-com:serviceId:DeviceInfo1 /upnp/control/deviceinfo /upnp/control/deviceinfo /deviceinfoSCPD.xml urn:dslforum-org:service:DeviceConfig:1 urn:DeviceConfig-com:serviceId:DeviceConfig1 /upnp/control/deviceconfig /upnp/control/deviceconfig /deviceconfigSCPD.xml urn:dslforum-org:service:Layer3Forwarding:1 urn:Layer3Forwarding-com:serviceId:Layer3Forwarding1 /upnp/control/layer3forwarding /upnp/control/layer3forwarding /layer3forwardingSCPD.xml urn:dslforum-org:service:LANConfigSecurity:1 urn:LANConfigSecurity-com:serviceId:LANConfigSecurity1 /upnp/control/lanconfigsecurity /upnp/control/lanconfigsecurity /lanconfigsecuritySCPD.xml urn:dslforum-org:service:ManagementServer:1 urn:ManagementServer-com:serviceId:ManagementServer1 /upnp/control/mgmsrv /upnp/control/mgmsrv /mgmsrvSCPD.xml urn:dslforum-org:service:Time:1 urn:Time-com:serviceId:Time1 /upnp/control/time /upnp/control/time /timeSCPD.xml urn:dslforum-org:service:UserInterface:1 urn:UserInterface-com:serviceId:UserInterface1 /upnp/control/userif /upnp/control/userif /userifSCPD.xml urn:dslforum-org:service:X_AVM-DE_Storage:1 urn:X_AVM-DE_Storage-com:serviceId:X_AVM-DE_Storage1 /upnp/control/x_storage /upnp/control/x_storage /x_storageSCPD.xml urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 urn:X_AVM-DE_WebDAV-com:serviceId:X_AVM-DE_WebDAVClient1 /upnp/control/x_webdav /upnp/control/x_webdav /x_webdavSCPD.xml urn:dslforum-org:service:X_AVM-DE_UPnP:1 urn:X_AVM-DE_UPnP-com:serviceId:X_AVM-DE_UPnP1 /upnp/control/x_upnp /upnp/control/x_upnp /x_upnpSCPD.xml urn:dslforum-org:service:X_AVM-DE_Speedtest:1 urn:X_AVM-DE_Speedtest-com:serviceId:X_AVM-DE_Speedtest1 /upnp/control/x_speedtest /upnp/control/x_speedtest /x_speedtestSCPD.xml urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 urn:X_AVM-DE_RemoteAccess-com:serviceId:X_AVM-DE_RemoteAccess1 /upnp/control/x_remote /upnp/control/x_remote /x_remoteSCPD.xml urn:dslforum-org:service:X_AVM-DE_MyFritz:1 urn:X_AVM-DE_MyFritz-com:serviceId:X_AVM-DE_MyFritz1 /upnp/control/x_myfritz /upnp/control/x_myfritz /x_myfritzSCPD.xml urn:dslforum-org:service:X_VoIP:1 urn:X_VoIP-com:serviceId:X_VoIP1 /upnp/control/x_voip /upnp/control/x_voip /x_voipSCPD.xml urn:dslforum-org:service:X_AVM-DE_OnTel:1 urn:X_AVM-DE_OnTel-com:serviceId:X_AVM-DE_OnTel1 /upnp/control/x_contact /upnp/control/x_contact /x_contactSCPD.xml urn:dslforum-org:service:X_AVM-DE_Dect:1urn:X_AVM-DE_Dect-com:serviceId:X_AVM-DE_Dect1/upnp/control/x_dect/upnp/control/x_dect/x_dectSCPD.xml urn:dslforum-org:service:X_AVM-DE_TAM:1urn:X_AVM-DE_TAM-com:serviceId:X_AVM-DE_TAM1/upnp/control/x_tam/upnp/control/x_tam/x_tamSCPD.xml urn:dslforum-org:service:X_AVM-DE_AppSetup:1 urn:X_AVM-DE_AppSetup-com:serviceId:X_AVM-DE_AppSetup1 /upnp/control/x_appsetup /upnp/control/x_appsetup /x_appsetupSCPD.xml urn:dslforum-org:service:X_AVM-DE_Homeauto:1 urn:X_AVM-DE_Homeauto-com:serviceId:X_AVM-DE_Homeauto1 /upnp/control/x_homeauto /upnp/control/x_homeauto /x_homeautoSCPD.xml urn:dslforum-org:service:X_AVM-DE_Homeplug:1 urn:X_AVM-DE_Homeplug-com:serviceId:X_AVM-DE_Homeplug1 /upnp/control/x_homeplug /upnp/control/x_homeplug /x_homeplugSCPD.xml urn:dslforum-org:service:X_AVM-DE_Filelinks:1 urn:X_AVM-DE_Filelinks-com:serviceId:X_AVM-DE_Filelinks1 /upnp/control/x_filelinks /upnp/control/x_filelinks /x_filelinksSCPD.xml urn:dslforum-org:service:X_AVM-DE_Auth:1 urn:X_AVM-DE_Auth-com:serviceId:X_AVM-DE_Auth1 /upnp/control/x_auth /upnp/control/x_auth /x_authSCPD.xml urn:dslforum-org:device:LANDevice:1 LANDevice - FRITZ!Box 6590 Cable AVM www.avm.de LANDevice - FRITZ!Box 6590 Cable LANDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e6b-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WLANConfiguration:1 urn:WLANConfiguration-com:serviceId:WLANConfiguration1 /upnp/control/wlanconfig1 /upnp/control/wlanconfig1 /wlanconfigSCPD.xml urn:dslforum-org:service:WLANConfiguration:2urn:WLANConfiguration-com:serviceId:WLANConfiguration2/upnp/control/wlanconfig2/upnp/control/wlanconfig2/wlanconfigSCPD.xmlurn:dslforum-org:service:WLANConfiguration:3urn:WLANConfiguration-com:serviceId:WLANConfiguration3/upnp/control/wlanconfig3/upnp/control/wlanconfig3/wlanconfigSCPD.xml urn:dslforum-org:service:Hosts:1 urn:LanDeviceHosts-com:serviceId:Hosts1 /upnp/control/hosts /upnp/control/hosts /hostsSCPD.xml urn:dslforum-org:service:LANEthernetInterfaceConfig:1 urn:LANEthernetIfCfg-com:serviceId:LANEthernetInterfaceConfig1 /upnp/control/lanethernetifcfg /upnp/control/lanethernetifcfg /ethifconfigSCPD.xml urn:dslforum-org:service:LANHostConfigManagement:1 urn:LANHCfgMgm-com:serviceId:LANHostConfigManagement1 /upnp/control/lanhostconfigmgm /upnp/control/lanhostconfigmgm /lanhostconfigmgmSCPD.xml urn:dslforum-org:device:WANDevice:1 WANDevice - FRITZ!Box 6590 Cable AVM www.avm.de WANDevice - FRITZ!Box 6590 Cable WANDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e6a-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WANCommonInterfaceConfig:1 urn:WANCIfConfig-com:serviceId:WANCommonInterfaceConfig1 /upnp/control/wancommonifconfig1 /upnp/control/wancommonifconfig1 /wancommonifconfigSCPD.xml urn:dslforum-org:service:WANDSLInterfaceConfig:1 urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1 /upnp/control/wandslifconfig1 /upnp/control/wandslifconfig1 /wandslifconfigSCPD.xml urn:dslforum-org:device:WANConnectionDevice:1 WANConnectionDevice - FRITZ!Box 6590 Cable AVM www.avm.de WANConnectionDevice - FRITZ!Box 6590 Cable WANConnectionDevice - FRITZ!Box 6590 Cable - avm www.avm.de uuid:75802409-bccb-40e7-8e69-444E6DE56EBF AVM TR-064 urn:dslforum-org:service:WANDSLLinkConfig:1 urn:WANDSLLinkConfig-com:serviceId:WANDSLLinkConfig1 /upnp/control/wandsllinkconfig1 /upnp/control/wandsllinkconfig1 /wandsllinkconfigSCPD.xml urn:dslforum-org:service:WANEthernetLinkConfig:1 urn:WANEthernetLinkConfig-com:serviceId:WANEthernetLinkConfig1 /upnp/control/wanethlinkconfig1 /upnp/control/wanethlinkconfig1 /wanethlinkconfigSCPD.xml urn:dslforum-org:service:WANPPPConnection:1 urn:WANPPPConnection-com:serviceId:WANPPPConnection1 /upnp/control/wanpppconn1 /upnp/control/wanpppconn1 /wanpppconnSCPD.xml urn:dslforum-org:service:WANIPConnection:1 urn:WANIPConnection-com:serviceId:WANIPConnection1 /upnp/control/wanipconnection1 /upnp/control/wanipconnection1 /wanipconnSCPD.xml http://fritz.box --------------------------------- [initServiceURLs] Router name: [initServiceURLs] Router model: [initServiceURLs] Detected Services: 1 urn:dslforum-org:service:DeviceInfo:1 @ /upnp/control/deviceinfo 2 urn:dslforum-org:service:DeviceConfig:1 @ /upnp/control/deviceconfig 3 urn:dslforum-org:service:Layer3Forwarding:1 @ /upnp/control/layer3forwarding 4 urn:dslforum-org:service:LANConfigSecurity:1 @ /upnp/control/lanconfigsecurity 5 urn:dslforum-org:service:ManagementServer:1 @ /upnp/control/mgmsrv 6 urn:dslforum-org:service:Time:1 @ /upnp/control/time 7 urn:dslforum-org:service:UserInterface:1 @ /upnp/control/userif 8 urn:dslforum-org:service:X_AVM-DE_Storage:1 @ /upnp/control/x_storage 9 urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 @ /upnp/control/x_webdav 10 urn:dslforum-org:service:X_AVM-DE_UPnP:1 @ /upnp/control/x_upnp 11 urn:dslforum-org:service:X_AVM-DE_Speedtest:1 @ /upnp/control/x_speedtest 12 urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 @ /upnp/control/x_remote 13 urn:dslforum-org:service:X_AVM-DE_MyFritz:1 @ /upnp/control/x_myfritz 14 urn:dslforum-org:service:X_VoIP:1 @ /upnp/control/x_voip 15 urn:dslforum-org:service:X_AVM-DE_OnTel:1 @ /upnp/control/x_contact 16 urn:dslforum-org:service:X_AVM-DE_Dect:1 @ /upnp/control/x_dect 17 urn:dslforum-org:service:X_AVM-DE_TAM:1 @ /upnp/control/x_tam 18 urn:dslforum-org:service:X_AVM-DE_AppSetup:1 @ /upnp/control/x_appsetup 19 urn:dslforum-org:service:X_AVM-DE_Homeauto:1 @ /upnp/control/x_homeauto 20 urn:dslforum-org:service:X_AVM-DE_Homeplug:1 @ /upnp/control/x_homeplug 21 urn:dslforum-org:service:X_AVM-DE_Filelinks:1 @ /upnp/control/x_filelinks 22 urn:dslforum-org:service:X_AVM-DE_Auth:1 @ /upnp/control/x_auth 23 urn:dslforum-org:service:WLANConfiguration:1 @ /upnp/control/wlanconfig1 24 urn:dslforum-org:service:WLANConfiguration:2 @ /upnp/control/wlanconfig2 25 urn:dslforum-org:service:WLANConfiguration:3 @ /upnp/control/wlanconfig3 26 urn:dslforum-org:service:Hosts:1 @ /upnp/control/hosts 27 urn:dslforum-org:service:LANEthernetInterfaceConfig:1 @ /upnp/control/lanethernetifcfg 28 urn:dslforum-org:service:LANHostConfigManagement:1 @ /upnp/control/lanhostconfigmgm 29 urn:dslforum-org:service:WANCommonInterfaceConfig:1 @ /upnp/control/wancommonifconfig1 30 urn:dslforum-org:service:WANDSLInterfaceConfig:1 @ /upnp/control/wandslifconfig1 31 urn:dslforum-org:service:WANDSLLinkConfig:1 @ /upnp/control/wandsllinkconfig1 32 urn:dslforum-org:service:WANEthernetLinkConfig:1 @ /upnp/control/wanethlinkconfig1 33 urn:dslforum-org:service:WANPPPConnection:1 @ /upnp/control/wanpppconn1 34 urn:dslforum-org:service:WANIPConnection:1 @ /upnp/control/wanipconnection1 ------------------------------------------- [action] Call with extraction of return arguments. [action] Call with parameters/arguments to be passed. [action] Attempt 1 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- doorbell --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' [HTTP] Request code: 200 [HTTP] Printing received reply (between lines): --------------------------------- Unauthenticated 860CA91E416DB466 F!Box SOAP-Auth s:Client UPnPError 503 --------------------------------- [action] Response status: Unauthenticated [action] Got an unauthenticated error. Using the new nonce and trying again. [takeNonce] Extracted the nonce '860CA91E416DB466' from the last request. [takeNonce] Your secret is 'doorbell:F!Box SOAP-Auth:Drei3Zehn!' [takeNonce] Your hashed secret is '6cfab983fe2515a5e747d280a6161d8a' [action] Attempt 2 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 [generateAuthToken] The auth token is '6a1f77eae5b0ff82c2b790ac58fff57c'. [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- 860CA91E416DB4666a1f77eae5b0ff82c2b790ac58fff57cdoorbellF!Box SOAP-Auth --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' [HTTP] Request code: 200 Fatal exception 9(LoadStoreAlignmentCause): epc1=0x402091b0, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000c11, depc=0x00000000 Exception (9): epc1=0x402091b0 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000c11 depc=0x00000000 >>>stack>>> ctx: cont sp: 3ffffa90 end: 3fffffc0 offset: 01a0 3ffffc30: 00000282 00000281 3ffffc60 40207760 3ffffc40: 3fff56d4 3ffe8c9d 3ffffc60 40208598 3ffffc50: 000000c8 3ffe8c9d 3ffeecb8 40203bcd 3ffffc60: 00000000 00000000 3fff5034 3fff505c 3ffffc70: 000d000f 00000020 0001bf68 40001388 3ffffc80: 3fff5074 0018001f 0000094b 40100600 3ffffc90: 000045e8 800008bd 3fff509c 0000006f 3ffffca0: 00fef7e4 3fff500c 0011001f 00000000 3ffffcb0: 3fff4f00 00000030 80fffd60 00000000 3ffffcc0: 00000000 000000c8 00000281 00000000 3ffffcd0: 0000000a 00000000 3ffffdc8 8020508a 3ffffce0: 00000000 3fff51ac 3fff5100 0018001f 3ffffcf0: 80004e4f 3fff5100 0018001f 80205177 3ffffd00: 00303000 00000030 80fffdb0 4020508a 3ffffd10: 3fff0634 0000002d 3fff596c 0281028f 3ffffd20: 00ff4f74 3ffffdb0 3ffffd60 402053a4 3ffffd30: 3ffffd6c 3ffffd60 3ffffd78 00000001 3ffffd40: 3ffffdb0 0000002d 3ffffdb0 3ffffdb0 3ffffd50: 3ffffdbc 3ffeecb8 3ffffe30 40203dc1 3ffffd60: 3fff4fd4 002d002f 00fffdb0 3fff4774 3ffffd70: 01fa01ff 00fffde0 3fff4fac 0018001f 3ffffd80: 00fffe3c 3ffeecb8 3ffffdb0 402053d4 3ffffd90: 3ffffde0 3ffffe3c 3fffff48 3ffffe48 3ffffda0: 3ffffe3c 3ffeecb8 3fffff48 40203f38 3ffffdb0: 3fff4f74 002d002f 0000313a 3fff4d6c 3ffffdc0: 01fa01ff 00000025 3fff4d44 0018001f 3ffffdd0: 00000007 3fff7b6c 0025002f 00000002 3ffffde0: 3fff7ba4 002d002f 00fffe3c 3fff456c 3ffffdf0: 01fa01ff 00fffe90 3ffffe3c 402053a4 3ffffe00: 3ffffe30 00000000 3ffffe3c 402053d4 3ffffe10: 3ffffe90 3fffff60 3ffeecb8 00000002 3ffffe20: 3ffffe54 3fffff60 3ffeecb8 402044c3 3ffffe30: 3fff4d00 004e004f 80fe8f95 49746547 3ffffe40: 006f666e 87000007 3fff7c14 0025002f 3ffffe50: 00ffff6c 3fff05d4 000f000f 002053a4 3ffffe60: 3ffffe9c 3ffffe90 3fffff48 00000000 3ffffe70: 3fffff6c 3ffeecb8 3fffff78 3fffff6c 3ffffe80: 3fffff60 3ffeecb8 3fffff78 402045c5 3ffffe90: 49746547 006f666e 871c331f 3fff7b0c 3ffffea0: 0025002f 00000025 3fffff78 40205177 3ffffeb0: 00000007 3ffef6e0 3ffe8f95 40204a6d 3ffffec0: 3fffff48 00000000 3fffff6c 402051c0 3ffffed0: 3ffeecb8 3fffff6c 3ffe86cb 3fffff00 3ffffee0: 3ffeecb8 3fffff78 3ffef6e0 402011c5 3ffffef0: 3fffff00 00000003 feefeffe feefeffe 3fffff00: 3fff0784 000c000f 00efeffe feefef00 3fffff10: feefeffe 80efeffe 3fff0584 0012001f 3fffff20: 00efeffe feefef00 feefeffe 80efeffe 3fffff30: 5577654e 6d695470 89ef0065 feefef00 3fffff40: feefeffe 80efeffe feefef00 feefeffe 3fffff50: 80efeffe feefef00 feefeffe 80efeffe 3fffff60: 3fff51d4 0281028f 00efeffe 49746547 3fffff70: 006f666e 87efeffe 3fff3f0c 0025002f 3fffff80: 00efeffe feefeffe feefeffe feefeffe 3fffff90: feefeffe feefeffe feefeffe 3ffef75c 3fffffa0: 3fffdad0 00000000 3ffef71c 40205ff4 3fffffb0: feefeffe feefeffe 3ffe84fc 40100b95 <<
jipp commented 4 years ago

tested now the original sketch for dialing out - no crash and no success:

[action] Call with extraction of return arguments.
[action] Call with parameters/arguments to be passed.
[action] Attempt 1 of calling X_AVM-DE_DialNumber on urn:dslforum-org:service:X_VoIP:1
[HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'.
[HTTP] Printing the XML to be posted (between lines):
---------------------------------
<?xml version="1.0"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:X_AVM-DE_DialNumber xmlns:u='urn:dslforum-org:service:X_VoIP:1'><NewX_AVM-DE_PhoneNumber>**1</NewX_AVM-DE_PhoneNumber></u:X_AVM-DE_DialNumber></s:Body></s:Envelope>
---------------------------------

[HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber'
[HTTP] Request code: 500
[HTTP] Printing received reply (between lines):
---------------------------------

---------------------------------

[action] Response status: 
[action]<error> Got an empty reply (e.g. http error). Trying again in 10s.
Aypac commented 4 years ago

Hmmm, mysterious. The error message you get means: "Attempt to read/write memory with an unaligned address (for example, trying to read/write a 32-bit word at an address that is not a multiple of 4)", see more here.

For the other program; I guess you already did this, rigtht? Can you also show me the code you are using? I just realized, that the line [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'. should read [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/x_voip'. which makes me wonder if the request is proper.

jipp commented 4 years ago

the crash got simply fixed by changing the usb port on the laptop - not reliable power ....

here the code for the router info. seems to have a problem wit hthis "http://192.168.178.1:49000/upnp/control/deviceinfo" -> not found webpage error 404 when pasted to a browser

code ``` /** * simple-router-info.ino * René Vollmer * Example code for the home-indicator-project [ https://www.instructables.com/id/Who-Is-Home-Indicator-aka-Weasley-Clock-Based-on-T ]. * * Please adjust your data below. * * Created on: 10.03.2020 * */ #if defined(ESP8266) //Imports for ESP8266 #include #include #include ESP8266WiFiMulti WiFiMulti; #elif defined(ESP32) //Imports for ESP32 #include #include #include WiFiMulti WiFiMulti; #endif #include //------------------------------------------------------------------------------------- // Put your router settings here //------------------------------------------------------------------------------------- // Wifi network name (SSID) const char* wifi_ssid = "aaaaaaa"; // Wifi network password const char* wifi_password = "bbbbbbb"; // The username if you created an account, "admin" otherwise const char* fuser = "ddddddd"; // The password for the aforementioned account. const char* fpass = "cccccc"; // IP address of your router. This should be "192.168.179.1" for most FRITZ!Boxes const char* IP = "192.168.178.1"; // Port of the API of your router. This should be 49000 for all TR-064 devices. const int PORT = 49000; //------------------------------------------------------------------------------------- // TR-064 connection TR064 connection(PORT, IP, fuser, fpass); //########################################################################################### //############################ OKAY, LET'S DO THIS! ######################################### //########################################################################################### void setup() { // You might want to change the baud-rate Serial.begin(115200); if(Serial) Serial.setDebugOutput(true); // Clear some space in the serial monitor. if(Serial) { Serial.println(); Serial.println(); Serial.println(); } // ************************************************** // Wait a few secs for warm-up (dunno why, was in the default code for http connections). // You might be able to remove this block for (uint8_t t = 4; t > 0; t--) { if(Serial) Serial.printf("[SETUP] WAIT %d...\n", t); delay(1000); if(Serial) Serial.flush(); } // ************************************************** // Connect to wifi ensureWIFIConnection(); // Initialize the TR-064 library // (IMPORTANT!) if(Serial) Serial.printf("Initialize TR-064 connection\n\n"); // Available debug levels are: // DEBUG_NONE, DEBUG_ERROR, DEBUG_WARNING, DEBUG_INFO, DEBUG_VERBOSE connection.debug_level = DEBUG_VERBOSE; connection.init(); ensureWIFIConnection(); if(Serial) Serial.println("-------------------------------------------"); String params[][2] = {{}}; String req[][2] = {{"NewModelName", ""}, {"NewSoftwareVersion", ""}, {"NewUpTime", ""}}; connection.action("urn:dslforum-org:service:DeviceInfo:1", "GetInfo", params, 0, req, 3); if(Serial) Serial.println("[main] Info retrieved."); if(Serial) Serial.println("[main] Router Model: " + req[0][1]); if(Serial) Serial.println("[main] Router software version: " + req[1][1]); if(Serial) Serial.println("[main] Router up time: " + req[2][1] + "s"); delay(5000); } void loop() { } /** * Makes sure there is a WIFI connection and waits until it is (re-)established. */ void ensureWIFIConnection() { if ((WiFiMulti.run() != WL_CONNECTED)) { WiFiMulti.addAP(wifi_ssid, wifi_password); WiFiMulti.run(); while ((WiFiMulti.run() != WL_CONNECTED)) { delay(500); } } } ```
jipp commented 4 years ago

here the log and sketch for the caller.ino (I checked the link you posted and enabled the check-box)

log ``` [action] Call with extraction of return arguments. [action] Call with parameters/arguments to be passed. [action] Attempt 1 of calling X_AVM-DE_DialNumber on urn:dslforum-org:service:X_VoIP:1 [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- doorbell**1 --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber' [HTTP] Request code: 500 [HTTP] Printing received reply (between lines): --------------------------------- --------------------------------- [action] Response status: [action] Got an empty reply (e.g. http error). Trying again in 10s. [action] Attempt 2 of calling X_AVM-DE_DialNumber on urn:dslforum-org:service:X_VoIP:1 [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- doorbell**1 --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber' [HTTP] Request code: 500 [HTTP] Printing received reply (between lines): --------------------------------- --------------------------------- [action] Response status: [action] Got an empty reply (e.g. http error). Trying again in 10s. [action] Attempt 3 of calling X_AVM-DE_DialNumber on urn:dslforum-org:service:X_VoIP:1 [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- doorbell**1 --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber' [HTTP] Request code: 500 [HTTP] Printing received reply (between lines): --------------------------------- --------------------------------- [action] Response status: [action] Got an empty reply (e.g. http error). Trying again in 10s. [action] Attempt 4 of calling X_AVM-DE_DialNumber on urn:dslforum-org:service:X_VoIP:1 [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000'. [HTTP] Printing the XML to be posted (between lines): --------------------------------- doorbell**1 --------------------------------- [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber' [HTTP] Request code: 500 [HTTP] Printing received reply (between lines): --------------------------------- --------------------------------- [action] Response status: [action] Got an empty reply (e.g. http error). Trying again in 10s. [action] Giving up the request. ... ```
file caller.ino ``` /** * caller.ino * Oliver-André Urban * based on * home-indicator.ino * by René Vollmer * * Example code for placing internal DECT phone calls * * Please adjust your data below. * * created on: 07.06.2017 * latest update: 11.06.2019 */ #include #if defined(ESP8266) //Imports for ESP8266 #include #include #include ESP8266WiFiMulti WiFiMulti; #elif defined(ESP32) //Imports for ESP32 #include #include #include WiFiMulti WiFiMulti; #endif #include // Flash BUTTON - you can connect a separate button to this pin or an opto-coupler // for example: use a resistor and an opto-coupler to connect to a doorbell #define BUTTON 0 //------------------------------------------------------------------------------------- // Put your router settings here //------------------------------------------------------------------------------------- // Wifi network name (SSID) const char* wifi_ssid = "aaaaaa"; // Wifi network password const char* wifi_password = "bbbbbb"; // The username if you created an account, "admin" otherwise const char* fuser = "cccccc"; // The password for the aforementioned account. const char* fpass = "ddddddd"; // IP address of your router. This should be "192.168.179.1" for most FRITZ!Boxes const char* IP = "192.168.178.1"; // Port of the API of your router. This should be 49000 for all TR-064 devices. const int PORT = 49000; // ------------------------------------------------------------------------------------- // TR-064 connection TR064 connection(PORT, IP, fuser, fpass); void setup() { Serial.begin(115200); // Wait a few secs for warm-up (dunno why, was in the default code for http connections). delay(5000); // Connect to wifi ensureWIFIConnection(); // Port as input pinMode(BUTTON, INPUT); connection.debug_level = DEBUG_VERBOSE; delay(3000); callWahlhilfe(); } void loop() { int button_state = digitalRead(BUTTON); if (digitalRead(BUTTON) == LOW) { if (Serial) { //Serial.println(); //Serial.printf("Button pressed"); } callWahlhilfe(); // callDect(); // char* status=getStatus(); delay(20000); } else { if (Serial) { //Serial.println(); //Serial.printf("Button not pressed"); } delay(50); } } void callWahlhilfe() { ensureWIFIConnection(); String params[][2] = {{"NewX_AVM-DE_PhoneNumber", "**1"}}; String req[][2] = {{}}; connection.action("urn:dslforum-org:service:X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0); } void callDect() { ensureWIFIConnection(); String params[][2] = {{"NewAIN", "12345 0123456"}, {"NewSwitchState", "TOGGLE"}}; connection.action("urn:dslforum-org:service:X_AVM-DE_Homeauto:1", "SetSwitch", params, 2); } String getStatus() { String paramsb[][2] = {{"NewAIN", "12345 0123456"}}; String reqb[][2] = {{"NewDeviceId", ""}, {"NewSwitchState", ""}}; connection.action("urn:dslforum-org:service:X_AVM-DE_Homeauto:1", "GetSpecificDeviceInfos", paramsb, 1, reqb, 2); return reqb[1][1]; } /** * Makes sure there is a WIFI connection and waits until it is (re-)established. */ void ensureWIFIConnection() { if ((WiFiMulti.run() != WL_CONNECTED)) { WiFiMulti.addAP(wifi_ssid, wifi_password); Serial.println("starting"); while ((WiFiMulti.run() != WL_CONNECTED)) { Serial.print("."); delay(100); } } } ```
Aypac commented 4 years ago

here the code for the router info. seems to have a problem wit hthis "http://192.168.178.1:49000/upnp/control/deviceinfo" -> not found webpage error 404 when pasted to a browser

Not sure what you are saying here: does it work from the ESP or does it not? If it does not work, can you post the log again?

Have you tried putting in **9 as a number (call all phones) for the caller example? Just thinking because if I place a request for a non-existing MAC I get the 500 error. @kirk-loeten have you maybe encountered this error before?

jipp commented 4 years ago

Hi

just reducing the troubleshooting to the simple-router-info.ino in a first trial to avoid config problems. Took your sketch and just entered my credentials and ip. also moved the loop content to the setup. to avoid multiple executions.

the syslog messages on the fritz box shows that the user authenticated correct.

the log messages from the sketch below:

show log ``` 21:03:13.456 -> rl�l⸮⸮|�⸮l⸮| ⸮ l⸮ b|⸮⸮⸮⸮r⸮b⸮ b⸮⸮nn⸮lnn⸮⸮⸮ bp⸮⸮lrlrlp⸮n⸮ ⸮ l ⸮⸮ b n⸮|l⸮ ⸮b⸮⸮nn⸮�l⸮⸮l`⸮nn l`nr⸮⸮⸮n b ⸮lr⸮⸮n b ⸮l⸮⸮ll⸮⸮l`⸮⸮n⸮ 21:03:13.557 -> 21:03:13.557 -> 21:03:13.557 -> [SETUP] WAIT 4... 21:03:13.662 -> scandone 21:03:13.662 -> state: 0 -> 2 (b0) 21:03:13.662 -> state: 2 -> 3 (0) 21:03:13.697 -> state: 3 -> 5 (10) 21:03:13.697 -> add 0 21:03:13.697 -> aid 3 21:03:13.697 -> cnt 21:03:13.697 -> 21:03:13.697 -> connected with wobilix, channel 11 21:03:13.697 -> dhcp client start... 21:03:13.730 -> ip:192.168.178.39,mask:255.255.255.0,gw:192.168.178.1 21:03:14.551 -> [SETUP] WAIT 3... 21:03:15.556 -> [SETUP] WAIT 2... 21:03:16.565 -> [SETUP] WAIT 1... 21:03:17.557 -> Initialize TR-064 connection 21:03:17.557 -> 21:03:17.557 -> [init] Started initialization of the TR-064 library. 21:03:17.660 -> [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/tr64desc.xml'. 21:03:17.660 -> [HTTP] GET... 21:03:17.660 -> [HTTP] Request code: 200 21:03:17.864 -> [HTTP] Printing received reply (between lines): 21:03:17.864 -> --------------------------------- 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> 1 21:03:17.864 -> 0 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> 220 21:03:17.864 -> 148 21:03:17.864 -> 7 21:03:17.864 -> 12 21:03:17.864 -> 72225 21:03:17.864 -> 148.07.12 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> urn:dslforum-org:device:InternetGatewayDevice:1 21:03:17.864 -> FRITZ!Box 6590 Cable 21:03:17.864 -> AVM 21:03:17.864 -> www.avm.de 21:03:17.864 -> FRITZ!Box 6590 Cable 21:03:17.864 -> FRITZ!Box 6590 Cable 21:03:17.864 -> - avm 21:03:17.864 -> www.avm.de 21:03:17.864 -> uuid:739f2409-bccb-40e7-8e6c-444E6DE56EBF 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> image/gif 21:03:17.864 -> 118 21:03:17.864 -> 119 21:03:17.864 -> 8 21:03:17.864 -> /ligd.gif 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> 21:03:17.864 -> urn:dslforum-org:service:DeviceInfo:1 21:03:17.967 -> urn:DeviceInfo-com:serviceId:DeviceInfo1 21:03:17.967 -> /upnp/control/deviceinfo 21:03:17.967 -> /upnp/control/deviceinfo 21:03:17.967 -> /deviceinfoSCPD.xml 21:03:17.967 -> 21:03:17.967 -> 21:03:17.967 -> urn:dslforum-org:service:DeviceConfig:1 21:03:17.967 -> urn:DeviceConfig-com:serviceId:DeviceConfig1 21:03:17.967 -> /upnp/control/deviceconfig 21:03:17.967 -> /upnp/control/deviceconfig 21:03:17.967 -> /deviceconfigSCPD.xml 21:03:17.967 -> 21:03:17.967 -> 21:03:17.967 -> urn:dslforum-org:service:Layer3Forwarding:1 21:03:17.967 -> urn:Layer3Forwarding-com:serviceId:Layer3Forwarding1 21:03:17.967 -> /upnp/control/layer3forwarding 21:03:17.967 -> /upnp/control/layer3forwarding 21:03:17.967 -> /layer3forwardingSCPD.xml 21:03:17.967 -> 21:03:17.967 -> 21:03:17.967 -> urn:dslforum-org:service:LANConfigSecurity:1 21:03:17.967 -> urn:LANConfigSecurity-com:serviceId:LANConfigSecurity1 21:03:18.033 -> /upnp/control/lanconfigsecurity 21:03:18.033 -> /upnp/control/lanconfigsecurity 21:03:18.033 -> /lanconfigsecuritySCPD.xml 21:03:18.033 -> 21:03:18.033 -> 21:03:18.033 -> urn:dslforum-org:service:ManagementServer:1 21:03:18.033 -> urn:ManagementServer-com:serviceId:ManagementServer1 21:03:18.033 -> /upnp/control/mgmsrv 21:03:18.033 -> /upnp/control/mgmsrv 21:03:18.033 -> /mgmsrvSCPD.xml 21:03:18.033 -> 21:03:18.033 -> 21:03:18.033 -> urn:dslforum-org:service:Time:1 21:03:18.033 -> urn:Time-com:serviceId:Time1 21:03:18.033 -> /upnp/control/time 21:03:18.033 -> /upnp/control/time 21:03:18.033 -> /timeSCPD.xml 21:03:18.033 -> 21:03:18.033 -> 21:03:18.033 -> urn:dslforum-org:service:UserInterface:1 21:03:18.033 -> urn:UserInterface-com:serviceId:UserInterface1 21:03:18.033 -> /upnp/control/userif 21:03:18.033 -> /upnp/control/userif 21:03:18.033 -> /userifSCPD.xml 21:03:18.033 -> 21:03:18.033 -> 21:03:18.033 -> urn:dslforum-org:service:X_AVM-DE_Storage:1 21:03:18.141 -> urn:X_AVM-DE_Storage-com:serviceId:X_AVM-DE_Storage1 21:03:18.141 -> /upnp/control/x_storage 21:03:18.141 -> /upnp/control/x_storage 21:03:18.141 -> /x_storageSCPD.xml 21:03:18.141 -> 21:03:18.141 -> 21:03:18.141 -> urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 21:03:18.141 -> urn:X_AVM-DE_WebDAV-com:serviceId:X_AVM-DE_WebDAVClient1 21:03:18.141 -> /upnp/control/x_webdav 21:03:18.141 -> /upnp/control/x_webdav 21:03:18.141 -> /x_webdavSCPD.xml 21:03:18.141 -> 21:03:18.141 -> 21:03:18.141 -> urn:dslforum-org:service:X_AVM-DE_UPnP:1 21:03:18.141 -> urn:X_AVM-DE_UPnP-com:serviceId:X_AVM-DE_UPnP1 21:03:18.141 -> /upnp/control/x_upnp 21:03:18.141 -> /upnp/control/x_upnp 21:03:18.141 -> /x_upnpSCPD.xml 21:03:18.141 -> 21:03:18.141 -> 21:03:18.141 -> urn:dslforum-org:service:X_AVM-DE_Speedtest:1 21:03:18.141 -> urn:X_AVM-DE_Speedtest-com:serviceId:X_AVM-DE_Speedtest1 21:03:18.210 -> /upnp/control/x_speedtest 21:03:18.210 -> /upnp/control/x_speedtest 21:03:18.210 -> /x_speedtestSCPD.xml 21:03:18.210 -> 21:03:18.210 -> 21:03:18.210 -> urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 21:03:18.210 -> urn:X_AVM-DE_RemoteAccess-com:serviceId:X_AVM-DE_RemoteAccess1 21:03:18.210 -> /upnp/control/x_remote 21:03:18.210 -> /upnp/control/x_remote 21:03:18.210 -> /x_remoteSCPD.xml 21:03:18.210 -> 21:03:18.210 -> 21:03:18.210 -> urn:dslforum-org:service:X_AVM-DE_MyFritz:1 21:03:18.210 -> urn:X_AVM-DE_MyFritz-com:serviceId:X_AVM-DE_MyFritz1 21:03:18.210 -> /upnp/control/x_myfritz 21:03:18.210 -> /upnp/control/x_myfritz 21:03:18.210 -> /x_myfritzSCPD.xml 21:03:18.210 -> 21:03:18.210 -> 21:03:18.210 -> urn:dslforum-org:service:X_VoIP:1 21:03:18.210 -> urn:X_VoIP-com:serviceId:X_VoIP1 21:03:18.210 -> /upnp/control/x_voip 21:03:18.210 -> /upnp/control/x_voip 21:03:18.312 -> /x_voipSCPD.xml 21:03:18.312 -> 21:03:18.312 -> 21:03:18.312 -> urn:dslforum-org:service:X_AVM-DE_OnTel:1 21:03:18.312 -> urn:X_AVM-DE_OnTel-com:serviceId:X_AVM-DE_OnTel1 21:03:18.312 -> /upnp/control/x_contact 21:03:18.312 -> /upnp/control/x_contact 21:03:18.312 -> /x_contactSCPD.xml 21:03:18.312 -> 21:03:18.312 -> urn:dslforum-org:service:X_AVM-DE_Dect:1urn:X_AVM-DE_Dect-com:serviceId:X_AVM-DE_Dect1/upnp/control/x_dect/upnp/control/x_dect/x_dectSCPD.xml 21:03:18.312 -> urn:dslforum-org:service:X_AVM-DE_TAM:1urn:X_AVM-DE_TAM-com:serviceId:X_AVM-DE_TAM1/upnp/control/x_tam/upnp/control/x_tam/x_tamSCPD.xml 21:03:18.312 -> 21:03:18.312 -> urn:dslforum-org:service:X_AVM-DE_AppSetup:1 21:03:18.312 -> urn:X_AVM-DE_AppSetup-com:serviceId:X_AVM-DE_AppSetup1 21:03:18.416 -> /upnp/control/x_appsetup 21:03:18.416 -> /upnp/control/x_appsetup 21:03:18.416 -> /x_appsetupSCPD.xml 21:03:18.416 -> 21:03:18.416 -> 21:03:18.416 -> urn:dslforum-org:service:X_AVM-DE_Homeauto:1 21:03:18.416 -> urn:X_AVM-DE_Homeauto-com:serviceId:X_AVM-DE_Homeauto1 21:03:18.416 -> /upnp/control/x_homeauto 21:03:18.416 -> /upnp/control/x_homeauto 21:03:18.416 -> /x_homeautoSCPD.xml 21:03:18.416 -> 21:03:18.416 -> 21:03:18.416 -> urn:dslforum-org:service:X_AVM-DE_Homeplug:1 21:03:18.416 -> urn:X_AVM-DE_Homeplug-com:serviceId:X_AVM-DE_Homeplug1 21:03:18.416 -> /upnp/control/x_homeplug 21:03:18.416 -> /upnp/control/x_homeplug 21:03:18.416 -> /x_homeplugSCPD.xml 21:03:18.416 -> 21:03:18.416 -> 21:03:18.416 -> urn:dslforum-org:service:X_AVM-DE_Filelinks:1 21:03:18.416 -> urn:X_AVM-DE_Filelinks-com:serviceId:X_AVM-DE_Filelinks1 21:03:18.416 -> /upnp/control/x_filelinks 21:03:18.486 -> /upnp/control/x_filelinks 21:03:18.486 -> /x_filelinksSCPD.xml 21:03:18.486 -> 21:03:18.486 -> 21:03:18.486 -> urn:dslforum-org:service:X_AVM-DE_Auth:1 21:03:18.486 -> urn:X_AVM-DE_Auth-com:serviceId:X_AVM-DE_Auth1 21:03:18.486 -> /upnp/control/x_auth 21:03:18.486 -> /upnp/control/x_auth 21:03:18.486 -> /x_authSCPD.xml 21:03:18.486 -> 21:03:18.486 -> 21:03:18.486 -> 21:03:18.486 -> 21:03:18.486 -> urn:dslforum-org:device:LANDevice:1 21:03:18.486 -> LANDevice - FRITZ!Box 6590 Cable 21:03:18.486 -> AVM 21:03:18.486 -> www.avm.de 21:03:18.486 -> LANDevice - FRITZ!Box 6590 Cable 21:03:18.486 -> LANDevice - FRITZ!Box 6590 Cable 21:03:18.486 -> - avm 21:03:18.486 -> www.avm.de 21:03:18.486 -> uuid:75802409-bccb-40e7-8e6b-444E6DE56EBF 21:03:18.486 -> AVM TR-064 21:03:18.486 -> 21:03:18.486 -> 21:03:18.486 -> urn:dslforum-org:service:WLANConfiguration:1 21:03:18.486 -> urn:WLANConfiguration-com:serviceId:WLANConfiguration1 21:03:18.594 -> /upnp/control/wlanconfig1 21:03:18.594 -> /upnp/control/wlanconfig1 21:03:18.594 -> /wlanconfigSCPD.xml 21:03:18.594 -> 21:03:18.594 -> urn:dslforum-org:service:WLANConfiguration:2urn:WLANConfiguration-com:serviceId:WLANConfiguration2/upnp/control/wlanconfig2/upnp/control/wlanconfig2/wlanconfigSCPD.xmlurn:dslforum-org:service:WLANConfiguration:3urn:WLANConfiguration-com:serviceId:WLANConfiguration3/upnp/control/wlanconfig3/upnp/control/wlanconfig3/wlanconfigSCPD.xml 21:03:18.594 -> 21:03:18.594 -> urn:dslforum-org:service:Hosts:1 21:03:18.594 -> urn:LanDeviceHosts-com:serviceId:Hosts1 21:03:18.594 -> /upnp/control/hosts 21:03:18.594 -> /upnp/control/hosts 21:03:18.664 -> /hostsSCPD.xml 21:03:18.664 -> 21:03:18.664 -> 21:03:18.664 -> urn:dslforum-org:service:LANEthernetInterfaceConfig:1 21:03:18.664 -> urn:LANEthernetIfCfg-com:serviceId:LANEthernetInterfaceConfig1 21:03:18.664 -> /upnp/control/lanethernetifcfg 21:03:18.664 -> /upnp/control/lanethernetifcfg 21:03:18.664 -> /ethifconfigSCPD.xml 21:03:18.664 -> 21:03:18.664 -> 21:03:18.664 -> urn:dslforum-org:service:LANHostConfigManagement:1 21:03:18.664 -> urn:LANHCfgMgm-com:serviceId:LANHostConfigManagement1 21:03:18.664 -> /upnp/control/lanhostconfigmgm 21:03:18.664 -> /upnp/control/lanhostconfigmgm 21:03:18.664 -> /lanhostconfigmgmSCPD.xml 21:03:18.664 -> 21:03:18.664 -> 21:03:18.664 -> 21:03:18.664 -> 21:03:18.664 -> urn:dslforum-org:device:WANDevice:1 21:03:18.664 -> WANDevice - FRITZ!Box 6590 Cable 21:03:18.664 -> AVM 21:03:18.664 -> www.avm.de 21:03:18.664 -> WANDevice - FRITZ!Box 6590 Cable 21:03:18.765 -> WANDevice - FRITZ!Box 6590 Cable 21:03:18.765 -> - avm 21:03:18.765 -> www.avm.de 21:03:18.765 -> uuid:75802409-bccb-40e7-8e6a-444E6DE56EBF 21:03:18.765 -> AVM TR-064 21:03:18.765 -> 21:03:18.765 -> 21:03:18.765 -> urn:dslforum-org:service:WANCommonInterfaceConfig:1 21:03:18.765 -> urn:WANCIfConfig-com:serviceId:WANCommonInterfaceConfig1 21:03:18.765 -> /upnp/control/wancommonifconfig1 21:03:18.765 -> /upnp/control/wancommonifconfig1 21:03:18.765 -> /wancommonifconfigSCPD.xml 21:03:18.765 -> 21:03:18.765 -> 21:03:18.765 -> urn:dslforum-org:service:WANDSLInterfaceConfig:1 21:03:18.765 -> urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1 21:03:18.765 -> /upnp/control/wandslifconfig1 21:03:18.765 -> /upnp/control/wandslifconfig1 21:03:18.765 -> /wandslifconfigSCPD.xml 21:03:18.765 -> 21:03:18.765 -> 21:03:18.765 -> 21:03:18.765 -> 21:03:18.765 -> urn:dslforum-org:device:WANConnectionDevice:1 21:03:18.832 -> WANConnectionDevice - FRITZ!Box 6590 Cable 21:03:18.832 -> AVM 21:03:18.832 -> www.avm.de 21:03:18.832 -> WANConnectionDevice - FRITZ!Box 6590 Cable 21:03:18.832 -> WANConnectionDevice - FRITZ!Box 6590 Cable 21:03:18.832 -> - avm 21:03:18.832 -> www.avm.de 21:03:18.832 -> uuid:75802409-bccb-40e7-8e69-444E6DE56EBF 21:03:18.832 -> AVM TR-064 21:03:18.832 -> 21:03:18.832 -> 21:03:18.832 -> urn:dslforum-org:service:WANDSLLinkConfig:1 21:03:18.832 -> urn:WANDSLLinkConfig-com:serviceId:WANDSLLinkConfig1 21:03:18.832 -> /upnp/control/wandsllinkconfig1 21:03:18.832 -> /upnp/control/wandsllinkconfig1 21:03:18.832 -> /wandsllinkconfigSCPD.xml 21:03:18.832 -> 21:03:18.832 -> 21:03:18.832 -> urn:dslforum-org:service:WANEthernetLinkConfig:1 21:03:18.832 -> urn:WANEthernetLinkConfig-com:serviceId:WANEthernetLinkConfig1 21:03:18.832 -> /upnp/control/wanethlinkconfig1 21:03:18.942 -> /upnp/control/wanethlinkconfig1 21:03:18.942 -> /wanethlinkconfigSCPD.xml 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> urn:dslforum-org:service:WANPPPConnection:1 21:03:18.942 -> urn:WANPPPConnection-com:serviceId:WANPPPConnection1 21:03:18.942 -> /upnp/control/wanpppconn1 21:03:18.942 -> /upnp/control/wanpppconn1 21:03:18.942 -> /wanpppconnSCPD.xml 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> urn:dslforum-org:service:WANIPConnection:1 21:03:18.942 -> urn:WANIPConnection-com:serviceId:WANIPConnection1 21:03:18.942 -> /upnp/control/wanipconnection1 21:03:18.942 -> /upnp/control/wanipconnection1 21:03:18.942 -> /wanipconnSCPD.xml 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> http://fritz.box 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> 21:03:18.942 -> --------------------------------- 21:03:18.942 -> 21:03:18.942 -> [initServiceURLs] Router name: 21:03:18.942 -> [initServiceURLs] Router model: 21:03:18.942 -> [initServiceURLs] Detected Services: 21:03:18.942 -> 1 urn:dslforum-org:service:DeviceInfo:1 @ /upnp/control/deviceinfo 21:03:18.942 -> 2 urn:dslforum-org:service:DeviceConfig:1 @ /upnp/control/deviceconfig 21:03:18.976 -> 3 urn:dslforum-org:service:Layer3Forwarding:1 @ /upnp/control/layer3forwarding 21:03:18.976 -> 4 urn:dslforum-org:service:LANConfigSecurity:1 @ /upnp/control/lanconfigsecurity 21:03:18.976 -> 5 urn:dslforum-org:service:ManagementServer:1 @ /upnp/control/mgmsrv 21:03:18.976 -> 6 urn:dslforum-org:service:Time:1 @ /upnp/control/time 21:03:19.010 -> 7 urn:dslforum-org:service:UserInterface:1 @ /upnp/control/userif 21:03:19.010 -> 8 urn:dslforum-org:service:X_AVM-DE_Storage:1 @ /upnp/control/x_storage 21:03:19.010 -> 9 urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 @ /upnp/control/x_webdav 21:03:19.010 -> 10 urn:dslforum-org:service:X_AVM-DE_UPnP:1 @ /upnp/control/x_upnp 21:03:19.045 -> 11 urn:dslforum-org:service:X_AVM-DE_Speedtest:1 @ /upnp/control/x_speedtest 21:03:19.045 -> 12 urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 @ /upnp/control/x_remote 21:03:19.045 -> 13 urn:dslforum-org:service:X_AVM-DE_MyFritz:1 @ /upnp/control/x_myfritz 21:03:19.045 -> 14 urn:dslforum-org:service:X_VoIP:1 @ /upnp/control/x_voip 21:03:19.078 -> 15 urn:dslforum-org:service:X_AVM-DE_OnTel:1 @ /upnp/control/x_contact 21:03:19.078 -> 16 urn:dslforum-org:service:X_AVM-DE_Dect:1 @ /upnp/control/x_dect 21:03:19.078 -> 17 urn:dslforum-org:service:X_AVM-DE_TAM:1 @ /upnp/control/x_tam 21:03:19.078 -> 18 urn:dslforum-org:service:X_AVM-DE_AppSetup:1 @ /upnp/control/x_appsetup 21:03:19.113 -> 19 urn:dslforum-org:service:X_AVM-DE_Homeauto:1 @ /upnp/control/x_homeauto 21:03:19.113 -> 20 urn:dslforum-org:service:X_AVM-DE_Homeplug:1 @ /upnp/control/x_homeplug 21:03:19.113 -> 21 urn:dslforum-org:service:X_AVM-DE_Filelinks:1 @ /upnp/control/x_filelinks 21:03:19.113 -> 22 urn:dslforum-org:service:X_AVM-DE_Auth:1 @ /upnp/control/x_auth 21:03:19.146 -> 23 urn:dslforum-org:service:WLANConfiguration:1 @ /upnp/control/wlanconfig1 21:03:19.146 -> 24 urn:dslforum-org:service:WLANConfiguration:2 @ /upnp/control/wlanconfig2 21:03:19.146 -> 25 urn:dslforum-org:service:WLANConfiguration:3 @ /upnp/control/wlanconfig3 21:03:19.146 -> 26 urn:dslforum-org:service:Hosts:1 @ /upnp/control/hosts 21:03:19.184 -> 27 urn:dslforum-org:service:LANEthernetInterfaceConfig:1 @ /upnp/control/lanethernetifcfg 21:03:19.184 -> 28 urn:dslforum-org:service:LANHostConfigManagement:1 @ /upnp/control/lanhostconfigmgm 21:03:19.184 -> 29 urn:dslforum-org:service:WANCommonInterfaceConfig:1 @ /upnp/control/wancommonifconfig1 21:03:19.184 -> 30 urn:dslforum-org:service:WANDSLInterfaceConfig:1 @ /upnp/control/wandslifconfig1 21:03:19.220 -> 31 urn:dslforum-org:service:WANDSLLinkConfig:1 @ /upnp/control/wandsllinkconfig1 21:03:19.220 -> 32 urn:dslforum-org:service:WANEthernetLinkConfig:1 @ /upnp/control/wanethlinkconfig1 21:03:19.220 -> 33 urn:dslforum-org:service:WANPPPConnection:1 @ /upnp/control/wanpppconn1 21:03:19.220 -> 34 urn:dslforum-org:service:WANIPConnection:1 @ /upnp/control/wanipconnection1 21:03:19.288 -> ------------------------------------------- 21:03:19.288 -> [action] Call with extraction of return arguments. 21:03:19.288 -> [action] Call with parameters/arguments to be passed. 21:03:19.288 -> [action] Attempt 1 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 21:03:19.288 -> [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. 21:03:19.288 -> [HTTP] Printing the XML to be posted (between lines): 21:03:19.288 -> --------------------------------- 21:03:19.288 -> 21:03:19.288 -> doorbell 21:03:19.288 -> --------------------------------- 21:03:19.288 -> 21:03:19.391 -> [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' 21:03:19.391 -> [HTTP] Request code: 200 21:03:19.391 -> [HTTP] Printing received reply (between lines): 21:03:19.391 -> --------------------------------- 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> Unauthenticated 21:03:19.391 -> A41EA505FE6112E4 21:03:19.391 -> F!Box SOAP-Auth 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> s:Client 21:03:19.391 -> UPnPError 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 503 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> 21:03:19.391 -> --------------------------------- 21:03:19.391 -> 21:03:19.391 -> [action] Response status: Unauthenticated 21:03:19.391 -> [action] Got an unauthenticated error. Using the new nonce and trying again. 21:03:19.391 -> [takeNonce] Extracted the nonce 'A41EA505FE6112E4' from the last request. 21:03:19.497 -> [takeNonce] Your secret is 'doorbell:F!Box SOAP-Auth:Drei3Zehn' 21:03:19.497 -> [takeNonce] Your hashed secret is '7e87b69f4dbc6839867620fd44d6d702' 21:03:19.497 -> [action] Attempt 2 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 21:03:19.497 -> [generateAuthToken] The auth token is '484f2c1e7b67614ac8caae047dbb6c9d'. 21:03:19.497 -> [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. 21:03:19.497 -> [HTTP] Printing the XML to be posted (between lines): 21:03:19.497 -> --------------------------------- 21:03:19.497 -> 21:03:19.497 -> A41EA505FE6112E4484f2c1e7b67614ac8caae047dbb6c9ddoorbellF!Box SOAP-Auth 21:03:19.497 -> --------------------------------- 21:03:19.497 -> 21:03:20.808 -> [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' 21:03:20.808 -> [HTTP] Request code: 200 21:03:20.808 -> [HTTP] Printing received reply (between lines): 21:03:20.808 -> --------------------------------- 21:03:20.808 -> 21:03:20.808 -> --------------------------------- 21:03:20.808 -> 21:03:20.808 -> [action] Response status: 21:03:20.808 -> [action] Got an empty reply (e.g. http error). Trying again in 10s. 21:03:23.662 -> pm open,type:2 0 21:03:30.891 -> [action] Attempt 3 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 21:03:30.891 -> [generateAuthToken] The auth token is '484f2c1e7b67614ac8caae047dbb6c9d'. 21:03:30.891 -> [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. 21:03:30.891 -> [HTTP] Printing the XML to be posted (between lines): 21:03:30.891 -> --------------------------------- 21:03:30.891 -> 21:03:30.891 -> A41EA505FE6112E4484f2c1e7b67614ac8caae047dbb6c9ddoorbellF!Box SOAP-Auth 21:03:30.891 -> --------------------------------- 21:03:30.891 -> 21:03:32.250 -> [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' 21:03:32.250 -> [HTTP] Request code: 200 21:03:32.250 -> [HTTP] Printing received reply (between lines): 21:03:32.250 -> --------------------------------- 21:03:32.250 -> 21:03:32.250 -> --------------------------------- 21:03:32.250 -> 21:03:32.250 -> [action] Response status: 21:03:32.250 -> [action] Got an empty reply (e.g. http error). Trying again in 10s. 21:03:42.293 -> [action] Attempt 4 of calling GetInfo on urn:dslforum-org:service:DeviceInfo:1 21:03:42.293 -> [generateAuthToken] The auth token is '484f2c1e7b67614ac8caae047dbb6c9d'. 21:03:42.293 -> [HTTP] Prepare HTTP request to URL: 'http://192.168.178.1:49000/upnp/control/deviceinfo'. 21:03:42.293 -> [HTTP] Printing the XML to be posted (between lines): 21:03:42.293 -> --------------------------------- 21:03:42.293 -> 21:03:42.293 -> A41EA505FE6112E4484f2c1e7b67614ac8caae047dbb6c9ddoorbellF!Box SOAP-Auth 21:03:42.293 -> --------------------------------- 21:03:42.293 -> 21:03:43.726 -> [HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:DeviceInfo:1#GetInfo' 21:03:43.726 -> [HTTP] Request code: 200 21:03:43.726 -> [HTTP] Printing received reply (between lines): 21:03:43.726 -> --------------------------------- 21:03:43.726 -> 21:03:43.726 -> --------------------------------- 21:03:43.726 -> 21:03:43.726 -> [action] Response status: 21:03:43.726 -> [action] Got an empty reply (e.g. http error). Trying again in 10s. 21:03:53.715 -> [action] Giving up the request. 21:03:53.715 -> [main] Info retrieved. 21:03:53.715 -> [main] Router Model: 21:03:53.715 -> [main] Router software version: 21:03:53.715 -> [main] Router up time: s ```
Aypac commented 4 years ago

Hi, Sorry things are a bit turbulent with COVID right now. I'll come back to you ASAP.

jipp commented 4 years ago

Hi

no problem - there are more urgent things in live than coding. - hope all is fine.

nevertheless I have run the "simple-router-info.ino" on platformio and tried again. looks like " connection.init()" was the key here - seems to be mandatory.

[main] Info retrieved.
[main] Router Model: FRITZ!Box 6590 Cable
[main] Router software version: 148.07.12
[main] Router up time: 198542s

Next try would be doing some dialout.

cheers Wolfgang

jipp commented 4 years ago

HI

just added one additional printout in the tr064.cpp to see the reply from the router - typically it is only printed with return code 200:

[HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber'
[HTTP] Request code: 500
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
[HTTP] Printing received reply (between lines):
---------------------------------

---------------------------------

from the avm docs I see that this is:

If an unknown action is used the returned code is 401. This return code is used for obsoleted actions, too.

cheers Wolfgang

Aypac commented 4 years ago

no problem - there are more urgent things in live than coding. - hope all is fine.

Yes, all is fine :) Just got a bit busy.

nevertheless I have run the "simple-router-info.ino" on platformio and tried again. looks like " connection.init()" was the key here - seems to be mandatory.

That is indeed required, but that should have been there as also witnessed by the output you posted:

21:03:18.942 -> [initServiceURLs] Detected Services: [...]

Weird. But whatever they say about gift horses... It seems to work now. On top, I'll push a change soon that makes sure .init() runs before any .action is triggered.

Which brings me to the new error you see

[HTTP] POSTing the XML to SOAPACTION: 'urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber' and If an unknown action is used the returned code is 401. This return code is used for obsoleted actions, too.

indeed looking at the services provided by your router that service does not seem to be available...

Detected Services ``` 21:03:18.942 -> [initServiceURLs] Detected Services: 21:03:18.942 -> 1 urn:dslforum-org:service:DeviceInfo:1 @ /upnp/control/deviceinfo 21:03:18.942 -> 2 urn:dslforum-org:service:DeviceConfig:1 @ /upnp/control/deviceconfig 21:03:18.976 -> 3 urn:dslforum-org:service:Layer3Forwarding:1 @ /upnp/control/layer3forwarding 21:03:18.976 -> 4 urn:dslforum-org:service:LANConfigSecurity:1 @ /upnp/control/lanconfigsecurity 21:03:18.976 -> 5 urn:dslforum-org:service:ManagementServer:1 @ /upnp/control/mgmsrv 21:03:18.976 -> 6 urn:dslforum-org:service:Time:1 @ /upnp/control/time 21:03:19.010 -> 7 urn:dslforum-org:service:UserInterface:1 @ /upnp/control/userif 21:03:19.010 -> 8 urn:dslforum-org:service:X_AVM-DE_Storage:1 @ /upnp/control/x_storage 21:03:19.010 -> 9 urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 @ /upnp/control/x_webdav 21:03:19.010 -> 10 urn:dslforum-org:service:X_AVM-DE_UPnP:1 @ /upnp/control/x_upnp 21:03:19.045 -> 11 urn:dslforum-org:service:X_AVM-DE_Speedtest:1 @ /upnp/control/x_speedtest 21:03:19.045 -> 12 urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 @ /upnp/control/x_remote 21:03:19.045 -> 13 urn:dslforum-org:service:X_AVM-DE_MyFritz:1 @ /upnp/control/x_myfritz 21:03:19.045 -> 14 urn:dslforum-org:service:X_VoIP:1 @ /upnp/control/x_voip 21:03:19.078 -> 15 urn:dslforum-org:service:X_AVM-DE_OnTel:1 @ /upnp/control/x_contact 21:03:19.078 -> 16 urn:dslforum-org:service:X_AVM-DE_Dect:1 @ /upnp/control/x_dect 21:03:19.078 -> 17 urn:dslforum-org:service:X_AVM-DE_TAM:1 @ /upnp/control/x_tam 21:03:19.078 -> 18 urn:dslforum-org:service:X_AVM-DE_AppSetup:1 @ /upnp/control/x_appsetup 21:03:19.113 -> 19 urn:dslforum-org:service:X_AVM-DE_Homeauto:1 @ /upnp/control/x_homeauto 21:03:19.113 -> 20 urn:dslforum-org:service:X_AVM-DE_Homeplug:1 @ /upnp/control/x_homeplug 21:03:19.113 -> 21 urn:dslforum-org:service:X_AVM-DE_Filelinks:1 @ /upnp/control/x_filelinks 21:03:19.113 -> 22 urn:dslforum-org:service:X_AVM-DE_Auth:1 @ /upnp/control/x_auth 21:03:19.146 -> 23 urn:dslforum-org:service:WLANConfiguration:1 @ /upnp/control/wlanconfig1 21:03:19.146 -> 24 urn:dslforum-org:service:WLANConfiguration:2 @ /upnp/control/wlanconfig2 21:03:19.146 -> 25 urn:dslforum-org:service:WLANConfiguration:3 @ /upnp/control/wlanconfig3 21:03:19.146 -> 26 urn:dslforum-org:service:Hosts:1 @ /upnp/control/hosts 21:03:19.184 -> 27 urn:dslforum-org:service:LANEthernetInterfaceConfig:1 @ /upnp/control/lanethernetifcfg 21:03:19.184 -> 28 urn:dslforum-org:service:LANHostConfigManagement:1 @ /upnp/control/lanhostconfigmgm 21:03:19.184 -> 29 urn:dslforum-org:service:WANCommonInterfaceConfig:1 @ /upnp/control/wancommonifconfig1 21:03:19.184 -> 30 urn:dslforum-org:service:WANDSLInterfaceConfig:1 @ /upnp/control/wandslifconfig1 21:03:19.220 -> 31 urn:dslforum-org:service:WANDSLLinkConfig:1 @ /upnp/control/wandsllinkconfig1 21:03:19.220 -> 32 urn:dslforum-org:service:WANEthernetLinkConfig:1 @ /upnp/control/wanethlinkconfig1 21:03:19.220 -> 33 urn:dslforum-org:service:WANPPPConnection:1 @ /upnp/control/wanpppconn1 21:03:19.220 -> 34 urn:dslforum-org:service:WANIPConnection:1 @ /upnp/control/wanipconnection1 ```

Maybe try to explore these?

  1. urn:dslforum-org:service:X_VoIP:1 @ /upnp/control/x_voip
  2. urn:dslforum-org:service:X_AVM-DE_OnTel:1 @ /upnp/control/x_contact
  3. urn:dslforum-org:service:X_AVM-DE_Dect:1 @ /upnp/control/x_dect
0xE0-rng commented 4 years ago

I did not follow all steps you discussed in perfect detail, but I just wanted to confirm that this problem also happens on the 7590. I tried your and also get the error

17:17:58.334 -> Button pressed[action] no nonce/realm found. requesting...
17:17:58.334 -> [HTTP] prepare request to URL: http://192.168.178.1:49000
17:17:58.369 -> [HTTP] POST... SOAPACTION: 'urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo'
17:17:58.369 -> [HTTP] request code: 500

Also, just as above:

 curl -s -k -m 5 --anyauth -u "klingel:ringdingringdingringdingringding" "http://192.168.178.1:49000/upnp/control/deviceinfo" -H 'Content-Type: text/xml; charset="utf-8"' -H "SoapAction:urn:dslforum-org:service:DeviceInfo:1#GetInfo" -d "<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Header><h:InitChallenge xmlns:h=\"http://soap-authentication.org/digest/2001/10/\" s:mustUnderstand=\"1\"><UserID>doorbell</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>"

creates

<?xml version="1.0"?>
 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Header>
<h:Challenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
<Status>Unauthenticated</Status>
<Nonce>353C512DBD67CCFF</Nonce>
<Realm>F!Box SOAP-Auth</Realm>
</h:Challenge>
</s:Header>
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>503</errorCode>
<errorDescription></errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

Let me know if I can do anything to help :)

Aypac commented 4 years ago

Let's move this into a separate issue, otherwise it'll be a bit messy here (also I'm not sure yet, if this really is the same problem).

Aypac commented 3 years ago

Hi Wolfgang, did you make any progress with this?

jipp commented 3 years ago

was stuck with other projects - will continue soon

jipp commented 3 years ago

HI

I started looking into the issue again and tried the latest version from main - still no success.

shall we open the current TR again, or is ther another to jump on?

cheers Wolfgang

Aypac commented 2 years ago

There is a new release now (1.2.0 / 3fb0d1b) that might fix it.

Aypac commented 1 year ago

Hi @jipp , Please try the new release 1.2.1. If this does not solve your issue, please reopen this issue.