I know you recommend to wipe the wifi settings after blessing but is it possible to pre-configure the wifi credentials at the end of the blessing process instead?
Ours may be a unique case and I’m happy to discuss more over email but we want to cut out the “blink-up” step and wonder if we can pre-configure the wifi settings in the factory at the point of blessing.
I’m not sure how the billing works however and if you must always blink-up.
It may be possible to do this with imp.setenroltokens() and imp.setwificonfiguration(), but I’ll leave this one to @hugo.
Bear in mind, meantime, that BlinkUp does more than set WiFi credentials: it enrolls the blessed device into the Electric Imp Cloud. No enrollment, no connectivity. imp.setenroltokens() sets the tokens that would normally be send over by the BlinkUp app.
Thanks. Yes I did think blinkup did more than the WiFi piece. When you set the enrolment tokens this starts billing correct?
Have you thought about other ways to initiate the billing process. We’d love to pre-configure devices from the factory, but don’t want to have units sitting in the warehouse costing us. Don’t know if you have alternatives?
It is possible to do this as @smittytone says, either from another production fixture or, when factory agents are available (agents for factory code) within the factory code itself.
As the device would immediately connect with the production token, billing would start at that point (ie the month of production would be billable, if you are on pay as you go, but from then until the next time it was online wouldn’t be billable). Term service starts at time of blessing anyway, so that isn’t really affected.
any more info on factory agents ? I’m now using a second ‘slave’ imp that connects to the blessed device over a serial port to perform some post-blessing actions in our own databases etc. Would be much simpler if that could be integrated with the factory device (unless I understood the concept wrongly)
Thanks Hugo. And the reason we can’t just use those two functions in the server.bless() method is because we don’t have the ability to make network requests in the factory code to get the enrolment token. Hence the need for factory agents?
Factory agents are coming along nicely; they’ll be here by the end of the month if not sooner.
Yes, after a bless you can’t set an enrolment token because without an agent there’s no way to request one from the device itself.
I’m not sure how clear it is in the documentation, but it bears repeating (because otherwise I get a bunch of error emails from the server): production enrol tokens are single-shot. For each production BlinkUp, even on the same device, you must request a new enrol token.
Factory agents are coming along nicely; they'll be here by the end of the month if not sooner.
That was a forward-looking statement. We’re working on factory agents right now, and we hope to get them ready by the end of the month, but, you know, software and things.
We won’t hold you too it. But good to know it’s coming Thanks