- ret = iso15693_transceive(handle, RFID_15693_FRAME, (u_int8_t*)&tx_req,
- tx_len, (u_int8_t*)&rx_buf, &rx_len, 50,0);
- DEBUGP("ret: %d, error_flag: %d -> error: %02x\n", ret,
- rx_buf.head.flags&RFID_15693_RF_ERROR, rx_buf.error);
- return -1;
+
+ DEBUGP("ret: %d%s, error_flag: %d", ret,(ret==-ETIMEDOUT)?"(TIMEOUT)":"",
+ rx_buf.head.flags&RFID_15693_RF_ERROR);
+ if (rx_buf.head.flags&RFID_15693_RF_ERROR){
+ DEBUGPC(" -> error: %02x '%s'\n", rx_buf.error,
+ iso15693_get_response_error_name(rx_buf.error));
+ l2h->priv.iso15693.state = RFID_15693_STATE_SELECTED;
+ return 0;
+ }else{
+ DEBUGPC("\n");
+ return -1;
+ }