Search in sources :

Example 1 with SYS_RESET

use of com.zsmartsystems.zigbee.dongle.cc2531.network.packet.system.SYS_RESET in project com.zsmartsystems.zigbee by zsmartsystems.

the class ZigBeeNetworkManager method dongleReset.

private boolean dongleReset() {
    final BlockingCommandReceiver waiter = new BlockingCommandReceiver(ZToolCMD.SYS_RESET_RESPONSE, commandInterface);
    try {
        commandInterface.sendAsynchronousCommand(new SYS_RESET(SYS_RESET.RESET_TYPE.SERIAL_BOOTLOADER));
    } catch (IOException e) {
        logger.error("Failed to send SYS_RESET", e);
        return false;
    }
    SYS_RESET_RESPONSE response = (SYS_RESET_RESPONSE) waiter.getCommand(RESET_TIMEOUT);
    return response != null;
}
Also used : SYS_RESET(com.zsmartsystems.zigbee.dongle.cc2531.network.packet.system.SYS_RESET) BlockingCommandReceiver(com.zsmartsystems.zigbee.dongle.cc2531.network.impl.BlockingCommandReceiver) SYS_RESET_RESPONSE(com.zsmartsystems.zigbee.dongle.cc2531.network.packet.system.SYS_RESET_RESPONSE) IOException(java.io.IOException)

Aggregations

BlockingCommandReceiver (com.zsmartsystems.zigbee.dongle.cc2531.network.impl.BlockingCommandReceiver)1 SYS_RESET (com.zsmartsystems.zigbee.dongle.cc2531.network.packet.system.SYS_RESET)1 SYS_RESET_RESPONSE (com.zsmartsystems.zigbee.dongle.cc2531.network.packet.system.SYS_RESET_RESPONSE)1 IOException (java.io.IOException)1