Code Monkey home page Code Monkey logo

Comments (11)

DrBomb avatar DrBomb commented on July 28, 2024 1

OK. That's your problem. Although opening the mos.exe directly opens an interface I do not use it at all. Just run the mos tool via the command prompt. Don't use the GUI that opens.

from mongoose-os.

DrBomb avatar DrBomb commented on July 28, 2024 1

Also, and sorry for the double comment. The mos tool might linger in the background as I think it doesn't close when you close the window. So make sure to terminate the GUI process if it stays open.

from mongoose-os.

DrBomb avatar DrBomb commented on July 28, 2024 1

I wonder why the GUI doesn't.... :/

Because it is a relic of their first iterations where they had a code editor and a bunch of functionality that made a lot more sense. Mostly because in that time mOS was banking on mJS a lot. Moving forward mJS was changed to a "prototyping language" and they downgraded the GUI to what I believe is a mostly unusable collection of windows.

Can't blame them though, if anything I'd like the GUI to be completely removed to avoid these issues moving forward, the rest of the mos program is OK.

I'm getting "not valid JSON String" errors...

JSON strings need to be properly escaped in Windows. String arguments will not accept single quotes ' as its delimiter so any JSON needs to be enclosed on double quotes " and every single internal double quote will need to be escaped with a backslash \ so your command would be mos --port mqtt://10.201.102.40:1883/esp32_8ae410 call OTA.Update "{\"url\": \"http://10.12.24.3:3000/firmware/firmware.zip\", \"commit_timeout\": 300}"

from mongoose-os.

Ironhydroxide avatar Ironhydroxide commented on July 28, 2024 1

I wonder why the GUI doesn't.... :/

Because it is a relic of their first iterations where they had a code editor and a bunch of functionality that made a lot more sense. Mostly because in that time mOS was banking on mJS a lot. Moving forward mJS was changed to a "prototyping language" and they downgraded the GUI to what I believe is a mostly unusable collection of windows.

Can't blame them though, if anything I'd like the GUI to be completely removed to avoid these issues moving forward, the rest of the mos program is OK.

I'm getting "not valid JSON String" errors...

JSON strings need to be properly escaped in Windows. String arguments will not accept single quotes ' as its delimiter so any JSON needs to be enclosed on double quotes " and every single internal double quote will need to be escaped with a backslash \ so your command would be mos --port mqtt://10.201.102.40:1883/esp32_8ae410 call OTA.Update "{\"url\": \"http://10.12.24.3:3000/firmware/firmware.zip\", \"commit_timeout\": 300}"

Thank you so much for your help!!!

from mongoose-os.

scaprile avatar scaprile commented on July 28, 2024
$ mos --port /dev/ttyACM0 console
[Jun 11 14:02:12.992] 0  2ongoose.c:53:mg_tcpip_init  MAC not set. Generated random: 0:2d:cf:46:29:04

It does work. It may not be working for you under some circumstances.
I suggest you ask for help at the forum https://community.mongoose-os.com/

from mongoose-os.

DrBomb avatar DrBomb commented on July 28, 2024

I've used mongoose for 7 or so years and I've never seen that command response. I usually roll with the latest build instead of release. Try it out https://mongoose-os.com/downloads/mos-latest/win/mos.exe

from mongoose-os.

Ironhydroxide avatar Ironhydroxide commented on July 28, 2024

I've used mongoose for 7 or so years and I've never seen that command response. I usually roll with the latest build instead of release. Try it out https://mongoose-os.com/downloads/mos-latest/win/mos.exe

Thanks, tried this... but still get the same result.

$ cd C:/mos/problem/app1
Command completed.
$ mos --port COM14 flash
Unknown command
Command completed.
$ mos version
The Mongoose OS command line tool
Version: 202303131403
Build ID: 20230313-145707/2.20.0-20-gb44964e-master
Update channel: latest
Command completed.
$ mos ports
COM14
COM17
COM18
COM5
Command completed.
$ mos --port COM14 flash
Unknown command
Command completed.

from mongoose-os.

Ironhydroxide avatar Ironhydroxide commented on July 28, 2024
$ mos --port /dev/ttyACM0 console
[Jun 11 14:02:12.992] 0  2ongoose.c:53:mg_tcpip_init  MAC not set. Generated random: 0:2d:cf:46:29:04

It does work. It may not be working for you under some circumstances. I suggest you ask for help at the forum https://community.mongoose-os.com/

Sadly, the system is not allowing signups. Clicking the "Create your account" button does nothing.
I've searched through the community pretty heavily though, to make sure my syntax was correct on the command, and found nobody else who had reported a similar issue.

edit: Apparently one must sign up with github or google.... not directly.

from mongoose-os.

DrBomb avatar DrBomb commented on July 28, 2024

I've never seen Unknown command on mongoose nor on anything trying to use serial ports. Is this not a normal windows instance? Different terminal? Running on a virtual machine? Why does it have a $ for a prompt? And why does it print "Command completed." when the mos binary exits?

from mongoose-os.

Ironhydroxide avatar Ironhydroxide commented on July 28, 2024

I've never seen Unknown command on mongoose nor on anything trying to use serial ports. Is this not a normal windows instance? Different terminal? Running on a virtual machine? Why does it have a $ for a prompt? And why does it print "Command completed." when the mos binary exits?

I have no clue what would be different about it.
Windows 10 Enterprise, and Windows 11 Pro, Neither running in VM, opened mos by double clicking the mos.exe.
I am very very new with mongooseos, so could easily be doing something wrong, thus me trying to follow the guides exactly.

mos
Win10

from mongoose-os.

Ironhydroxide avatar Ironhydroxide commented on July 28, 2024

OK. That's your problem. Although opening the mos.exe directly opens an interface I do not use it at all. Just run the mos tool via the command prompt. Don't use the GUI that opens.
Also, and sorry for the double comment. The mos tool might linger in the background as I think it doesn't close when you close the window. So make sure to terminate the GUI process if it stays open.

No worries.
Yes in command line it seems to be working.

I wonder why the GUI doesn't.... :/

also, slighly off topic.... is my syntax correct here with OTA.Update (https://mongoose-os.com/docs/mongoose-os/api/rpc/rpc-service-ota.md)

mos --port mqtt://10.201.102.40:1883/esp32_8ae410 call OTA.Update '{"url": "http://10.12.24.3:3000/firmware/firmware.zip", "commit_timeout": 300}'

I'm getting "not valid JSON String" errors...

from mongoose-os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.