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

Static IP address assignment not working #5

Closed
luigisaetta opened this issue Sep 1, 2018 · 18 comments
Closed

Static IP address assignment not working #5

luigisaetta opened this issue Sep 1, 2018 · 18 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@luigisaetta
Copy link

luigisaetta commented Sep 1, 2018

Bard used: MKR WIFI 1010

According to WIFI.config() documentation it should be possible to connect to WIFI assigning a fixed IP address (no DHCP) calling WIFI.config method before calling WIFI.begin

actually, I have tried and it doesn't work and always get from the router (DHCP) a different IP address from the one I specified.

void setup() 
{
 Serial.begin(115200);

 WiFi.config(ip, gateway, subnet);
 
 WiFi.begin(ssid, pass);

 // connect to MQTT broker...
 mqttClient.begin(MQTT_BROKER_IP, net);

 // register the callback
 mqttClient.onMessage(messageReceived);

 connect();

 pinMode(pinControl, OUTPUT);
 pinMode(pinInternal, OUTPUT);

 digitalWrite(13, LOW);
}
@facchinm facchinm added the type: imperfection Perceived defect in any part of project label Sep 3, 2018
@sandeepmistry
Copy link
Contributor

We have some firmware changes to fix this, however are still waiting on an updater tool update (arduino/WiFi101-FirmwareUpdater-Plugin#21) to roll them out.

@luigisaetta
Copy link
Author

luigisaetta commented Sep 22, 2018 via email

@luigisaetta
Copy link
Author

Hi Sandeep,

not quite sure if it is OK and what shoud be done. As far as I understand there is a firmware update to be done on WiFI1010 and a new versione of the firmware updater has been released. Am I right?
Btw... does it handles also the certificate loading?

thnks

@facchinm
Copy link
Contributor

facchinm commented Oct 8, 2018

Hi @luigisaetta ,
I'm setting up the documentation for the updater. In the meantime, please download the hourly version of the IDE which already contains the FW Updater and update WiFiNINA library to 1.2.0 (via library manager).
You'll get two additional sketches, flash the one called FirmwareUpdate and then run the updater from Tools menu / WiFi101 / WiFiNINA Firmware Update.

@sandeepmistry
Copy link
Contributor

There is a post on the forum with more info: https://forum.arduino.cc/index.php?topic=572378.0

@sandeepmistry sandeepmistry reopened this Oct 9, 2018
@luigisaetta
Copy link
Author

ok thanks, I'll try right now

@luigisaetta
Copy link
Author

luigisaetta commented Oct 9, 2018

Doesn't seems to work !!!

First: the documentation is not enough clear. As far as I understand the FirmwareUpdater sketch is the one coming form library Wifi101. Unless I have done something wrong. (no track of FirmwareUpdater in WifiNIna.

Second: After I have uploaded the above mentioned sketch (from WiFI1010, I'm able to test OK the connection, but then, when I try the firmware update I get: "Error while erasing flash memory". Fortunately, I.m able to load back the original sketch and it works

@don
Copy link

don commented Oct 10, 2018

@luigisaetta This worked OK for me once I got the Hourly build of the Arduino IDE. After updating the IDE the Tools menu says "WiFi101 / WiFiNINA Firmware Updater". Load the FirmwareUpdater sketch, then flash the new firmware.

http://forum.arduino.cc/index.php?topic=572378.0

@luigisaetta
Copy link
Author

@don I have read your post. Don't know. I have tried 3 times, but every time the same result.
I'm able to launch the new Firmware Updater, but it says: Error while erasing flash memory

@facchinm
Copy link
Contributor

@luigisaetta FirmwareUpdater is from WiFiNINA library, version 1.2.0 (should be available for update in Library manager). The example will appear in Examples/WiFiNINA/Tools/FirmwareUpdater. It's VERY different from the WIFi101 sketchsince it must deal with a different chip.

@luigisaetta
Copy link
Author

@facchinm I had the strong impression that it was the problem. But I don't jhave any directory tools connected to WifiNIna and my Arduino IDE says that I have upgraded to WifiNIna 1.2 I'll try with a complete refresh of the IDE installation, erasing anything. Then, if it doesn't show up, I'll download the FirmwareUpdater sketch from github. I'll update before tonight.

@facchinm
Copy link
Contributor

@luigisaetta wait, let's avoid erasing everything 😄
Go to Sketchbook/libraries and manually remove any WiFININA related library. Then restart the IDE and redownload the library from lib manager. This should be enough to fix the issue

@luigisaetta
Copy link
Author

@facchinm good suggestion... I'll try now. I have a call then, but for lunch should see something more

@luigisaetta
Copy link
Author

@facchinm Yes, I should have thought. I upgraded WifiNIna to 1.2 BEFORE your docs. Therefore even installing the hourly build of Arduino IODE, WifiNIna was not upgraded and tools directory not created.
Now I have the right skectch. I'll try firmware upgrade asap. Great, thnks

@luigisaetta
Copy link
Author

OK; worked, thnks @facchinm .
Now I'm able to setup fixed IP.

ONly side effect: WiFI.getTime() doesin't work, but I think it's due to the fact that I need to setup not only IP but also a DNS. I'll investigate. Great job folks.

@sandeepmistry
Copy link
Contributor

Hi @luigisaetta,

Please see #33 for a workaround for the DNS issues.

@luigisaetta
Copy link
Author

luigisaetta commented Oct 22, 2018

Hi Sandeep,

workaround doesn't work for me. Even if I follow the suggestion to setup DNS after the call to WiFi.begin() the WiFi.getTime() return always zero.

@sandeepmistry
Copy link
Contributor

Closing, the v1.1.0 firmware update is available: https://forum.arduino.cc/index.php?topic=572378.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants