Skip to content

UnetJS RemoteExecReq fails & causes simulator to fault. #80

@Louisgcr

Description

@Louisgcr

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions