DNS and EXTERNAL ACCESS ISSUE with SDK
Posted: Fri Jan 15, 2016 7:10 am
I wonder if someone can help me...
We are using the SDK (1.51 - bang up to date) and pretty normal C code for accessing the router. We are using Richard Burton's RBOOT for OTA (that isn't the issue - just painting a picture).
The issue is we've been testing the OTA - giving it the IP address of a server to use to grab a new ROM file for OTA. Works a treat.
But when we tested an external address that did not work - so issue one - does anyone have a C function in which you can pass an address string (ie google.co.uk) and get back an IP string.
And that brings me to the second problem - having realised that actual names would not work we tried the external IP address. That too failed - even though using a browser on that address on a PC would return the ROM file - which could then be copied into a local server - point the OTA address on the ESP to it - bingo.
So the second question is - how do I tell on an ESP (C code - SDK) what it thinks is the gateway. I realised that by letting the ESP get an address automatically from the router, I have NO idea if it is actually successfully picking up a DNS gateway... and I'm not even sure if that is essential for getting an external IP address (as against a name which then requires external lookup).
If this is something you've come across could you please share your expertise on this - I'm at a dead end at this point with those two questions. Thanks in advance for any help.
We are using the SDK (1.51 - bang up to date) and pretty normal C code for accessing the router. We are using Richard Burton's RBOOT for OTA (that isn't the issue - just painting a picture).
The issue is we've been testing the OTA - giving it the IP address of a server to use to grab a new ROM file for OTA. Works a treat.
But when we tested an external address that did not work - so issue one - does anyone have a C function in which you can pass an address string (ie google.co.uk) and get back an IP string.
And that brings me to the second problem - having realised that actual names would not work we tried the external IP address. That too failed - even though using a browser on that address on a PC would return the ROM file - which could then be copied into a local server - point the OTA address on the ESP to it - bingo.
So the second question is - how do I tell on an ESP (C code - SDK) what it thinks is the gateway. I realised that by letting the ESP get an address automatically from the router, I have NO idea if it is actually successfully picking up a DNS gateway... and I'm not even sure if that is essential for getting an external IP address (as against a name which then requires external lookup).
If this is something you've come across could you please share your expertise on this - I'm at a dead end at this point with those two questions. Thanks in advance for any help.