Copyright ©

Mongoose OS Forum


RPC method error: 404 not found

lvdinhlvdinh HCMC
edited October 2017 in Mongoose OS

I created a simple RPC method name "Control0".
After that I call "mos call Control0" then CMD returned 404 not found.
I also checked by calling "mos call RPC.List", it was not listed.
I'm using ESP8266 D1 mini.

Please help me!

Thanks and Regards,


  • lvdinhlvdinh HCMC
    edited October 2017

    My code:

    let led = Cfg.get('pins.led');
    RPC.addHandler("Control0", function(args){
      GPIO.write(led, args.state);
      return true;

    cmd returns:

    E:\IoT\mos>mos call RPC.List
    Using port COM12
  • SergeySergey Dublin, Ireland

    You should pay attention to the error messages printed on the console.

  • Today, after retried to flash again, I was seeing my new RPC method. I think there might be some problems of cable when I save the code.

  • SergeySergey Dublin, Ireland
    edited October 2017

    The problem is with the code, you call Cfg function and did not load('api_config.js');
    The appropriate error you should have seem on the console.

Sign In or Register to comment.