Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception 28 #62

Open
Bonbon604 opened this issue Feb 8, 2023 · 51 comments
Open

Exception 28 #62

Bonbon604 opened this issue Feb 8, 2023 · 51 comments
Assignees
Labels

Comments

@Bonbon604
Copy link

Hi,

does anyone know what coud be the issue?
It happens in line "connection.init();"

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads Decoding 9 results 0x40205d7f: String::reserve(unsigned int) at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/WString.cpp line 192 (discriminator 4) 0x402060a8: String::concat(char const*, unsigned int) at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/WString.cpp line 353 0x40100cc2: umm_free at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266\umm_malloc/umm_malloc.cpp line 688 : (inlined by) umm_free at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266\umm_malloc/umm_malloc.cpp line 667 0x40204aea: operator+(String&&, String const&) at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/WString.h line 404 : (inlined by) TR064::initServiceURLs() at C:\Users\me\Documents\Arduino\libraries\TR064\src/tr064.cpp line 129 0x40207308: esp_delay__delay(long unsigned int):: > at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/coredecls.h line 69 : (inlined by) esp_delay__delay(long unsigned int):: > at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/coredecls.h line 78 : (inlined by) __delay at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/core_esp8266_wiring.cpp line 39 0x40201a2f: setup at C:\Users\me\Documents\Arduino\home-indicator/home-indicator.ino line 159 0x40206dc8: loop_wrapper() at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/core_esp8266_main.cpp line 255 0x40100fed: cont_wrapper at C:\Users\me\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266/cont.S line 81

@saak2820
Copy link
Contributor

saak2820 commented Feb 9, 2023

Please post a debug verbose output and your Fritzbox version.

@Bonbon604
Copy link
Author

Sorry I'm very new at esp and also in programming. What is the debug verbose output? 😬
Here is my fritzbox version:
Screenshot_20230210-064450~3

@saak2820
Copy link
Contributor

@Bonbon604
Copy link
Author

Bonbon604 commented Feb 16, 2023

Click to see expanded log [SETUP] WAIT 4... [SETUP] WAIT 3... [SETUP] WAIT 2... [SETUP] WAIT 1... Initialize TR-064 connection

[TR064][httpRequest] prepare request to URL: http://192.168.178.1:49000/tr64desc.xml
[TR064][httpRequest] GET...
[TR064][httpRequest] Response code: 200
[TR064][initServiceURLs] get the Stream
[TR064][initServiceURLs] 0 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 1 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 2 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 3 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 4 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 5 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 6 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 7 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 8 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 9 readServiceName: @ readServiceUrl:
[TR064][initServiceURLs] 10 readServiceName: @ readServiceUrl:
...
...
...
[TR064][initServiceURLs] 301 readServiceName: @ readServiceUrl:
Fatal exception 28(LoadProhibitedCause):
epc1=0x4000e140, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000000f, depc=0x00000000

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):
epc1=0x4000e140 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000000f depc=0x00000000

stack>>>

ctx: cont
sp: 3ffffd70 end: 3fffffd0 offset: 0190
3fffff00: 0000402d 00000001 3fffff5c 40205bf7
3fffff10: 00323033 00000001 3fffff5c 40205f20
3fffff20: 3fff1fb4 0000000f 3fff11ac 401009dc
3fffff30: 3ffe935e 3ffe9344 3fffff68 3fff1060
3fffff40: 0000012e 3fff106c 3ffef2f8 4020498a
3fffff50: 00000000 000b000f 00000000 3fff1fb4
3fffff60: 002e402f 83000000 00000000 002e002f
3fffff70: 00000000 00000000 001c001f 00000000
3fffff80: 3ffef31c 00000001 00000064 40207180
3fffff90: 00001388 3ffef2f8 3ffef2f8 3ffefe84
3fffffa0: 3ffe85c8 3ffef2f8 3ffefddc 402018b6
3fffffb0: 3fffdad0 00000000 3ffefe58 40206c40
3fffffc0: feefeffe feefeffe 3fffdab0 40100ca9
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v0004a3b0
~ld

@Aypac
Copy link
Owner

Aypac commented Feb 16, 2023

Can you check if you get anything if you visit http://192.168.178.1:49000/tr64desc.xml in your browser?

@Bonbon604
Copy link
Author

yes, i got an xml. What should I search for?

@Aypac
Copy link
Owner

Aypac commented Feb 16, 2023

Can you post the first couple of lines? And to be sure, what version do this library do you have installed?

@Bonbon604
Copy link
Author

Bonbon604 commented Feb 16, 2023

1.2.2 is installed
the library works fine with esp32 but not with esp8266 :(

xml

@Aypac
Copy link
Owner

Aypac commented Feb 16, 2023

Ok, the XML seems fine.
The note that it only works on esp32 is very helpful, then I have an idea what direction to investigate into.
I looked at the code; what surprises me is, that these lines:

[TR064][initServiceURLs] 0 readServiceName: @ readServiceUrl:

seem to indicate, that the XML is faulty (which does not seem the case) or some other error retrieving it (which from your comment could have something to do with the wifi library difference between ESP8266 and ESP32.
However, if that was the case, it should stop after finding a single empty one. But it does not - which eventually leads to the µC crashing, because it can only hold a max of 100 lines.
So why two questions we have to figure out:

  1. why does xmlTakeParam return empty results? Does it get empty input to begin with?
  2. why does the code not stop then? Does xmlTakeParam return the proper 'false' flag?

I have to see when I can find the time to investigate this further.

@saak2820
Copy link
Contributor

In the meantime, you can execute the commands without loading the xml.

// without loading available services through init() you have to set the url
// you find the url in the XML file http://192.168.178.1:49000/tr64desc.xml

Example in caller.ino
if(connection.state()<0){
// connection.init();
}
connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0, "/upnp/control/x_voip");

@TritonX
Copy link

TritonX commented Feb 21, 2023

Hello,
I have got exactly the same problem as Bonbon604 described (even with a different fritzbox):

  1. I am using a WEMOS Lolin D1 mini.
  2. the Fritzbox dumps:

grafik

  1. the WEMOS replies (using VERBOSE):
    23:03:01.997 -> Initialize TR-064 connection
    23:03:01.997 ->
    23:03:02.078 -> [TR064][httpRequest] prepare request to URL: http://192.168.1.10:49000/tr64desc.xml
    23:03:02.078 -> [TR064][httpRequest] GET...
    23:03:02.078 -> [TR064][httpRequest] Response code: 200
    23:03:02.112 -> [TR064][initServiceURLs] get the Stream
    23:03:02.112 -> [TR064][initServiceURLs] 0 readServiceName: @ readServiceUrl:
    23:03:02.112 -> [TR064][initServiceURLs] 1 readServiceName: @ readServiceUrl:
    23:03:02.112 -> [TR064][initServiceURLs] 2 readServiceName: @ readServiceUrl:
    23:03:02.112 -> [TR064][initServiceURLs] 3 readServiceName: @ readServiceUrl:
    23:03:02.112 -> [TR064][initServiceURLs] 4 readServiceName: @ readServiceUrl:
    ...
    23:03:02.675 -> [TR064][initServiceURLs] 99 readServiceName: @ readServiceUrl:
    23:03:02.675 -> [TR064][initServiceURLs] 100 readServiceName: ���?���?���?$��?
    �����?|�� @ readServiceUrl:
    23:03:02.675 -> [TR064][initServiceURLs] 101 readServiceName: @ readServiceUrl:
    23:03:02.675 -> [TR064][initServiceURLs] 102 readServiceName: @ readServiceUrl:
    23:03:02.708 -> [TR064][initServiceURLs] 103 readServiceName: @ readServiceUrl:
    23:03:02.708 -> [TR064][initServiceURLs] 104 readServiceName: ��� @��4
    23:03:02.708 -> �?�t� @����t� @�� @ @ readServiceUrl:
    23:03:02.708 -> [TR064][initServiceURLs] 105 readServiceName: 4
    23:03:02.708 -> �?�t� @����t� @�� @��Fatal exception 28(LoadProhibitedCause):
    23:03:02.708 -> epc1=0x4000e149, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000100, depc=0x00000000
    23:03:02.740 ->
    23:03:02.740 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
    23:03:02.740 ->
    23:03:02.740 -> Exception (28):
    23:03:02.740 -> epc1=0x4000e149 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000100 depc=0x00000000
    23:03:02.740 ->
    23:03:02.740 -> >>>stack>>>
    23:03:02.740 ->
    23:03:02.740 -> ctx: cont
    23:03:02.740 -> sp: 3ffffd60 end: 3fffffd0 offset: 0190
    23:03:02.740 -> 3ffffef0: 3ffe91ff 00004040 3fffff60 4020553b
    23:03:02.740 -> 3fffff00: 00000000 00000001 3fffff60 402058f8
    23:03:02.775 -> 3fffff10: 3fff1fcc 00000100 3ffe85dc 00000013
    23:03:02.775 -> 3fffff20: 3ffe91ff 3ffefcc4 3fffff60 00000013
    23:03:02.775 -> 3fffff30: 3ffe91ff 3ffefcc4 3fffff60 40205ca6
    23:03:02.775 -> 3fffff40: 00000069 0000000a 3fffff60 3ffefcc4
    23:03:02.775 -> 3fffff50: 00000069 3ffefcdc 3ffef1c8 402043c2
    23:03:02.775 -> 3fffff60: 3fff1fcc 0013403f 80000000 00000000
    23:03:02.775 -> 3fffff70: 006d006f 00000000 00000000 002e002f
    23:03:02.808 -> 3fffff80: 00000000 00000000 001c001f 00000000
    23:03:02.808 -> 3fffff90: 3ffef1ec 00000001 00000064 40206531
    23:03:02.808 -> 3fffffa0: 4020446e 3ffef1c8 3ffef1c8 3ffefd50
    23:03:02.808 -> 3fffffb0: 3fffdad0 00000000 3ffefd24 402065f0
    23:03:02.808 -> 3fffffc0: feefeffe feefeffe 3fffdab0 40100d4d
    23:03:02.808 -> <<<stack<<<
    23:03:02.808 ->
    23:03:02.808 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
    23:03:02.854 ->
    23:03:02.854 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)
    23:03:02.854 ->
    23:03:02.854 -> load 0x4010f000, len 3424, room 16
    ...

  2. the Fritzbox indicates correct connection to it on Wifi level

I have tested several programs (c't, Reichelt, the examples in this repository), but all show the same problem.
Also the former version of this library, the same.
Finally I discovered, that the program stops working (with the above results) a the function call of the "connection.init();" in line 93 of "DECT_Caller".
When it scans the reply from the fritzbox (see point 2), it seems not be able to find the information in the tags. Maybe there is no stream to be scanned...?

How can I discover the issue? Is there a hardware which has been proven to work with this library and a fritz.box 7490?

Any help to get a running system would be appreciated.

Thanks
Andreas

@Aypac
Copy link
Owner

Aypac commented Feb 21, 2023

I'm actually working on debugging this right now. I think I found the issue actually. With a bit of luck I can upload a fixed version in a bit. Looks like I messed up the pointers to the http stream when integrating the PR for https.

Aypac added a commit that referenced this issue Feb 22, 2023
This was caused by the xmlTakeParam function not working anymore because of an incorrect pointer in tr064client (which was presumably due to the introduction of https and thus the difference between tr064SimpleClient and tr064SslClient)
@Aypac
Copy link
Owner

Aypac commented Feb 22, 2023

Can you test with the commit d4324bd on the develop branch? I think it should fix this issue.

@Aypac Aypac added the bug label Feb 22, 2023
@Aypac Aypac self-assigned this Feb 22, 2023
@Aypac Aypac modified the milestone: Version 1.2.0 Feb 22, 2023
@TritonX
Copy link

TritonX commented Feb 22, 2023

Hello Aypac,
thanks for your fast reaction and support. I will try this tomorrow and provide you feedback on the result.
Just for curiosity: I am using the http (not https) URL to get the xml stream. Has you error been in the part for the http or in the one for https?
BR
Andreas

@TritonX
Copy link

TritonX commented Feb 23, 2023

Hi,
tested it today and got a different log (VERBOSE):

/after Reset/

[TR064][initServiceURLs] getting the service detect page
[TR064][httpRequest] prepare request to URL: 192.168.1.10:49000/tr64desc.xml
[TR064][httpRequest] GET...
[TR064][httpRequest] Response code: 200
[TR064][initServiceURLs] initServiceUrls failed: could not connect
pm open,type:2 0

/after Button pressed/

Button pressed[TR064][initServiceURLs] getting the service detect page
[TR064][httpRequest] prepare request to URL: 192.168.1.10:49000/tr64desc.xml
[TR064][httpRequest] GET...
[TR064][httpRequest] Response code: 200
[TR064][initServiceURLs] initServiceUrls failed: could not connect
[TR064][action] with extraction
[TR064][cleanOldServiceName] searching for prefix in servicename: X_VoIP:1
[TR064][action_raw] with parameter, NewX_AVM-DE_PhoneNumber
[TR064][action_raw] with parametervalue, **610
[TR064][httpRequest] URL is empty, abort http request.
[TR064][action] Request Failed

Seems to be a step further, but stuck at another point.

BR
Andreas

@Aypac
Copy link
Owner

Aypac commented Feb 24, 2023

Thanks TritonX!
I hope I can find some time soon to further debug this. It seemed to be working for me on an ESP8266. I've never gotten [TR064][initServiceURLs] initServiceUrls failed: could not connect, but I can still see if I can figure out what's going on for you.

RE your question: I'm actually not sure anymore if this was actually caused by the switch to https (as that should only be on develop and not on master 1.2.2). On develop the problem was that you need to switch to a different library/pointer when using https. And there was a mistake in using the right pointer, which also affected the http method.
But to be honest, I had started working on release 1.3.0 with a few additional features (among them https) and at this point, I'd rather make that work than try to fix 1.2.x versions.

@TritonX
Copy link

TritonX commented Feb 24, 2023

Hi Rene, thanks for answering. I am also using a ESP8266 (actually the original Wemos Lolin D1 mini). No problem, I can also use the version 1.3, if you will release this soon in the future. Til then, what was your working combination? (ESP8266, Version 1.2.2?, http or https?, ...) I could try to use the same, than it should work. Thanks in advance, Andreas

@Aypac
Copy link
Owner

Aypac commented Feb 24, 2023

Also to repeat what @saak2820 said (because there seem to be at least three people with this problem right now):
The code causing an error here is actually somewhat optional and just supposed to make it a bit easier to use. It is looking up the URLs for the serviceType/command for you.
To fix this, you can comment out the connection.init(); line, which means, you'll need figure out the URL yourself. You do this by searching the XML (http://192.168.178.1:49000/tr64desc.xml) for the command (e.g. X_AVM-DE_DialNumber) and find the associated controlURL (e.g. /upnp/control/x_voip), then add it to the command like @saak2820 shows:
connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0, "/upnp/control/x_voip");

@TritonX
Copy link

TritonX commented Feb 25, 2023

Hi,
I tried your suggestion to not use the init(), created a direct call like:

String tr064_service = "urn:dslforum-org:service:X_VoIP:1";
String call_params[][2] = {{"NewX_AVM-DE_PhoneNumber", "**610"}};
tr064_connection.action(tr064_service, "X_AVM-DE_DialNumber", call_params, 1, "/upnp/control/x_voip");

and got the following result (VERBOSE):

grafik

It seems, that the ESP sent out the request correctly. But the phone did not ring. I made the "Wählhilfe" phone my own phone with number **610 and the test in the fritzbox let the phone ring.
How can I check, whether the request was correctly received in the fritzbox? In the log I can see that the ESP was connected and then disconnected.
(all settings in the fritzbox were made as suggested)

Thank you
Andreas

@saak2820
Copy link
Contributor

Try a different number like **9 (Round call)

@TritonX
Copy link

TritonX commented Feb 26, 2023

Hi saak2820,
thanks for your tip, I tried it and no ringing. What I don't understand is the link from the number to be entered in the code (here **9) to the Phone which must be chosed in the "Wählhilfe" and the suggestion, to use in Wählhilfe a phone which does not exist (e.g. from TAE2). Maybe here is the problem to be found?
Thanks for any support
Andreas

@saak2820
Copy link
Contributor

Hi Triton

The dummy telephone must be assigned to the dialler (Wählhilfe) as described. The TR-064 dialling command is basically nothing more than a mouse click on a telephone number in the GUI.
By the way, it is irrelevant what is written under "Forward ring to"! What is decisive is what is specified as the telephone number in the TR-064 dialling command.
and instead of the broadcast call, the X_AVM-DE_DialNumber command can call any call number that is otherwise allowed:
the speed dialling number of an internal call group (group call): e.g. **799.
However, you can also specify your own grouping in the dial command: e.g. **611#612#614

https://www.ip-phone-forum.de/threads/esp-%C3%9Cberallklingel-aber-mit-eigenem-t%C3%BCr-klingelton.304175/

@TritonX
Copy link

TritonX commented Feb 26, 2023

Hi Saak2820,
I understood the idea now and could verify it by mouse click to a test phone number in the phone book. this prooved me that the "Wählhilfe" works as it should. Thank you for the info. Nevertheless, the output at the serial monitor looks similar to the one I posted above. Is there a possibilty to check if the TR064 communication is working well? The phones are still not ringing...
BR
Andreas

@TritonX
Copy link

TritonX commented Mar 8, 2023

Hi Rene,
any idea by when you plan to release the 1.3.0? Not to hurry you, just to know how to proceed with my own development.
Thank you
Andreas

@Aypac
Copy link
Owner

Aypac commented Mar 8, 2023

Hi Andreas/ @TritonX ,
just to summarize the previous discussion: the version 1.2.2 with the init commented out works for you, right?
So the only bug for you at this point is, that you need to manually specify the URLs, right?
I think I should be able to fix that relatively soon. Would be great if you could then also test it on your side, before I release it as 1.3.0.

@TritonX
Copy link

TritonX commented Mar 8, 2023

Hi Rene,
The init commented out did solve the problem that I do not have anymore the empty print-out as I showed above. But the Fritzbox is not reacting on the commands (with the manually specified URLs). I have no means to check if the box receives and understands the commands, or if it stops already before. I could verify the Fritzbox preparation (Wählhilfe) successfully by clicking the phone in the Fritzbox Phonebook. This should not be the problem.
Yes, will test your version 1.3.0 as you will provide it.

BR
Andreas

@Aypac
Copy link
Owner

Aypac commented Mar 8, 2023

I think the best thing for you to check is to send the command manually and see if it works then. I just wrote a manual for you:
https://github.com/Aypac/Arduino-TR-064-SOAP-Library/wiki/How-to-create-your-first-own-API-call#debug--test-requests-manually

Aypac added a commit that referenced this issue Mar 9, 2023
@Aypac
Copy link
Owner

Aypac commented Mar 9, 2023

Please check out dd04576e = latest version on develop. I think it should fix your problems - if your call is actually valid (which I cannot test as I do not have DECT phones). Please try the Internet_Stats.ino example. If that one works, but your code does not, please try the manual debugging from my previous post.

@TritonX
Copy link

TritonX commented Mar 14, 2023

Hi Rene,
thanks for the well made description of the manual fritzbox request. I tried this and generated the required authcode from the nonce received. My fritzbox answers still "unauthenticated". I tried this with a dedicated fritzbox user, but also with my normal administrative account for the fritzbox. I checked all settings in the box accordingly. My fritzbox uses the actual version 07.29. Do you have any idea, what in the box could prevent it from providing authentication?
Here the answer of the second request, which should be autenticated:
image

Thank you
Andreas

@TritonX
Copy link

TritonX commented Mar 14, 2023

PS: I am using the Mesh function of the fritzbox. can this be an issue using TR-064? The manual access I did was made via LAN.

@Aypac
Copy link
Owner

Aypac commented Mar 17, 2023

Hi Andreas,

I don't think the mesh function shouldn't cause trouble. Works fine for me. I also did the manual request via wired LAN.
Just to be sure, you filled all four fields in the URL? Realm, username (uid), password (pw) and nonce (sn)? E.g.
realm=F!Box%20SOAP-Auth&uid=admin&pw=superS3cret!&sn=597F3C98597A26CC.
And in you request you put your correct values into <Nonce>, <Realm>, <UserID>, and the code from the last line of that website in the <Auth> tag?
(Please check the wiki again, I tried to clarify a few points).

@TritonX
Copy link

TritonX commented Mar 22, 2023

Hi Rene,
I tried it again, step by step according to your manual. I also did use another fritzbox 7430 instead, gave a user the rights according to your wiki - the same behavior: no authentication. There must be something fundamentally wrong or missing in my trials. the answer to the second request with nonce and authentication is the follow:
image
image
image
I am using firefox. is there something to adapt or to be changed?
I added the complete xml text from the first (and after that request) the second window in the body window of firefox.
Sorry to bother you with this, but I am lost. But your support helps to also learn about it!

Thanks again,
BR
Andreas

@g-Schroeder
Copy link

Hi Rene,
same issues in my tries, I use an Fritz!Box 7590 running Fritz!OS 7.50

Additional Info, I have an other TR064 based sketch on ESP8266 running, which works fine.
This older sketch I made about one year ago with an older Version of the TR064 Library.
Now I intended to extend the App, therefore I switched to the newer version of the Library,
also switching the Arduino IDE to version 2.0.

Going back to the older Version ins no option because I lost the old environment completely
due to a stolen laptop and an crashed backup.

@Aypac
Copy link
Owner

Aypac commented Mar 23, 2023

Strange. I tried making the wiki a bit better still.

But I'm not sure this is the right path. Let's maybe take a step back. With the latest version on develop, does the init work again and do regular requests (like getting the external IP address, general device info, etc) work for both of you? What microcontroller?

I tested it both on ESP8266 and ESP32 on my side, and it works for me with an FB 5590.

If either of you are available from now until 18h, we could have a quick chat, maybe with TeamViewer or something to see if I can tell what's the problem.

@g-Schroeder
Copy link

g-Schroeder commented Mar 23, 2023 via email

@Aypac
Copy link
Owner

Aypac commented Mar 23, 2023

After almost two hours of debugging with Günter, we figured out two hardware-specific problems (he uses a WEMOS ESP, while I use NodeMCU):

  1. "his http library" does not like if the URL is given with the host, port and file separated.
    I.e. on my ESP this works: http.begin(*wifiClient, _ip.c_str(), _port, url.c_str());, but on his it needs it as one string: http.begin(*wifiClient, "https://" + _ip + _port + url);.
  2. with release 1.2.0 I switched to streaming the XML, instead of reading it all into memory. This was apparently due to a change in more modern http libraries (see Not building with newer versions of HTTPClient #53, legacy HTTPClient api usage  #40). For release info, see reorganizing read stream response #52, Develop #54 and the release note.

So in conclusion this is because the exact implementation of the Wifi and http libraries is different on different versions and pieces of hardware. I don't know what the "clean" solution is here. I'm afraid if I revert to the "old" way, it might fix it for the two of you, but not for others.
Maybe I'll just add both options and then add a flag for manual switching. But that doesn't seem very elegant.

Very open for suggestions!

Update:
So I implemented this on develop -> fa50436 with a flag to toggle between the two modes. To toggle this, set in the void setup():

  // Shall we use the old (false) or new (true) method for doing HTTP requests.
  // If you encounter problems, you can try toggling this.
  connection.useStreamingForXML = false;

Please let me know if this works for you!

Update2: seems like something is wrong - it doesn't compile on CI (it did on my computer).

@g-Schroeder
Copy link

g-Schroeder commented Mar 24, 2023 via email

@Aypac
Copy link
Owner

Aypac commented Mar 24, 2023

@g-Schroeder Super! Ja, das hatte ich schon im CI gesehen (siehe update2 in der Nachricht oben (ich denke das update hast du nicht per mail bekommen)), keine Idee, was da schief gelaufen ist. Aber klasse, dass es so einfach zu fixen war und jetzt läuft. hab den fix auch gerade noch mal schnell hier auf dem develop branch eingepflegt (ich konnte es nicht selber testen, aber CI beschwert sich nicht mehr).

@TritonX @saak2820 @Bonbon604
So in conclusion it seems this error happened for you (and not me) because the exact implementation of the Wifi and http libraries is different on different versions and pieces of hardware. It appears that the current version on the develop branch should be fixing your problems. The way it works is with a flag to toggle between the two modes (for now I have not found a way to do this automatically). To toggle this, set in the setup() function of your script:

// Shall we use the old (false) or new (true) method for doing HTTP requests.
// If you encounter problems, you can try toggling this.
connection.useStreamingForXML = false;

Please let me know if this works for you!

@saak2820
Copy link
Contributor

Hi,

I'm glad you found a solution.
Well done.
Did you remember that there is a 2nd method for begin() in the htttpClient class? Maybe it works with that. And you only have to change one function call.

bool begin(WiFiClient &client, const String& host, uint16_t port, const String& uri = "/", bool https = false);

bool begin(WiFiClient &client, const String& url);
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.h

@Aypac
Copy link
Owner

Aypac commented Mar 24, 2023

Hey Karsten,

that's indeed one of the two changes I did:

if (useStreamingForXML) {
    http.begin(*wifiClient, _ip.c_str(), _port, url.c_str(), nossl);
} else {
    http.begin(*wifiClient, fullurl);
}

@TritonX
Copy link

TritonX commented Mar 31, 2023

Hello Aypac,
many thanks for the steps forward. I have tested your last software with the following results.
I added directly after the beginning of the setup function the setting:
connection.useStreamingForXML = false;

Here the results with the different HTTP(S):

  1. HTTPS and port 49443 ==> now connection

19:30:51.643 -> Initialize TR-064 connection
19:30:51.643 ->
19:30:51.767 -> [TR064][initServiceURLs] getting the service detect page
19:30:51.767 -> [TR064][httpRequest] prepare request to URL: https://192.168.1.10:49443/tr64desc.xml
19:30:51.767 -> [TR064][httpRequest] GET with SOAPACTION: ''
19:30:52.828 -> [TR064][httpRequest] HTTP response code: -1
19:30:52.828 -> [TR064][httpRequest] HTTP ERROR, message: 'connection failed'
19:30:52.828 -> [TR064][httpRequest] HTTP error, trying again in 1s.
19:30:53.829 -> [TR064][httpRequest] prepare request to URL: https://192.168.1.10:49443/tr64desc.xml
19:30:53.829 -> [TR064][httpRequest] GET with SOAPACTION: ''
19:30:54.657 -> [TR064][httpRequest] HTTP response code: -1
19:30:54.657 -> [TR064][httpRequest] HTTP ERROR, message: 'connection failed'
19:30:54.657 -> [TR064][httpRequest] HTTP error, giving up.
19:30:54.657 -> [TR064][initServiceURLs] initServiceUrls failed.
19:30:54.690 -> #################################################################################################################
19:30:54.690 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:30:54.690 -> [TR064][action] with extraction
19:30:54.690 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:30:54.734 -> [TR064][action_raw] You need to init the library or specify a serviceURL!
19:30:54.734 -> [TR064][action] Request failed
19:30:54.815 ->
19:30:54.815 ->
Uptime: -1seconds
19:30:54.815 -> Uptime: 0:0:-1(H:m:s)
19:30:54.815 ->

19:30:54.815 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:30:54.815 -> [TR064][action] with extraction
19:30:54.815 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:30:54.815 -> [TR064][action_raw] You need to init the library or specify a serviceURL!
19:30:54.859 -> [TR064][action] Request failed
19:30:54.938 ->
19:30:54.938 ->
Connection status: unknown
19:30:54.938 ->

19:30:54.938 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:30:54.938 -> [TR064][action] with extraction
19:30:54.938 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:30:54.938 -> [TR064][action_raw] You need to init the library or specify a serviceURL!
19:30:54.984 -> [TR064][action] Request failed
19:30:55.063 ->
19:30:55.063 ->
External IP: unknown

  1. HTTPSInsec and port 49443 ==> now connection

19:29:12.733 -> Initialize TR-064 connection
19:29:12.733 ->
19:29:12.813 -> [TR064][initServiceURLs] getting the service detect page
19:29:12.813 -> [TR064][httpRequest] prepare request to URL: https://192.168.1.10:49443/tr64desc.xml
19:29:12.858 -> [TR064][httpRequest] GET with SOAPACTION: ''
19:29:13.964 -> [TR064][httpRequest] HTTP response code: -1
19:29:13.964 -> [TR064][httpRequest] HTTP ERROR, message: 'connection failed'
19:29:13.964 -> [TR064][httpRequest] HTTP error, trying again in 1s.
19:29:14.965 -> [TR064][httpRequest] prepare request to URL: https://192.168.1.10:49443/tr64desc.xml
19:29:14.965 -> [TR064][httpRequest] GET with SOAPACTION: ''
19:29:16.067 -> [TR064][httpRequest] HTTP response code: -1
19:29:16.067 -> [TR064][httpRequest] HTTP ERROR, message: 'connection failed'
19:29:16.067 -> [TR064][httpRequest] HTTP error, giving up.
19:29:16.067 -> [TR064][initServiceURLs] initServiceUrls failed.
19:29:16.067 -> #################################################################################################################
19:29:16.067 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:29:16.103 -> [TR064][action] with extraction
19:29:16.103 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:29:16.103 -> [TR064][action_raw] You need to init the library or specify a serviceURL!
19:29:16.103 -> [TR064][action] Request failed
19:29:16.184 ->
19:29:16.184 ->
Uptime: -1seconds
19:29:16.184 -> Uptime: 0:0:-1(H:m:s)

  1. HTTP and port 49000 ==> in HTTP it works in principle: the Uptime request does not authenticate, the request for number of connected devices does (see sections below)

19:36:05.406 -> Initialize TR-064 connection
19:36:05.406 ->
19:36:05.492 -> [TR064][initServiceURLs] getting the service detect page
19:36:05.492 -> [TR064][httpRequest] prepare request to URL: http://192.168.1.10:49000/tr64desc.xml
19:36:05.492 -> [TR064][httpRequest] GET with SOAPACTION: ''
19:36:05.531 -> [TR064][httpRequest] HTTP response code: 200
19:36:05.531 -> [TR064][initServiceURLs] Searching the XML for serviceType
19:36:05.564 -> 22 - 13328
19:36:05.564 -> 865 - 1145
19:36:05.564 -> [TR064][xmlTakeParamsFull] found request parameter: servicetype => urn:dslforum-org:service:DeviceInfo:1
19:36:05.564 -> [TR064][xmlTakeParamsFull] found request parameter: controlurl => /upnp/control/deviceinfo
19:36:05.597 -> [TR064][initServiceURLs] 1 urn:dslforum-org:service:DeviceInfo:1 => /upnp/control/deviceinfo
19:36:05.597 -> ----------------------------------------------------------------------------------------------------------------------------
19:36:05.597 -> [TR064][xmlTakeParamsFull] found request parameter: servicetype => urn:dslforum-org:service:DeviceConfig:1
19:36:05.597 -> [TR064][xmlTakeParamsFull] found request parameter: controlurl => /upnp/control/deviceconfig
19:36:05.631 -> [TR064][initServiceURLs] 2 urn:dslforum-org:service:DeviceConfig:1 => /upnp/control/deviceconfig
19:36:05.631 -> ----------------------------------------------------------------------------------------------------------------------------
19:36:05.631 -> [TR064][xmlTakeParamsFull] found request parameter: servicetype => urn:dslforum-org:service:Layer3Forwarding:1
19:36:05.664 -> [TR064][xmlTakeParamsFull] found request parameter: controlurl => /upnp/control/layer3forwarding
19:36:05.664 -> [TR064][initServiceURLs] 3 urn:dslforum-org:service:Layer3Forwarding:1 => /upnp/control/layer3forwarding

...

19:36:06.894 -> [TR064][initServiceURLs] Found 35 services in total.
19:36:06.894 -> #################################################################################################################
19:36:06.894 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:36:06.894 -> [TR064][action] with extraction
19:36:06.894 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:36:06.926 -> [TR064][httpRequest] prepare request to URL: http://192.168.1.10:49000/upnp/control/wanipconnection1
19:36:06.926 -> [TR064][httpRequest] Posting XML with SOAPACTION: 'urn:dslforum-org:service:WANIPConnection:1#GetStatusInfo'
19:36:06.926 -> [TR064][httpRequest] ---------------------------------
19:36:06.926 -> <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">espdevice</h:InitChallenge ></s:Header><s:Body><u:GetStatusInfo xmlns:u="urn:dslforum-org:service:WANIPConnection:1"></u:GetStatusInfo></s:Body></s:Envelope>
19:36:06.965 -> [TR064][httpRequest] ---------------------------------
19:36:06.999 -> [TR064][httpRequest] HTTP response code: 200
19:36:06.999 -> [TR064][xmlTakeParamsFull] found request parameter: s:body =>
19:36:06.999 -> <s:Fault>
19:36:06.999 -> s:Client
19:36:06.999 -> UPnPError
19:36:06.999 ->
19:36:06.999 ->
19:36:06.999 -> 503
19:36:06.999 ->
19:36:06.999 ->
19:36:06.999 ->
19:36:06.999 -> </s:Fault>
19:36:06.999 ->
19:36:06.999 -> [TR064][xmlTakeParamsFull] did not find request parameter: newuptime
19:36:07.032 -> [TR064][xmlTakeParamsFull] found request parameter: s:header =>
19:36:07.032 -> <h:Challenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
19:36:07.032 -> Unauthenticated
19:36:07.032 -> D40C659886F31588
19:36:07.032 -> F!Box SOAP-Auth
19:36:07.032 -> </h:Challenge>
19:36:07.032 ->
19:36:07.032 -> [TR064][xmlTakeParamsFull] found request parameter: nonce => D40C659886F31588
19:36:07.032 -> [TR064][processGeneralXMLParam] Extracted the nonce 'D40C659886F31588' from the last request.
19:36:07.065 -> [TR064][xmlTakeParamsFull] found request parameter: status => Unauthenticated
19:36:07.065 -> [TR064][processGeneralXMLParam] Response status: unauthenticated
19:36:07.065 -> [TR064][xmlTakeParamsFull] did not find request parameter: errorcode
19:36:07.065 -> [TR064][processGeneralXMLParam] TR064 error, errorCode: ''
19:36:07.065 -> [TR064][processGeneralXMLParam] TR064 error, errorCodeMessage: ''
19:36:07.099 -> [TR064][xmlTakeParamsFull] did not find request parameter: errordescription
19:36:07.099 -> [TR064][processGeneralXMLParam] TR064 error, errorDescription:
19:36:07.099 -> [TR064][xmlTakeParamsFull] found request parameter: realm => F!Box SOAP-Auth
19:36:07.099 -> [TR064][action] return parameters sucessful.
19:36:07.099 -> [TR064][action] Response status: unauthenticated
19:36:07.099 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:WANIPConnection:1
19:36:07.132 -> [TR064][generateAuthToken] Your secret is is 'espdevice:F!Box SOAP-Auth:PWD*espdevice'
19:36:07.132 -> [TR064][generateAuthToken] Your hashed secret is '909beb9102bbe14a035ec22095653960'
19:36:07.132 -> [TR064][generateAuthToken] With nonce D40C659886F31588, the auth token is 'a07f5427307af819eca9ae040b8ae111'
19:36:07.132 -> [TR064][httpRequest] prepare request to URL: http://192.168.1.10:49000/upnp/control/wanipconnection1
19:36:07.165 -> [TR064][httpRequest] Posting XML with SOAPACTION: 'urn:dslforum-org:service:WANIPConnection:1#GetStatusInfo'
19:36:07.165 -> [TR064][httpRequest] ---------------------------------
19:36:07.165 -> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:ClientAuth xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">D40C659886F31588a07f5427307af819eca9ae040b8ae111espdeviceF!Box SOAP-Auth</h:ClientAuth></s:Header><s:Body><u:GetStatusInfo xmlns:u="urn:dslforum-org:service:WANIPConnection:1"></u:GetStatusInfo></s:Body></s:Envelope>
19:36:07.232 -> [TR064][httpRequest] ---------------------------------
19:36:07.232 -> [TR064][httpRequest] HTTP response code: 500
19:36:07.232 -> [TR064][xmlTakeParamsFull] found request parameter: s:body =>
19:36:07.232 -> <s:Fault>
19:36:07.232 -> s:Client
19:36:07.266 -> UPnPError
19:36:07.266 ->
19:36:07.266 ->
19:36:07.266 -> 401
19:36:07.266 -> Invalid Action
19:36:07.266 ->
19:36:07.266 ->
19:36:07.266 -> </s:Fault>
19:36:07.266 -> [TR064][xmlTakeParamsFull] did not find request parameter: newuptime
19:36:07.266 -> [TR064][xmlTakeParamsFull] did not find request parameter: s:header
19:36:07.266 -> [TR064][xmlTakeParamsFull] did not find request parameter: nonce
19:36:07.299 -> [TR064][processGeneralXMLParam] Extracted the nonce '' from the last request.
19:36:07.299 -> [TR064][xmlTakeParamsFull] did not find request parameter: status
19:36:07.299 -> [TR064][processGeneralXMLParam] Response status:
19:36:07.299 -> [TR064][xmlTakeParamsFull] did not find request parameter: errorcode
19:36:07.299 -> [TR064][processGeneralXMLParam] TR064 error, errorCode: ''
19:36:07.299 -> [TR064][processGeneralXMLParam] TR064 error, errorCodeMessage: ''
19:36:07.340 -> [TR064][xmlTakeParamsFull] did not find request parameter: errordescription
19:36:07.340 -> [TR064][processGeneralXMLParam] TR064 error, errorDescription:
19:36:07.419 ->
19:36:07.419 -> Uptime: 0seconds
19:36:07.419 -> Uptime: 0:0:0(H:m:s)
19:36:07.419 ->

...

19:36:08.515 -> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[TR064][action]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19:36:08.515 -> [TR064][action] with extraction
19:36:08.515 -> [TR064][cleanOldServiceName] searching for prefix in servicename: urn:dslforum-org:service:Hosts:1
19:36:08.548 -> [TR064][httpRequest] prepare request to URL: http://192.168.1.10:49000/upnp/control/hosts
19:36:08.548 -> [TR064][httpRequest] Posting XML with SOAPACTION: 'urn:dslforum-org:service:Hosts:1#GetHostNumberOfEntries'
19:36:08.548 -> [TR064][httpRequest] ---------------------------------
19:36:08.548 -> <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">espdevice</h:InitChallenge ></s:Header><s:Body><u:GetHostNumberOfEntries xmlns:u="urn:dslforum-org:service:Hosts:1"></u:GetHostNumberOfEntries></s:Body></s:Envelope>
19:36:08.581 -> [TR064][httpRequest] ---------------------------------
19:36:08.615 -> [TR064][httpRequest] HTTP response code: 200
19:36:08.615 -> [TR064][xmlTakeParamsFull] found request parameter: s:body =>
19:36:08.615 -> <u:GetHostNumberOfEntriesResponse xmlns:u="urn:dslforum-org:service:Hosts:1">
19:36:08.648 -> 53
19:36:08.648 -> </u:GetHostNumberOfEntriesResponse>
19:36:08.648 ->
19:36:08.648 -> [TR064][xmlTakeParamsFull] found request parameter: newhostnumberofentries => 53
19:36:08.648 -> [TR064][xmlTakeParamsFull] did not find request parameter: s:header
19:36:08.648 -> [TR064][xmlTakeParamsFull] did not find request parameter: nonce
19:36:08.648 -> [TR064][processGeneralXMLParam] Extracted the nonce '' from the last request.
19:36:08.681 -> [TR064][xmlTakeParamsFull] did not find request parameter: status
19:36:08.681 -> [TR064][processGeneralXMLParam] Response status:
19:36:08.681 -> [TR064][xmlTakeParamsFull] did not find request parameter: errorcode
19:36:08.681 -> [TR064][processGeneralXMLParam] TR064 error, errorCode: ''
19:36:08.681 -> [TR064][processGeneralXMLParam] TR064 error, errorCodeMessage: ''
19:36:08.681 -> [TR064][xmlTakeParamsFull] did not find request parameter: errordescription
19:36:08.716 -> [TR064][processGeneralXMLParam] TR064 error, errorDescription:
19:36:08.716 -> [TR064][action] return parameters sucessful.
19:36:08.716 -> [TR064][action] Response status:
19:36:08.798 ->
19:36:08.798 -> Number of connected devices: 53

==> What could be the reason why HTTPS(Insec) is not working (I copied the certificate from the FB in the .h file)?
==> Why do not all services got authenticated?

I also tried it with my other FB 7430, an there it behaves similar, but a bit different of which TR064 actions got authenticated and others not.

At least a step foreward that I got access via TR064 to my FB. Any further hint on which issue could cause the remaining problems is welcome.

Thanks again
BR
Andreas

@TritonX
Copy link

TritonX commented Apr 2, 2023

Hello Rene,
I tried the DECT-Call example to realize a doorbell (which was my initial project ;-) ), and it works now! Many thanks for your great support - and off course also thanks to Günter!
I have to use HTTP, HTTPS is still not working (as I described in my recent post above).
In the function "callWahlhilfe()", I try to call individual DECT phones instead of doing a round-call (need this as not all phones shall ring...)
Enhancing the array params and changing the parameter "nParam" in the function call does not work:
image

Do I need to re-call each phone number individually or does it in principle work with the concatenated XML and I just do a mistake?

Thanks in advance for your support,
best regards,
Andreas

@g-Schroeder
Copy link

g-Schroeder commented Apr 2, 2023 via email

@g-Schroeder
Copy link

sorry, wring string, should be "**614#610#611#612#613"
Günter

@TritonX
Copy link

TritonX commented Apr 2, 2023

Hi Günter,
that worked fine, thank you!

Regards
Andreas

@Aypac
Copy link
Owner

Aypac commented Apr 2, 2023

Great to hear, thanks for the feedback. That https doesn't work is sad, but not that surprising - I have not tested it carefully yet.
I'll add the trick with the multiple number to the wiki.

@JimKnopfIoT
Copy link

JimKnopfIoT commented Jun 1, 2023

After nearly two years i gave TR064 a try again. It stopped working for me after the 7.25 update (see issue #45).

Yesterday i updated my Fritzbox 7590 to 7.55,
I'm using a ESP8266 12-E with the 1.2.3 devel branch.

After my own code didn't work (Exeption 28 problems), i tried the example code DECT_caller.
I get this error messages

using #define TR_PROTOCOL 0:

Initialize TR-064 connection

pm open,type:2 0
[TR064][httpRequest] HTTP ERROR, message: 'connection failed'
[TR064][httpRequest] HTTP error, trying again in 1s.
[TR064][httpRequest] HTTP ERROR, message: 'connection failed'
[TR064][httpRequest] HTTP error, giving up.
[TR064][initServiceURLs] initServiceUrls failed.
[TR064][action_raw] You need to init the library or specify a serviceURL!
[TR064][action] Request failed

using #define TR_PROTOCOL 1:

Initialize TR-064 connection

pm open,type:2 0
[TR064][httpRequest] HTTP ERROR, message: 'connection failed'
[TR064][httpRequest] HTTP error, trying again in 1s.

using #define TR_PROTOCOL 2:

Initialize TR-064 connection

pm open,type:2 0
[TR064][httpRequest] HTTP ERROR, message: 'connection failed'
[TR064][httpRequest] HTTP error, trying again in 1s.
[TR064][httpRequest] HTTP ERROR, message: 'connection failed'
[TR064][httpRequest] HTTP error, giving up.
[TR064][initServiceURLs] initServiceUrls failed.
[TR064][action_raw] You need to init the library or specify a serviceURL!
[TR064][action] Request failed

I can connect to
http://192.168.10.143:49000/tr64desc.xml and
https://192.168.10.143:49443/tr64desc.xml.

But i don't see X_AVM-DE_DialNumber in tr64desc.xml file:



1
0


226
154
7
55
105823
154.07.55


urn:dslforum-org:device:InternetGatewayDevice:1
l
AVM
www.avm.de
FRITZ!Box 7590
FRITZ!Box 7590
7590 - avm
www.avm.de
uuid:7




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:1
urn: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:1
urn: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:service:X_AVM-DE_HostFilter:1

urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1

/upnp/control/x_hostfilter
/upnp/control/x_hostfilter
/x_hostfilterSCPD.xml


urn:dslforum-org:service:X_AVM-DE_USPController:1

urn:X_AVM-DE_USPController-com:serviceId:X_AVM-DE_USPController1

/upnp/control/x_uspcontroller
/upnp/control/x_uspcontroller
/x_uspcontrollerSCPD.xml




urn:dslforum-org:device:LANDevice:1
LANDevice - FRITZ!Box 7590
AVM
www.avm.de
LANDevice - FRITZ!Box 7590
LANDevice - FRITZ!Box 7590
7590 - avm
www.avm.de
uuid:
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:2

urn:WLANConfiguration-com:serviceId:WLANConfiguration2

/upnp/control/wlanconfig2
/upnp/control/wlanconfig2
/wlanconfigSCPD.xml

urn:dslforum-org:service:WLANConfiguration:3 urn: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 7590 AVM www.avm.de WANDevice - FRITZ!Box 7590 WANDevice - FRITZ!Box 7590 7590 - avm www.avm.de uuid: 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 7590 AVM www.avm.de WANConnectionDevice - FRITZ!Box 7590 WANConnectionDevice - FRITZ!Box 7590 7590 - avm www.avm.de uuid: AVM TR-064 urn:dslforum-org:service:X_AVM-DE_WANMobileConnection:1 urn:X_AVM-DE_WANMobileConnection-com:serviceId:X_AVM-DE_WANMobileConnection1 /upnp/control/x_wanmobileconn /upnp/control/x_wanmobileconn /x_wanmobileconnSCPD.xml 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://192.168.10.143

I tried all three possible connection.action types:

connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0);
connection.action("urn:dslforum-org:service:X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0);
connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0, "/upnp/control/x_voip");

TR_ROOT_CERT is stored in credentials.h
Btw. the cert text contains this "...AN4X/z/2zs4e//6tN...". If i put the cert text into the sketch file, the text after "2zs4e//" is greyed out. Seems it needs some escape sequences for the double slashes.

Any idea how to fix my http/https connection problem?

@g-Schroeder
Copy link

g-Schroeder commented Jun 2, 2023 via email

@saak2820
Copy link
Contributor

saak2820 commented Jun 6, 2023

Hi JimKnopf

Please Read:
https://github.com/Aypac/Arduino-TR-064-SOAP-Library/wiki
https://github.com/Aypac/Arduino-TR-064-SOAP-Library/wiki/How-to-debug

DEBUG_VERBOSE ///< Print all messages

Also activate httpClient Debugging

@JimKnopfIoT
Copy link

Thanks @saak2820 @g-Schroeder

it's working now (again).

I had multiple mistakes in my setup.
Working config now is
in setup section:

 tr064_connection.useStreamingForXML = false;
 tr064_connection.init();
 delay(1800);
 String tr064_service = "urn:dslforum-org:service:X_VoIP:1";
 String call_params[][2] = {{"NewX_AVM-DE_PhoneNumber", "**613"}};
 String dial_number = {{"X_AVM-DE_DialNumber"}};
 String req[][2] = {{}};
 tr064_connection.action(tr064_service,dial_number,call_params, 1);
 delay(5000);
 tr064_connection.action(tr064_service, "X_AVM-DE_DialHangup");
 Serial.print("**613 wurde benachrichtigt, gehe in den DeepSleep");
 ESP.deepSleep(0);

My loop section is empty. I spend a lot of time to find out that i changed the phone number in "Wählhilfe".
2 Years ago, when it stops working i changed this internal phone number from **2 to **613.
But **613 was also the phone that should be called if the doorbell rings.

@DM10
Copy link

DM10 commented Dec 30, 2023

Using 1.2.3 and "tr064_connection.useStreamingForXML = false;"
throws error "'class TR064' has no member named 'useStreamingForXML'" while compiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants