def commission
      response = nil
      begin
        unlock_network
        Timeout.timeout(30) do
          @logger.info("Listening for devices ...")
          loop do
            buffer = @serial.receive(4)
            buffer += @serial.receive(buffer.bytes.to_a[3]+1)
            if buffer.bytes.to_a[1] == 0xa0
              response = BroadcastResponse.read(buffer)
              @logger.info("Found device 0x%x on network 0x%x" % [response.device_id, response.network_id])
              break
            end
          end
        end
      rescue Timeout::Error
      ensure
        lock_network
      end

      update_time(response.network_id) if response
    end
def commission
      response = nil
      begin
        unlock_network
        Timeout.timeout(30) do
          @logger.info("Listening for devices ...")
          loop do
            buffer = @serial.receive(4)
            buffer += @serial.receive(buffer.bytes.to_a[3]+1)
            if buffer.bytes.to_a[1] == 0xa0
              response = BroadcastResponse.read(buffer)
              @logger.info("Found device 0x%x on network 0x%x" % [response.device_id, response.network_id])
              break
            end
          end
        end
      rescue Timeout::Error
      ensure
        lock_network
      end

      update_time(response.network_id) if response
    end
serial - Serial connection to use with the dongle.
 logger - The Logger instance to log to.
 Public: Listens for new devices on the network.

 This must be executed within an open session.

 Returns nothing.