OTA upload error

Hello,

I encounter an error when trying to use OTA also in mDash and also via curl.
Steps that I took were following:
1.builded via mos, smartlight firmware
2.

curl -F file=fw.zip https://mdash.net/api/v2/devices/device3/ota?access_token=API_TOKEN

Error that I get:

  "code": -1,
  "message": "-1 Image too big"

Am I doing something wrong?

Thanks.

What’s the size of fw.zip ?

It looks like he’s trying to OTA a 2M firmware with a 4M one

While we’re on this thread, I encountered a new OTA issue myself:

When attempting OTA via the mDash page I receive the error:

Unsupported firmware file. Only .zip and .hex supported

I’ve had no success uploading ESP32 .bin files in the same way that has worked for the last 6 months. I did not see any updates to the OTA docs, but I thought I’d try ZIPing my .bin file just in case there was an undocumented change.

No joy there either. The file is accepted, but when the transfer reaches 100% the following error is seen on the mDash page:

Failed error 5397

No errors are reported in the target device’s mdash.log

Did something change on the backend regarding OTA recently?

-AD

Hi, I am trying to update an Arduino Uno firmware connected to an ESP8266 but I am receiving the error below.
Some one had this problem or have some clue to find the cause for this error ?
I will appreciate any kindle help with this !

Regards

$ curl -i -F file=@fw.zip https://mdash.net/api/v2/devices/device13/ota?access_token=lDE0aA5oqIjlDMiPA1c2FA
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 11050 0 0 100 11050 0 6015 0:00:01 0:00:01 --:–:-- 6011
100 11050 0 0 100 11050 0 3890 0:00:02 0:00:02 --:–:-- 3889
100 11050 0 0 100 11050 0 2875 0:00:03 0:00:03 --:–:-- 2874
100 11138 100 88 100 11050 22 2819 0:00:04 0:00:03 0:00:01 2841
HTTP/1.1 100 Continue

HTTP/1.1 500 Internal Server Error
Server: nginx/1.12.2
Date: Tue, 11 Feb 2020 22:55:29 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 88
Connection: keep-alive
Cache-Control: no-cache, private, max-age=0
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache

{
“code”: -1,
“message”: “-10 Nothing interesting in the update (wrong platform?)”
}Command completed.

FWIW - the .bin file OTA issue was resolved shortly after this post.

@Jose_Luiz_Sanchez_Lo could you show the output of mos config-get ccm.host please

Hi Ism,
Thank You for reply.

Following is the output :

$ mos config-get ccm.host --port /dev/cu.usbserial-A402QKIU
{
  "activity_led_act": 1,
  "activity_led_pin": -1,
  "ota": {
    "avr": {
      "miso_pin": 12,
      "mosi_pin": 13,
      "rst_act": 0,
      "rst_pin": 4,
      "sclk_pin": 14,
      "spi_freq": 1000000
    },
    "chip_type": "AVR",
    "enable": true,
    "staging_dir": "/",
    "stm32": {
      "boot0_act": 1,
      "boot0_pin": -1,
      "boot1_act": -1,
      "boot1_pin": -1,
      "intf_type": "UART",
      "rst_act": 0,
      "rst_pin": -1,
      "uart": {
        "baud_rate": 115200,
        "rx_pin": 0,
        "tx_pin": 0,
        "unit_no": -1
      }
    }
  },
  "rpc": {
    "enable": true,
    "intf_type": "UART",
    "uart": {
      "baud_rate": 115200,
      "cts_pin": -1,
      "fc_type": 0,
      "rts_pin": -1,
      "rx_pin": -1,
      "tx_pin": -1,
      "unit_no": -1
    }
  }
}

Command completed.

Regards

Thank yuo @Jose_Luiz_Sanchez_Lo
The config seems OK - but please double-check the value of ccm.host.ota.avr.rst_pin.
Maybe the issue is with the fw.zip contents.
Before looking into it, please try to update your Arduino via mDash UI:

  • In Arduino IDE, choose “export compiled binary”
  • In mDash UI, navigate to “Devices”, find your device (must be green), click on the “download” icon
  • In the file selector, navigate to your sketch directory, and choose compiled .hex file. If there two, choose the one without boot loader.

Hi Ism, Thank you by your directions.
I tried to use GPIO5 as a RST pin, but the error continue the same: “-10 Nothing interesting in the update (wrong platform?)”
I did a try updating from mDash UI and UI report the same message above.
I’ve checked the reset pin (GPIO5) with a logic probe while updating and no reset is generate.

Is that “stm32” correct on the response of command below ?

$ mos config-get ccm.host
{
  "activity_led_act": 1,
  "activity_led_pin": -1,
  "ota": {
    "avr": {
      "miso_pin": 12,
      "mosi_pin": 13,
      "rst_act": 0,
      "rst_pin": 5,
      "sclk_pin": 14,
      "spi_freq": 1000000
    },
    "chip_type": "AVR",
    "enable": true,
    "staging_dir": "/",
    "stm32": {
      "boot0_act": 1,
      "boot0_pin": -1,
      "boot1_act": -1,
      "boot1_pin": -1,
      "intf_type": "UART",
      "rst_act": 0,
      "rst_pin": -1,
      "uart": {
        "baud_rate": 115200,
        "rx_pin": 0,
        "tx_pin": 0,
        "unit_no": -1
      }
    }
  },
  "rpc": {
    "enable": true,
    "intf_type": "UART",
    "uart": {
      "baud_rate": 115200,
      "cts_pin": -1,
      "fc_type": 0,
      "rts_pin": -1,
      "rx_pin": -1,
      "tx_pin": -1,
      "unit_no": -1
    }
  }
}
Command completed. 

Please let me know if you have another thing I can check ?

Best regards

José Luiz

@Jose_Luiz_Sanchez_Lo please attach your fw.zip

Also, when using UI, make sure you’re uploading .hex file from the sketch folder.

I am using the .hex file generate in arduino IDE, the one without bootloader.

I cant upload the file here.

You can get it here: https://www.dropbox.com/sh/b5p0rabsgn1pa9t/AACWHUI5cGbl_8ExewPFe_sia?dl=0

Thank you. Please bring your device online, we’ll run couple of tests against it.

Ok, it is online now.
You can run tests, please.

Thank You

Hi, I saw you did an upload to my device.
Did you find the issue ?
Thank You

José Luiz