print(list(emFile)) if not config.not_exe: modem = Modem(config.device, config.rate, unsolicited_response_received_callback=received_command_callback, rebooted_callback=rebooted_callback) modem.connect() cmd = Command() if config.forward: cmd.add_forward_action( interface_type=InterfaceType.D7ASP, interface_configuration=Configuration( qos=QoS(resp_mod=ResponseMode.RESP_MODE_PREFERRED, retry_mod=RetryMode.RETRY_MODE_NO), addressee=Addressee( access_class=0x11, id_type=IdType.NBID, id=CT.compress(2) ) ) ) if (config.factory_gaussian != 0xFF) or (config.factory_paramp != 0xFF): if (config.factory_gaussian != 0xFF) or (config.factory_paramp != 0xFF): fact = FactorySettingsFile(gaussian=config.factory_gaussian, paramp=config.factory_paramp) elif config.factory_gaussian != 0xFF: fact = FactorySettingsFile(gaussian=config.factory_gaussian) else: fact = FactorySettingsFile(paramp=config.factory_paramp) cmd.add_action( RegularAction(
record=False), dorm_to=CT(), addressee=Addressee(access_class=0x01, id_type=IdType.NOID, id=None, nls_method=NlsMethod.NONE))) # create the command to write the action file and interface configuration file, # adapt the properties on the sensor file and forward using the downlink access profile cmd = Command() cmd.add_forward_action( InterfaceType.D7ASP, Configuration(qos=QoS(resp_mod=ResponseMode.RESP_MODE_ALL, retry_mod=RetryMode.RETRY_MODE_NO, stop_on_err=False, record=False), dorm_to=CT(), addressee=Addressee(access_class=0x11, id_type=IdType.NBID, id=CT.compress(3), nls_method=NlsMethod.NONE))) # the action cmd.add_action( RegularAction(operation=WriteFileData( operand=Data(offset=Offset(id=0x41, offset=Length(0)), data=list(query_sensor_file_cmd))))) # the interface config cmd.add_action( RegularAction(operation=WriteFileData(