Copyright ©

Mongoose OS Forum


gcloud device deletion: Error: gcloud device create: : exit status 2

jeremykeenjeremykeen Philadelphia

When following the guide here, I get an error at the command mos gcp-iot-setup --gcp-project YOUR_PROJECT_NAME --gcp-region us-east1 --gcp-registry iot-registry. I am substituting my project name.

gcloud device deletion:
Error: gcloud device create: : exit status 2

Is there a way to turn on debug logging to see what is failing?


  • Two possibilities:
    1. Add --verbose to mos command.
    2. Try adding a gcloud --verbosity option:
    Not sure this will work, just a wild hacker's guess.

    I ran the commands successfully. But this was a few days ago. When I was working with it this weekend, a large update to the gcloud SDK arrived, and I installed it.
    A couple of things which are not mentioned:
    2. Try using gcloud beta, instead of just glcloud, I think I did this for this step:
    gcloud config set project YOUR_PROJECT_NAME
    instead try
    gcloud beta config set project YOUR_PROJECT_NAME
    3. Did you get to the step where the command fails and asks you about "Billing"? That has to be taken care of in the web console, and then the command will work.

    I wonder if the large update to Gcloud broke the mos set-up command?
    Also, in doing some searching around, IOT Core is very new and the beta went public very recently.

    I did get solid evidence that the data from the temp/humidity sensor (Tutorial 1) is getting data to Pub/Sub.
    That's cool, but now some extra code needs to be added to do something with the data.
    I think I need to cook something up in the Google App Engine to capture and display the data in a browser.
    There are some tutorials which show how to use several different languages. I hope this is the correct approach!

    Note that the Tutorial #6 does not even involve the Cloud! That one needs some work.

  • OK, I ran through the process and it worked, even after all of the updates.
    Do you have your device powered up, connected to the internet via WIFI, with the special IOT firmware installed?

    Note that there is a pull-down in the mos ui which has a selection for the version 1.18 IOT firmware for ESP32. Flash it with that.

    Thanked by 1jeremykeen
  • jeremykeenjeremykeen Philadelphia

    Turns out it was the IoT Firmware. I put in feedback that the Google IoT Core page does not indicate you need to be running the "iot-kit-*" firmware. The beta in your set project statement is NOT necessary. I'm going to make a dataflow and/or Cloud Functions process to stream the pubsub messages into BigQuery. Stay tuned.

Sign In or Register to comment.