rifidi edge cs203 tag id and epc

Questions about developing the edge server core as well as applications

Moderators: Matt, kyle

Post Reply
mdrissi
Posts: 6
Joined: Sun Apr 24, 2016 11:18 am
Organization: icoz

rifidi edge cs203 tag id and epc

Post by mdrissi » Tue May 24, 2016 4:31 am

we have some problems getting the information we want when we read the tagEvent from a cs203 reader.

in fact , neither tag.getTag().getFormattedID() nor tag.getTag().getID() returns a blank string (and sometimes a whitespace)

what i'm sure is that we wrote something on the EPC of the tag, and when we try to print it using tag.getTag().getMemoryBank(1) it returns '1'

good to mention that the logs of the rifidi server shows the epc id , and yes is there a way to disable this log in the console ?

thanks in advice

bppause
Posts: 434
Joined: Sat Oct 03, 2009 12:30 am
Organization: Pramari

Re: rifidi edge cs203 tag id and epc

Post by bppause » Tue May 24, 2016 6:54 pm

What version of Rifidi ru using ? And was thus working before if so what version were u using when it worked?

mdrissi
Posts: 6
Joined: Sun Apr 24, 2016 11:18 am
Organization: icoz

Re: rifidi edge cs203 tag id and epc

Post by mdrissi » Wed May 25, 2016 5:24 am

hi, thanks for your replay.

actually it never worked ,

i'm using rifidi edge 3.5, i tried 3.4.

the thing is that the rifidi edge console logs are showing what the reader captures( showing tag epc)

but when it comes to code, the tagEvent has all other informations(antenna, readerid...) but no tagID ,

i also tried the memorybank(1) which is the epc i think.

bppause
Posts: 434
Joined: Sat Oct 03, 2009 12:30 am
Organization: Pramari

Re: rifidi edge cs203 tag id and epc

Post by bppause » Wed May 25, 2016 6:12 am

What is the tag epc output that you see on the console?

mdrissi
Posts: 6
Joined: Sun Apr 24, 2016 11:18 am
Organization: icoz

Re: rifidi edge cs203 tag id and epc

Post by mdrissi » Wed May 25, 2016 10:35 am

first this is the output of the console, when i add cs203 reader and set a tag near it
Image



and in my mqtt app , this is the message dto object and how i fill it

Code: Select all

logger.info("TAG ARRIVED: " + tag.getTag().getFormattedID() + " from Reader: " + tag.getReaderID());

TagMessageDto tagMessageDto = new TagMessageDto();
tagMessageDto.setTag(tag.getTag().getFormattedID());
tagMessageDto.setTimestamp(tag.getTimestamp());
tagMessageDto.setStationId(tag.getReaderID());
tagMessageDto.setAntennaId(tag.getAntennaID());
tagMessageDto.setAction("ARRIVED");
tagMessageDto.setId(tag.getTag().getID());
tagMessageDto.setMemoryBank1(tag.getTagDTO().getTagID());
and the mqtt message i got is :

Code: Select all

<tagMessage>
<action>DEPARTED</action>
<antennaId>0</antennaId>
<id>1</id>
<stationId>CS2031</stationId>
<tag>")�</tag>
<timestamp>1464185498286</timestamp>
</tagMessage>
Attachments
d6ed232b59956d0aaf24635c0911ee7e.png
d6ed232b59956d0aaf24635c0911ee7e.png (529.76 KiB) Viewed 9049 times

bppause
Posts: 434
Joined: Sat Oct 03, 2009 12:30 am
Organization: Pramari

Re: rifidi edge cs203 tag id and epc

Post by bppause » Wed May 25, 2016 4:45 pm

Could you provide us with access to a cs203 reader over the internet? - we have done this is past when troubleshooting readers we do not physically have access too as we dont not have a CSL reader- You can email me the external ip and port to brian@transcends.co

Also what shows when u run the currenttags command from the command line and current tags in dashboard?

Note: Ensure to leave some tags by the reader and validate they can be read

Here is the Rifidi csl adpater source code


https://transcends.svn.cloudforge.com/r ... apter/csl/

here is teh class where csl is outputing tag info to console

https://transcends.svn.cloudforge.com/r ... erver.java

I believe the class that is handling tag info is

https://transcends.svn.cloudforge.com/r ... ndler.java

specific code snippet that handles epc

public TagReadEvent parseTag(String message) {
try {
Map<String, String> extrainfo = new HashMap<String, String>();
Integer antenna = null;
Long timestamp = null;
EPCGeneration2Event gen2event = new EPCGeneration2Event();
String strmessage = new String(message);
for (String key_val_pair : strmessage.split(PAIR_DELIM)) {
String[] key_val = key_val_pair.split(KEY_VAL_DELIM);
String key = key_val[0];
String val = key_val[1];
if (key.equalsIgnoreCase(ID_KEY)) {
int numbits = val.length() * 4;
BigInteger t_membank = new BigInteger("1");
// BigInteger epc = null;
String epc = null;
try {
// epc = new BigInteger(Hex.decodeHex(val.toCharArray()));
epc = new String(Hex.decodeHex(val.toCharArray()));
} catch (DecoderException e) {
throw new RuntimeException("Cannot decode tag: " + val);
}

gen2event.setEPCMemory(t_membank, epc, numbits);
// gen2event.setEPCMemory(t_membank, numbits);


we are looking into this as well as CSL vendor resources actually wrote this adapter for Rifidi\

thoughts?

bppause
Posts: 434
Joined: Sat Oct 03, 2009 12:30 am
Organization: Pramari

Re: rifidi edge cs203 tag id and epc

Post by bppause » Thu May 26, 2016 7:21 am

Here is link to Rifidi SVN source code

https://transcends.svn.cloudforge.com/r ... idi/trunk/

here is direct link to csl adapter source in the same SVN repository above

https://transcends.svn.cloudforge.com/r ... apter.csl/

From here you should be able to troubleshoot issue, recompile, test and if work provide us teh updated source code changes

We think the issue may be in teh way tag/epc id is handled/convereted in teh tag handler class mentioned in the previous thread.

Also, what output do you get when you run currenttags from commandline and in dashboard? - http://wiki.rifidi.net/index.php?title= ... _Tags_View

bppause
Posts: 434
Joined: Sat Oct 03, 2009 12:30 am
Organization: Pramari

Re: rifidi edge cs203 tag id and epc

Post by bppause » Mon May 30, 2016 1:40 pm

Mohamed

Do you have any updates on this based on our input to date?

Thx

BPP

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests