How to add the device token without the mos tool



My name is Arturo from Madrid, Spain :slight_smile:

I checked the documentation and GitHub to see if I could find any examples but I couldn’t find anything about adding the token to the ESP8266 device with Mongoose OS to link it to mDash.
I explain the steps:

  • The user plugs in the ESP8266 by usb
  • Select your wifi from your phone and open a landing. Connects it to the Internet.
  • At this point from a request from the app created by me the user can create the device in mDash and receives the token in the response. But now how can I send it to the real device?
    I see this point something is blocking or I don’t raise it well.
    Any advice?

Thank you very much!

Regards, Arturo.


Run mos config-set dash.enable=true dash.token=DEVICE_TOKEN.


Thanks nliviu!

But as I say I can’t use the mos tools because this is for a non-technical user.

regards, Arturo.


AFAIK, that’s the only way.
Or you can configure it before sending the device to the user.


Okay, I figured that when I didn’t find anything.

Thanks nliviu!

Regards, Arturo.


Unconfigured device creates a WiFi access point.

Your phone app should join that AP and send a HTTP request to to configure a device. See for an example.


Thanks Ism.

For wifi I have it covered but to create a device in mDash, receive a token in response and assign it automatically I have not seen how to do it.
I understand that I could modify wifi-setup-web-ui or create a similar one for this…

Thank you!


Both wifi settings and dash token settings can be changed via the same API - see example.


Thank you very much Ism :slight_smile: