-
Notifications
You must be signed in to change notification settings - Fork 381
Open
@vatsalmehta1994
Description
Hi,
I am using zerorpc to connect to server. My backend is in python and frontend is in js. Code flashed hex file to MCB chip. When I connect multiple MCBs through PCAN it stops uploading code at random time and gives HeartbeatError: Lost Remote after 10000 ms. I tried changing default HeartbeatInterval from 5000 ms to 10000 ms but it didn't work.
PS: When I try to flash in development mode it flashes all MCBs fine but when I package the code into executable it shows this error.
Can anyone help resolve this issue or disable Heartbeat checks?
Here is the code that connects to server:
Python:
def start_rpc_server(): address = 'tcp://122.0.0.0:' + str(parse_port()) cfg_file_name = 'uds_flasher_cfg.json5' cfg = load_json5_portable(file=cfg_file_name, mode='r') # from json configuration file server = zerorpc.Server(UpdateUtility(uds_cfg=cfg['uds_cfg'], system_cfg=cfg['system_cfgs'][platform.system()], bl_cfg=cfg['bl_cfg'], user_cfg=cfg['user_cfg'])) server.bind(address) print('start running on {}'.format(address)) server.run()
JS:
const zerorpc = require("zerorpc"); let client = new zerorpc.Client({ timeout: 2 }); client.connect("tcp://122.0.0.0:4444");