Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

MIOT tool: Error: (1) build failed

I used the following to get credentials (no problem):

>miot auth login

Then I created the firmware using the following (no problem):

>miot fw init --arch esp8266

When I run the build I get the following:

>miot.exe cloud build
Uploading app sources to the cloud...
Invoking the build at the cloud...
  == Build started
  make: Entering directory '/code'
    MKDIR /tmp/.build/fw_temp
    MKDIR /tmp/.build
  CC esptool2.c
  gcc -O2 -Wall -c esptool2.c -o /tmp/.build/esptool2.o
  CC esptool2_elf.c
  gcc -O2 -Wall -c esptool2_elf.c -o /tmp/.build/esptool2_elf.o
  make: *** No rule to make target '/code/filesystem/conf_app_defaults.json', needed by '/tmp/.build/sys_config.c'.  Stop.
  make: *** Waiting for unfinished jobs....
    GEN   /sjs/repo/fw/platforms/esp8266/ld/fw.ld (0xc9ff0 @ 0x40211010) -> /tmp/.build/0x11000.ld
Error: (1) build failed

What am I doing wrong?

Comments

  • SergeySergey Dublin, Ireland

    Thanks Greg,
    What OS you're using?

  • I'm using Windows 10 (1607)

  • SergeySergey Dublin, Ireland

    We've updated the miot tool. Please re-download, and start fresh - i.e. miot fw init new directory.

  • Awesome, it works! FYI to anyone else, I was using the following:

    >miot.exe -version
    The Mongoose IoT command line tool
    Version: 20160919165918
    Build ID: 20160919-165918/lsm@f2eeef20

    Works with this version:

    >miot.exe -version
    The Mongoose IoT command line tool
    Version: 20160921220311
    Build ID: 20160921-220311/lsm@15039b57

    Thanks Sergey!

  • SergeySergey Dublin, Ireland

    You're welcome Greg.

  • Well the flashing worked fine, but now I get this error trying to config the WIFI:

    >miot dev config set -port COM3 wifi.sta.ssid=MY-SSID wifi.sta.pass=MyPass wifi.sta.enable=true
    Getting configuration...
    Setting new configuration...
    E0923 19:42:17.582235   14088 dispatcher.go:77] Failed to parse address "": empty id
    /Users/lsm/src/cesanta.com/clubby/id/id.go:22: empty id
    Error: (1) dispatcher failed to deliver the command

    Is there another value required?

  • SergeySergey Dublin, Ireland

    What board it is?
    What miot --version says?

  • SergeySergey Dublin, Ireland

    Also, please re-run the command with --v 5 --logtostderr option and show the output.

  • >miot --version
    The Mongoose IoT command line tool
    Version: 20160921220311
    Build ID: 20160921-220311/lsm@15039b57
  • Part 1/2:

    >miot --v 5 --logtostderr dev config set -port COM3 wifi.sta.ssid=My-SSID wifi.sta.pass=MyPass wifi.sta.enable=true
    I0924 09:59:34.853568    6212 main.go:202] Connecting to COM3 over tSerial
    I0924 09:59:34.959299    6212 main.go:231] Outbound channel: [simpleChannel on [streamConnectionCodec to COM3]]
    Getting configuration...
    I0924 09:59:34.960301    6212 simple.go:93] [simpleChannel on [streamConnectionCodec to COM3]]: Sending "miot" -> "" v=2 id=2167115412852 /v1/Config.Get args=uninitialized 0
    I0924 09:59:34.960301    6212 simple.go:94] [simpleChannel on [streamConnectionCodec to COM3]]: Sending frame: "miot" -> "" v=2 id=2167115412852 /v1/Config.Get args=uninitialized 0
    I0924 09:59:34.980554    6212 stream.go:148] 1 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:34.980554    6212 stream.go:148] 66 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:34.981562    6212 stream.go:139] [streamConnectionCodec to COM3] frame: "dummy" -> "miot" v=2 id=2095177489886 result=uninitialized error=<nil> 64
    I0924 09:59:34.982061    6212 simple.go:57] [simpleChannel on [streamConnectionCodec to COM3]]: Rec'd "dummy" -> "miot" v=2 id=2095177489886 result=uninitialized error=<nil> 64
    I0924 09:59:34.982061    6212 simple.go:58] [simpleChannel on [streamConnectionCodec to COM3]]: Rec'd frame: "dummy" -> "miot" v=2 id=2095177489886 result=uninitialized error=<nil> 64
    I0924 09:59:34.982061    6212 simple.go:66] [simpleChannel on [streamConnectionCodec to COM3]]: detected version 2
    I0924 09:59:35.062620    6212 endpoint.go:345] Unsolicited response: "dummy" -> "miot" v=2 id=2095177489886 result=uninitialized error=<nil> 64
    I0924 09:59:35.117499    6212 stream.go:148] 1 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.117499    6212 stream.go:148] 511 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.162005    6212 stream.go:148] 1 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.162005    6212 stream.go:148] 511 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.185049    6212 stream.go:148] 1 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.185563    6212 stream.go:148] 273 bytes read, err %!q(<nil>), eof? false
    I0924 09:59:35.187061    6212 stream.go:139] [streamConnectionCodec to COM3] frame: "dummy" -> "miot" v=2 id=2167115412852 result=JSON: "{\"wifi\":{\"sta\":{\"enable\":false,\"ssid\":\"\",\"pass\":\"\",\"ip\":\"\",\"netmask\":\"\",\"gw\":\"\"},\"ap\":{\"enable\":true,\"keep_enabled\":true,\"trigge"... (1221) error=<nil> 1295
    I0924 09:59:35.187560    6212 simple.go:57] [simpleChannel on [streamConnectionCodec to COM3]]: Rec'd "dummy" -> "miot" v=2 id=2167115412852 result=JSON: "{\"wifi\":{\"sta\":{\"enable\":false,\"ssid\":\"\",\"pass\":\"\",\"ip\":\"\",\"netmask\":\"\",\"gw\":\"\"},\"ap\":{\"enable\":true,\"keep_enabled\":true,\"trigge"... (1221) error=<nil> 1295
    I0924 09:59:35.187560    6212 simple.go:58] [simpleChannel on [streamConnectionCodec to COM3]]: Rec'd frame: "dummy" -> "miot" v=2 id=2167115412852 result=JSON: "{\"wifi\":{\"sta\":{\"enable\":false,\"ssid\":\"\",\"pass\":\"\",\"ip\":\"\",\"netmask\":\"\",\"gw\":\"\"},\"ap\":{\"enable\":true,\"keep_enabled\":true,\"trigge"... (1221) error=<nil> 1295
    Setting new configuration...
    I0924 09:59:35.188562    6212 simple.go:93] [simpleChannel on [streamConnectionCodec to COM3]]: Sending "miot" -> "" v=2 id=1946127789098 /v1/Config.Set args=Delayed marshaler: &config.SetArgs{Config:ourjson.RawMessage{ourjson.delayMarshaling{val:map[string]interface {}{"sys":map[string]interface {}{"wdt_timeout":15}, "console":map[string]interface {}{"log_file_size":2048, "send_to_cloud":true, "mem_buf_size":256, "log_file":"console.log"}, "tls":map[string]interface {}{"ca_file":"ca.pem"}, "clubby":map[string]interface {}{"connect_on_boot":true, "reconnect_timeout_max":60, "verify_timeouts_period":30, "reconnect_timeout_min":10, "request_timeout":300, "max_queue_size":25, "device_psk":"", "memory_limit":15360, "ssl_client_cert_file":"", "uart":map[string]interface {}{"fc_enable":false, "wait_for_start_frame":true, "uart_no":0, "baud_rate":115200}, "server_address":"api.mongoose-iot.com", "device_id":"dummy", "ssl_server_name":"", "ssl_ca_file":""}, "update":map[string]interface {}{"ssl_ca_file":"", "ssl_client_cert_file":"", "server_timeout":10, "update_to_any_version":true, "ssl_server_name":""}, "debug":map[... (1713)
    I0924 09:59:35.189061    6212 simple.go:94] [simpleChannel on [streamConnectionCodec to COM3]]: Sending frame: "miot" -> "" v=2 id=1946127789098 /v1/Config.Set args=Delayed marshaler: &config.SetArgs{Config:ourjson.RawMessage{ourjson.delayMarshaling{val:map[string]interface {}{"tls":map[string]interface {}{"ca_file":"ca.pem"}, "clubby":map[string]interface {}{"device_psk":"", "memory_limit":15360, "ssl_client_cert_file":"", "uart":map[string]interface {}{"baud_rate":115200, "fc_enable":false, "wait_for_start_frame":true, "uart_no":0}, "server_address":"api.mongoose-iot.com", "device_id":"dummy", "ssl_server_name":"", "ssl_ca_file":"", "connect_on_boot":true, "reconnect_timeout_max":60, "verify_timeouts_period":30, "reconnect_timeout_min":10, "request_timeout":300, "max_queue_size":25}, "sys":map[string]interface {}{"wdt_timeout":15}, "console":map[string]interface {}{"mem_buf_size":256, "log_file":"console.log", "log_file_size":2048, "send_to_cloud":true}, "wifi":map[string]interface {}{"sta":map[string]interface {}{"pass":"MyPass", "ip":"", "netmask":"", "gw":"", "enable":true, "ssid":"My-SSID"}, "ap":map[string]interface {}{"dhcp_end":"192.168.4.100", "keep_enabled":true, "ssid":"Mongoose_??????", "hidden":false, "ip":"192.168.4.1", "netmask":"255.255.255.0", "gw":"192.168.4.1", "dhcp_start":"192.168.4.2", "enable":true, "trigger_on_gpio":-1, "pass":"Mongoose", "channel":6, "max_connections":10}}, "http":map[string]interface {}{"enable":true, "listen_addr":"80", "upload_acl":"*", "hidden_files":""}, "update":map[string]interface {}{"ssl_client_cert_file":"", "server_timeout":10, "update_to_any_version":true, "ssl_server_name":"", "ssl_ca_file":""}, "debug":map[string]interface {}{"level":2, "stdout_uart":0, "stderr_uart":0, "enable_prompt":true, "factory_reset_gpio":-1}, "conf_acl":"*"}}}} 0
  • Part 2/2:

    I0924 09:59:35.387610    6212 stream.go:148] 0 bytes read, err "EOF", eof? true
    I0924 09:59:35.388088    6212 stream.go:148] 0 bytes read, err "The handle is invalid.", eof? false
    I0924 09:59:35.389098    6212 dispatcher.go:179] Recv: The handle is invalid.
    The handle is invalid.
    /Users/lsm/src/cesanta.com/clubby/codec/stream.go:151:
    /Users/lsm/src/cesanta.com/clubby/channel/simple.go:51:
    I0924 09:59:35.392633    6212 dispatcher.go:126] Send "miot" -> "" v=2 id=1946127789098 /v1/Config.Set args=Delayed marshaler: &config.SetArgs{Config:ourjson.RawMessage{ourjson.delayMarshaling{val:map[string]interface {}{"debug":map[string]interface {}{"enable_prompt":true, "factory_reset_gpio":-1, "level":2, "stdout_uart":0, "stderr_uart":0}, "conf_acl":"*", "wifi":map[string]interface {}{"ap":map[string]interface {}{"keep_enabled":true, "ssid":"Mongoose_??????", "hidden":false, "ip":"192.168.4.1", "netmask":"255.255.255.0", "dhcp_end":"192.168.4.100", "dhcp_start":"192.168.4.2", "enable":true, "trigger_on_gpio":-1, "pass":"Mongoose", "channel":6, "max_connections":10, "gw":"192.168.4.1"}, "sta":map[string]interface {}{"gw":"", "enable":true, "ssid":"My-SSID", "pass":"MyPass", "ip":"", "netmask":""}}, "http":map[string]interface {}{"upload_acl":"*", "hidden_files":"", "enable":true, "listen_addr":"80"}, "update":map[string]interface {}{"ssl_client_cert_file":"", "server_timeout":10, "update_to_any_version":true, "ssl_server_name":"", "ssl_ca_file":""}, "console":map[string]interface {}{"mem_buf_size":256, "log_file":"console.log", "log_file_size":2048, "send_to_cloud":true}, "tls":map[string]interface {}{"ca_file":"ca.pem"}, "clubby":map[string]interface {}{"reconnect_timeout_min":10, "request_timeout":300, "max_queue_size":25, "device_psk":"", "memory_limit":15360, "ssl_client_cert_file":"", "uart":map[string]interface {}{"wait_for_start_frame":true, "uart_no":0, "baud_rate":115200, "fc_enable":false}, "server_address":"api.mongoose-iot.com", "device_id":"dummy", "ssl_server_name":"", "ssl_ca_file":"", "connect_on_boot":true, "reconnect_timeout_max":60, "verify_timeouts_period":30}, "sys":map[string]interface {}{"wdt_timeout":15}}}}} 0 failed: The handle is invalid.
    The handle is invalid.
    /Users/lsm/src/cesanta.com/clubby/codec/serial.go:59:
    /Users/lsm/src/cesanta.com/clubby/codec/stream.go:178:
    E0924 09:59:35.393144    6212 dispatcher.go:77] Failed to parse address "": empty id
    /Users/lsm/src/cesanta.com/clubby/id/id.go:22: empty id
    W0924 09:59:35.393144    6212 dispatcher.go:145] "miot" -> "" v=2 id=1946127789098 /v1/Config.Set args=Delayed marshaler: &config.SetArgs{Config:ourjson.RawMessage{ourjson.delayMarshaling{val:map[string]interface {}{"conf_acl":"*", "wifi":map[string]interface {}{"sta":map[string]interface {}{"enable":true, "ssid":"My-SSID", "pass":"MyPass", "ip":"", "netmask":"", "gw":""}, "ap":map[string]interface {}{"ssid":"Mongoose_??????", "hidden":false, "ip":"192.168.4.1", "netmask":"255.255.255.0", "dhcp_end":"192.168.4.100", "keep_enabled":true, "trigger_on_gpio":-1, "pass":"Mongoose", "channel":6, "max_connections":10, "gw":"192.168.4.1", "dhcp_start":"192.168.4.2", "enable":true}}, "http":map[string]interface {}{"listen_addr":"80", "upload_acl":"*", "hidden_files":"", "enable":true}, "update":map[string]interface {}{"server_timeout":10, "update_to_any_version":true, "ssl_server_name":"", "ssl_ca_file":"", "ssl_client_cert_file":""}, "debug":map[string]interface {}{"stderr_uart":0, "enable_prompt":true, "factory_reset_gpio":-1, "level":2, "stdout_uart":0}, "tls":map[string]interface {}{"ca_file":"ca.pem"}, "clubby":map[string]interface {}{"connect_on_boot":true, "reconnect_timeout_max":60, "verify_timeouts_period":30, "reconnect_timeout_min":10, "request_timeout":300, "max_queue_size":25, "device_psk":"", "memory_limit":15360, "ssl_client_cert_file":"", "uart":map[string]interface {}{"fc_enable":false, "wait_for_start_frame":true, "uart_no":0, "baud_rate":115200}, "server_address":"api.mongoose-iot.com", "device_id":"dummy", "ssl_server_name":"", "ssl_ca_file":""}, "sys":map[string]interface {}{"wdt_timeout":15}, "console":map[string]interface {}{"mem_buf_size":256, "log_file":"console.log", "log_file_size":2048, "send_to_cloud":true}}}}} 0 goes to /dev/null
    Error: (1) dispatcher failed to deliver the command
  • SergeySergey Dublin, Ireland

    Thank you. Let us look at this..
    Do you have a Linux or Mac station to try? We mostly develop on Mac/Linux, and I am pretty sure that works - apparently Windows has some quirks.

  • Unfortunately, I only have Windows.

  • Greg, thanks for reporting that, I reproduced it at my Windows VM; we'll try to fix that at Monday. We'll post here once we have some news.

  • Greg, we've fixed the issue with miot on Windows; please re-download it and try your config-setting command again (miot dev config set -port COM3 wifi.sta.ssid=MY-SSID wifi.sta.pass=MyPass wifi.sta.enable=true), it should work now.

    Thanks again for reporting that!

  • Well the new tool can configure the WiFi settings now, but miot.exe cloud build is broken now. Had to go back to the old version of the tool to do everything else.

    Finally got my device to register! Yay!

    Went to the cloud IDE and cloned the Blink example... build failed. :neutral: A little investigation revealed I needed to manually add the conf_app_defaults.json file. Builds and runs fine for the virtual device, but fails with Error deploying firmware: (1) Failed to parse manifest when I try sending it to my device. :neutral:

    Try to delete my project and start again... ummm.... how do you do that?

    This product is a great idea waiting to happen. I appreciate you guys trying to help me out here, but there just seems to be so many things that are just not working. You can't really believe anyone would really use this in healthcare do you? Please don't advertise that.

    Maybe I'll check back again in a few months and see if it has come together. I really hope so, as you have a good idea here.

  • SergeySergey Dublin, Ireland

    Hi Greg, you can give it another try.
    https://mongoose-iot.com/docs/#/quickstart/ is a good place to start.

  • Hi Sergey, I've been following the instructions in the link you provided above, but building the firmware fails for me. I am on a mac. When I run miot build --user --pass, the command exits with the error "no such file or directory" when looking for the Makefile. Has the path for the repository changed? Do I need to edit the miot.yml file?thanks

  • SergeySergey Dublin, Ireland
    1. Try miot build --clean
    2. Attach the logs of the failed build, and also mention what exactly are you building, please.
  • I tried miot build --clean and that didn't work for some reason. It doesn't seam to be part of the build usage. I tried passing the username and password with it, before and after --clean, and that didn't work either.

    I am building the firmware as instructed in the tutorial:
    https://mongoose-iot.com/docs/#/quickstart/build.md/

    The log of the failed build is:

    The flag --repo is not given, going to use mongoose-iot repository
    Building...
    Make arguments: -j -f mongoose-iot/fw/platforms/ARCHITECTURE/Makefile APP=MongooseIot APP_CONF_SCHEMA=src/conf_schema.yaml MIOT_PATH=mongoose-iot BUILD_DIR=build/objs FW_DIR=build/fw FS_STAGING_DIR=build/fs GEN_DIR=build/gen APP_MODULES=src APP_VERSION=1.0 APP_FS_PATH=fs PLATFORM=ARCHITECTURE
    make: mongoose-iot/fw/platforms/ARCHITECTURE/Makefile: No such file or directory
    make: *** No rule to make target 'mongoose-iot/fw/platforms/ARCHITECTURE/Makefile'.  Stop.
    Error: exit status 2
  • Hi RGVZ, as comment suggests:

    miot init --arch ARCHITECTURE # cc3200 or esp8266
    

    you need to substitute ARCHITECTURE with either cc3200 or esp8266 when executing miot init.

  • Oh haha I'm an idiot I thought ARCHITECTURE was a #define of sort. It works now, thanks

Sign In or Register to comment.