Relocating device

Hi, I am working on a project using imp 001 as a capacitive change sensor and (thanks to some advice from Hugo) all is going well.
However, I need to send the prototype to another location for practical testing. This will require a resetting of the wifi configuration.
Is there a way to modify the wifi settings without going through Blinkup and reloading the program?
Many thanks,

If the device is blinked up to your account, then you don’t need to “reload” the program - the wifi settings will change but the device will continue to be associated with your account and your code.

You can write a connection handler which will try a set of wifi credentials to get connected, but this is pretty complex and subtle (we’re likely to provide a library to do this at some point - multiple customers have written their own), but until that point a blinkup is the easiest option.

Needing access to your account for blinkup is intentional - commercial accounts don’t have this limitation.

Hi Hugo, thanks for that. However I am not clear on the process. If I move to a new location and do a Blinkup will the network connect without deleting the code. i.e if I do a configure without clearing the settings, I can change the device network and the code will persist?

No it won’t delete your code. With blinkup app you sign into your imp account using your username, password. The app will then ask if you wish to configure a device or clear device settings. You’ll need to clear settings first. Then your device is all ready to be configured to a new wifi network (not to new code). In app click on “Configure a device”. Choose wireless. It is here that you ADD WIFI INFO which will be the new network.

Many thanks Gerrikoio, that is what I needed to know. I can now ship my prototype off for review with manageable instructions.

Also, the same device on the same account will keep the same agent ID etc over blinkups too, if that wasn’t clear. In fact, the agent will just continue to run continuously even when the device is offline and comes back online on the new network.

OK, what happens with the device. If I have no network requirements in the code, will it run even when disconnected from the agent? The device clearly looks for the network but after a while the orange led stops blinking. I have presumed that the network independent code contines to run, but this does not seem to be the case.

The imp will continue to run, but with the default connection mode, any attempts to send data to the server (including server.log!) will cause the code to pause whilst the connection is attempted.

See - essentially you need to move to RETURN_ON_ERROR mode, so that any attempts to talk to the server will just return an error vs blocking.

The LED stops flashing after 60s to preserve power, and in the default SUSPEND_ON_ERROR mode, the imp will attempt to connect for 60s. If it doesn’t manage to connect in this time, it will sleep for 9 minutes, then wake up and try again for another 60s.

If there are no wifi credentials present, it should be flashing forever, though (no sleep).

That’s just what I needed thanks, Hugo. My project now runs independent of the agent
so it can go to the potential users to test without having to do Blinkup.
Many thanks for your help.

Note that if the device can’t verify that it’s running the latest code (eg due to it having no credentials) it will not start running your code for 10s on a cold boot - this is to allow you to recover a device running code that (eg) prevents connection.

Release 36 allows you to bypass this on commercial devices, for instant VM start - but the safety holdoff is always there on developer devices.