Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Difficulty with RPC calls from command line

jstevewoodjstevewood California

Hi All,

I can't get RPC calls to work with the simple sequence that is shown on the RPC mechanism page. Here are three examples:

C:\Mong\Optimize5>mos --port ws://192.168.4.1/rpc call XSquirt
1

C:\Mong\Optimize5>mos --port ws://192.168.4.1/rpc call XscanZone '{"a":1}'
Error: Args ['{a:1}'] is not a valid JSON string

C:\Mong\Optimize5>mos --port ws://192.168.4.1/rpc call Sum '{"a":50,"b":50}'
Error: Args ['{a:50,b:50}'] is not a valid JSON string

The first RPC has no arguments and completes successfully. The second and third RPCs have one and 2 arguments respectively, delivering the indicated errors. All three work successfully with XHR Posts.

Also....

C:\Mong\Optimize5>mos call RPC.list
Using port COM3
Error: remote error 404: No handler for RPC.list

Thanks for your help,

SW

Comments

Sign In or Register to comment.