Justin-roy / Rfid_c72_plugin

Flutter Native SDK Plugin
Other
16 stars 9 forks source link

Reads EPC but not TID #3

Open fabiansvensson opened 1 year ago

fabiansvensson commented 1 year ago

The library works excellent but for some reason the id of the read tag is always an empty string for me. I used the example project for testing and in the updateTags method I check what is being read:

List<TagEpc> _data = [];
  final List<String> _EPC = [];
  void updateTags(dynamic result) async {
    logger.d('result: $result');
    var parsedTag = TagEpc.parseTags(result);
    for (final tag in parsedTag) {
      logger.d('tag.epc: ${tag.epc}');
      logger.d('tag.id: ${tag.id}');
    }
    setState(() {
      _data = parsedTag;
      _totalEPC = _data.toSet().toList().length;
    });
  }

Output looks something like this: result: [{"KEY_ID":"","KEY_EPC":"E2801190A5030060BF2B33F4","KEY_RSSI":"-39.90","KEY_COUNT":"1"}] tag.epc: E2801190A5030060BF2B33F4 tag.id:

I have checked using a different program written in native code for android studio, and the scanner reads both the EPC and the TID correctly, so the data is undoubtedly there.

Any ideas why I get an empty string for the tid and how to solve this?

Shkryabminer commented 1 year ago

Can this plugin nadle the barcode scan?