Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnetJS RemoteExecReq fails & causes simulator to fault. #80

Open
Louisgcr opened this issue Nov 10, 2022 · 1 comment
Open

UnetJS RemoteExecReq fails & causes simulator to fault. #80

Louisgcr opened this issue Nov 10, 2022 · 1 comment
Assignees

Comments

@Louisgcr
Copy link

Environment

  • Ubuntu 18.04
  • Unet (Simulator) version: 3.4.0
  • Unetjs version: 2.0.1

I have enabled remote remote.enable = true using the webshell.

How to trigger the issue.

  1. Run the simulator ./bin/unet samples/2-node-network.groovy
2-node network (High-frequency)
-------------------------------

Node A: tcp://192.168.1.160:1101, http://192.168.1.160:8081/ Node address: 108
Node B: tcp://192.168.1.160:1102, http://192.168.1.160:8082/ Node address: 242

Tried calling this request

let socket = await new UnetSocket(ip, port, '/ws/')
let gw = socket.getGateway()
let new_remote = new UnetMessages.RemoteExecReq()
new_remote.recipient = await gw.agentForService(Services.REMOTE);
new_remote.to = 242
new_remote.ack = true
new_remote.command = 'phy[1].powerLevel = -38'
let res = await gw.request(new_remote, 1000)

Simulation Output

SEVERE: org.arl.unet.remote.RemoteControl/surface > Exception in agent: remote
SEVERE: org.arl.unet.remote.RemoteControl/surface > Agent remote died: java.lang.NullPointerException

Sending a RemoteTextReq.

let socket = await new UnetSocket(ip, port, '/ws/')
let gw = socket.getGateway()
let new_remote = new UnetMessages.RemoteTextReq()
new_remote.recipient = await gw.agentForService(Services.REMOTE);
new_remote.to = 242
new_remote.text = 'hello3!'
new_remote.ack = true
let res = await gw.request(new_remote, 1000)
@notthetup notthetup self-assigned this Nov 10, 2022
@notthetup
Copy link
Collaborator

Sounds more like an issue with UnetStack than unetsocket.js. Will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants