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

Error: connection.init() in a loop #21

Closed
Paul760 opened this issue Jan 31, 2020 · 4 comments
Closed

Error: connection.init() in a loop #21

Paul760 opened this issue Jan 31, 2020 · 4 comments

Comments

@Paul760
Copy link

Paul760 commented Jan 31, 2020

I just uploaded the home_indicator.ino with the Arduino-TR-064-SOAP-Library to a Wemos D1 Mini Pro v2.0.0.

I only edited:

const char* wifi_ssid = "";
const char* wifi_password = "";
const char* fuser = "arduino";
const char* fpass = "";

I changed one Mac address from the original .ino file. I changed the first with my macbook mac address.
const char macsPerUser[numUser][maxDevices][18] = {{"MY:OWN:MAC:ADDRESS","12:34:56:78:9A:BC"}, //User1, two devices

Then when I look into my serial monitor I see a loop at connection.init()
When I add a Serial.print on the next row it never gets there. After a while the loop stops and the board restarts and start with a loop at connection.init() again.

Serial Monitor:
09:05:19.140 -> ⸮⸮⸮Initialize TR-064 connection
09:05:19.140 -> [HTTP] begin: 192.168.179.1:49000/tr64desc.xml
09:05:23.587 -> [HTTP] GET...
09:05:23.587 -> Getting the initial nonce and realm
09:05:23.620 -> action_1
09:05:23.620 -> [HTTP] begin: 192.168.179.1:49000
09:05:23.620 ->
09:05:23.620 ->
09:05:23.620 ->
09:05:23.620 -> <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">arduino</h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'>1</u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
09:05:23.654 ->
09:05:23.654 ->
09:05:23.654 ->
09:05:26.169 -> pm open,type:2 0
09:05:28.640 -> [HTTP] POST... SOAPACTION: urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo
09:05:28.640 -> Getting the initial nonce and realm
09:05:28.673 -> action_1
09:05:28.673 -> [HTTP] begin: 192.168.179.1:49000
09:05:28.673 ->
09:05:28.673 ->
09:05:28.673 ->
09:05:28.673 -> <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">arduino</h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'>1</u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
09:05:28.710 ->
09:05:28.710 ->
09:05:28.710 ->
09:05:33.706 -> [HTTP] POST... SOAPACTION: urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo
09:05:33.706 -> Getting the initial nonce and realm
09:05:33.706 -> action_1
09:05:33.706 -> [HTTP] begin: 192.168.179.1:49000
09:05:33.706 ->
09:05:33.706 ->
09:05:33.706 ->
09:05:33.706 -> <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">arduino</h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'>1</u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
09:05:33.776 ->
09:05:33.776 ->
09:05:33.776 ->
09:05:38.765 -> [HTTP] POST... SOAPACTION: urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo
09:05:38.765 -> Getting the initial nonce and realm
09:05:38.765 -> action_1
09:05:38.765 -> [HTTP] begin: 192.168.179.1:49000

Somebody know what is going wrong?
I have made an extra user at my FritzBox 5490 and double checked login and password. With wifi the D1 mini Pro connects with the Wifi of my FritzBox 5490

@Aypac
Copy link
Owner

Aypac commented Feb 2, 2020

Hi Paul,
I have honestly not used this code in quite a while. So I only have a few quick suggestions you can check, otherwise I might come back to you later.

  1. Check if the user rights for the account you created are sufficient.
  2. Try to simply use the "default" list of MAC addresses.
  3. Make sure the ESP connects to the WIFI of the router directly, not through a repeater (should in theory not be a problem, but you never know)
  4. Print out the response from the Fritz.Box and see if it contains some clue. Here you find tips for that.
  5. If you want to dig in a bit more, take a look at this branch it is not 100% done, but it contains a few improvements, that might also solve your issue

@Aypac
Copy link
Owner

Aypac commented Feb 2, 2020

P.S.: Please let us know if/when you resolve your issue(s).

@Aypac
Copy link
Owner

Aypac commented Feb 2, 2020

Ok, I just finished merging that branch into the master branch. So if you just update your library, point 5 becomes obsolete. Maybe that already fixes it for you! Also make sure to start off the new example file!

@Aypac
Copy link
Owner

Aypac commented Mar 11, 2020

I presume these problems should not persist any more, as the library has been changed quite a bit in the meantime. If the problem persists, please open new issue with the new Serial monitor output.

@Aypac Aypac closed this as completed Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants