     Received data
   ###
   _receiveHandler: (ab) ->
-    return unless ab.byteLength > 0
-    do (ab) ->
-      pro = null
-      Object.defineProperty(ab, "ab2str", get: -> pro or= ab2str(ab))
-      App.log.verbose("WakayamaRbBoard#_recv(%o, %i bytes)", ab, ab.byteLength)
-    @_recvBuffer or= new FifoBuffer()
-    @_recvBuffer.push(ab)
+    if ab?.byteLength > 0
+      do (ab) ->
+        pro = null
+        Object.defineProperty(ab, "ab2str", get: -> pro or= ab2str(ab))
+        App.log.verbose("WakayamaRbBoard#_recv(%o, %i bytes)", ab, ab.byteLength)
+      @_recvBuffer or= new FifoBuffer()
+      @_recvBuffer.push(ab)
+    tlen = @_waiter?.length
+    if tlen?
+      return if tlen < @_recvBuffer.byteLength
+      data = @_recvBuffer.shift(tlen)
+      resolve = @_waiter.resolve
+      @_waiter = null
+      resolve?(data)
+      return
     token = @_waiter?.token
     return unless token?
     tlen = token.byteLength

        )
        return @_wrbb._send("\r")
      ).then(=>
        return @_wrbb._wait("\r\n").timeout(CMD_TIMEOUT_MS)
      ).then(=>
        return @_wrbb._wait("\r\n").timeout(READ1K_TIMEOUT_MS * ((length + 1024) / 1024))
      ).then((readdata) =>
        src = new Uint8Array(readdata)
        for i in [0...result.byteLength] by 1
          byte = (HEX2BIN[src[i*2+0]] << 4) + (HEX2BIN[src[i*2+1]])
          return Promise.reject("Receive data error at byte ##{i}") if isNaN(byte)
          result[i] = byte
        return result.buffer unless options.encoding?   # Last PromiseValue (ArrayBuffer)
        return ab2str(result.buffer, options.encoding)  # Last PromiseValue (string)
      ).finally(=>

        return str2ab(data, options.encoding)
      ).then((buffer) =>
        src = new Uint8Array(buffer)
        return @_wrbb._send("W #{@_dir}#{path} #{src.byteLength}\r") if @_binaryMode
        return @_wrbb._send("U #{@_dir}#{path} #{src.byteLength * 2}\r")
      ).then(=>
        return @_wrbb._wait("\r\nWaiting").timeout(CMD_TIMEOUT_MS)
      ).then(=>
        if @_binaryMode
          dump = data
        else
          dump = ""
          for i in [0...src.byteLength] by 1
            dump += BIN2HEX[src[i]]
        return @_wrbb._send(dump)
      ).then(=>
        return @_wrbb._wait("Saving").timeout(WRITE1K_TIMEOUT_MS * ((src.byteLength + 1024) / 1024))
      ).then(=>
        return @_wrbb._pull(
          @_wrbb._wait("\r\n>")
