FreeMASTER JSON-RPC Connection Not Successful

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FreeMASTER JSON-RPC Connection Not Successful

跳至解决方案
3,900 次查看
arun07
Contributor III

Hello Everyone,

I am trying to play with FreeMASTER, first I tried with ActiveX and it works fine for me, and now I am trying JSON-RPC, and here I am facing a problem with the initial connection, which means with the following line.

 pcm = new PCM("localhost:41000", on_connected, on_error, on_error);

The below screenshot is from the debugging session.

Any idea's what can go wrong.

Thanks in Advance

I am using FreeMASTER 3.1.2 (the latest version as of now), and while checking this my FreeMASTER  Desktop application is open and running.

标记 (1)
0 项奖励
回复
1 解答
3,875 次查看
MichalH
NXP Apps Support
NXP Apps Support

Dear Arun,

I think you will need to talk to your IT administrator to add an exception to a firewall settings. You can also change a TCP port by using a command line argument /rpcs N when launching the FreeMASTER executable (pcmaster.exe). The default N is 41000, but it may be changed this way.

Best regards,
Michal

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
3,889 次查看
MichalH
NXP Apps Support
NXP Apps Support

Dear Arun,

I'm not sure what can be wrong here. The port 41000 is open as soon as the FreeMASTER desktop application starts. Perhaps it is blocked by a firewall or some other security settings of your computer.

The easiest way to test if a port is reachable is to use "telnet localhost 41000" The terminal will appear to be empty, so just type two characters: {}  which is a shortest-possible (invalid) JSON-RPC command. You should get an answer:

{"jsonrpc":"2.0","id":"","error":{"code":-32600,"message":"Unknown error"}}

The communication should be also possible to be captured by a Wireshark.

Regards,
Michal

0 项奖励
回复
3,885 次查看
arun07
Contributor III

Dear @MichalH 

Thanks for your response. Yes, you are right, it looks like that the port is blocked.

I checked the same thing on my personal laptop and it works fine, so this is the problem with my office laptop. Can I do something else to make it work?

 

0 项奖励
回复
3,876 次查看
MichalH
NXP Apps Support
NXP Apps Support

Dear Arun,

I think you will need to talk to your IT administrator to add an exception to a firewall settings. You can also change a TCP port by using a command line argument /rpcs N when launching the FreeMASTER executable (pcmaster.exe). The default N is 41000, but it may be changed this way.

Best regards,
Michal

 

0 项奖励
回复