|
From: Jonas H. <jh...@us...> - 2007-08-23 15:34:43
|
Hi Paolo
You are right. When getting the address of the NotificationChannel, I get port
number 0 back too. This is not a problem of configuring the reader but of the
answer from the reader. The port should be configured all right. I will try to
fix this bug.
I created a NotificationChannel that connects on port 9999 (standard for
EventSinkUI). Getting the address from the reader returns 0 too. But when I
close the SimulatorReader, I get an 'ERROR: connection reset!' on the EventSink,
so a connection was made when creating the NotificationChannel.
With the following procedure you should get notifications on the EventSink:
- Start the SimulatorReader, the EventSinkUI (standard port 9999) and the
ReaderClient.
- Create a new Tag on the ReaderSimulator interface.
- Connect the ReaderClient to the Reader.
- Use these six commands to configure the Reader:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>2</id>
<targetName></targetName>
<trigger>
<create>
<name>rt</name>
<triggerType>TIMER</triggerType>
<triggerValue>ms=1000</triggerValue>
</create>
</trigger>
</ns2:command>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>4</id>
<targetName>nt</targetName>
<trigger>
<create>
<name>nt</name>
<triggerType>TIMER</triggerType>
<triggerValue>ms=1000</triggerValue>
</create>
</trigger>
</ns2:command>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>6</id>
<targetName></targetName>
<notificationChannel>
<create>
<name>nc</name>
<address>tcp://localhost:9999?mode=connect</address>
</create>
</notificationChannel>
</ns2:command>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>8</id>
<targetName>nc</targetName>
<notificationChannel>
<addNotificationTriggers>
<triggers>
<list>
<value>nt</value>
</list>
</triggers>
</addNotificationTriggers>
</notificationChannel>
</ns2:command>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>10</id>
<targetName>nc</targetName>
<notificationChannel>
<addSources>
<sources>
<list>
<value>Shelf1</value>
</list>
</sources>
</addSources>
</notificationChannel>
</ns2:command>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
<id>12</id>
<targetName>Shelf1</targetName>
<source>
<addReadTriggers>
<triggers>
<list>
<value>rt</value>
</list>
</triggers>
</addReadTriggers>
</source>
</ns2:command>
- Drag the Tag over Shelf1 in the SimulatorReader interface.
This procedure should work (it works for me). Try it out exactly like this as a
starting point. If it works, you can change things as you like. If it does not
work, send me as much debug information as you can, this helps me finding the
problem.
Kind regards,
--
Jonas Haller <jh...@us...>
Paolo Raimondi schrieb:
> Hi, I think I have the same problem becuase the EventSink doesn't
> show anything.... but I have a doubt: after creating the notificationChannel, if
> I use the command NotificationChannel.getAddress the response is :
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <ns2:reply xmlns:ns2="urn:epcglobal:rp:xsd:1">
> <id>14</id>
> <resultCode>0</resultCode>
> <notificationChannel>
> <getAddress>
> <returnValue>tcp://localhost:0</returnValue>
> </getAddress>
> </notificationChannel>
> </ns2:reply>
>
> in particular I think that the client sets the tcp port to value zero and not to
> value 9001....
>
> I have do :
>
> NotificationChannel.create: with parameters
>
> channel1 [string]
>
> tcp://localhost:9001?mode=connect [string]
>
> Have I mistaken something?
>
> Best Reagards
>
> Paolo
>
>
>
>
>
> --------------------------------------------------------------------------------
> From: /"Jonas Haller" <jh...@us...>/
> Reply-To: /jh...@us.../
> To: /acc...@li.../
> Subject: /Re: [accada-reader-user] Accada Reader/
> Date: /Thu, 23 Aug 2007 09:01:04 +0200 (CEST)/
> >Dear Shanthi
> >
> >
> >I was able to reproduce the error you reported by following your detailed
> >description of what you have done. After comparison to commands I use and
> >some trial and error, I found the mistake you made that lead to the error.
> >
> >When creating the two timer triggers, you used '100' and '500'
> >respectively. This format does not comply the reader protocol
> >specification but is not reported as error immediately. The error occures
> >when trying to add these triggers which is kind of bad design.
> >
> >If you have the EPCglobal reader protocol standard specification, you can
> >refer to chapter '6.5 Object Trigger'. In 'Table 7: Possible Trigger
> >values' it sais:
> >- triggervalue: ms=<n>
> >- TriggerType: timer
> >- Description: Periodic interval trigger; <n> is the number of
> >milliseconds for the interval.
> >
> >With exactly the commands you used excepting 'ms=100' and 'ms=500' instead
> >of only '100' and '500' for the trigger value it works for me and should
> >work for you.
> >
> >
> >Kind regards,
> >Jonas
> >
> >
> >
> >On Mon, August 20, 2007 20:55, Shanthi Boppana wrote:
> > > Dear Jonas,
> > >
> > >
> > > I mentioned the order wrong in the email. I took your advise and did not
> > > configure DataSelector but i am still not able to capture events in
> > > EventSinkUI
> > >
> > >
> > > I alway get an error on first attempt during
> > >
> > >
> > > - setting notification trigger
> > > - and adding read trigger to the source
> > >
> > >
> > > But when I use the same xml and try it for second time it goes through
> > > fine.
> > >
> > > I am attaching exact steps I followed along with reader console log
> > > generated after each command.
> > >
> > > Regards
> > > Shanthi
> > >
> > >
> > > On 8/17/07, Jonas Haller <jh...@us...> wrote:
> > >
> > >
> > >> Dear Boppana,
> > >>
> > >>
> > >>
> > >> A first problem i noticed is the order you discribed in your mail:
> > >>
> > >>
> > >>> I have used reader client and configured it to capture events
> > >>> Started Event Sink
> > >>> Added a new tag to Shelf 1
> > >>> But this event is not shown in Event Sink
> > >>>
> > >>
> > >> The reader establishes a connection to the sink when the command to
> > >> create a notification channel is sent. If you configured the reader and
> > >> started the event sink afterwards, no connection is established for the
> > >> notification channel. When you close the reader and a connection was
> > >> established, a message should appear in the EventSinkUI that sais
> > >> 'ERROR:
> > >> connection reset'. If this message does not appear, there was no
> > >> connection and thus no notifications were able to reach the
> > >> EventSinkUI.
> > >>
> > >>
> > >> A potential second problem i noticed in your mail is the usage of non
> > >> default DataSelector. The DataSelector was buggy and is still buggy in
> > >> the latest release. I fixed it in the current developer version last
> > >> week. For further testing of accada, please leave away the DataSelector
> > >> configuration (steps 4 to 7 in your list of configuration commands
> > >> below) until next release of a new accada version.
> > >>
> > >>
> > >> Kind regards,
> > >> Jonas
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> On 8/16/07, Matthias Lampe <la...@in...> wrote:
> > >>
> > >>>
> > >>>
> > >>> Dear Boppana,
> > >>>
> > >>>
> > >>>
> > >>> Thanks for your using Accada! I am currently travelling but will take
> > >>> a look at the issue you describe beginning next week. We also fixed
> > >> several
> > >>> bugs in the reader module and planing a release for end of next week
> > >> which
> > >>> might also deal with your issues.
> > >>>
> > >>> Best
> > >>> Matthias
> > >>>
> > >>>
> > >>>
> > >>> ________________________________
> > >>>
> > >>>
> > >>>
> > >>> From: acc...@li...
> > >>> [mailto:acc...@li...] On Behalf Of
> > >>> Shanthi Boppana
> > >>> Sent: Dienstag, 14. August 2007 23:02
> > >>> To: acc...@li...
> > >>> Subject: [accada-reader-user] Accada Reader
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> Hi,
> > >>>
> > >>>
> > >>>
> > >>> I have downloded accada reader and reader client.
> > >>>
> > >>>
> > >>>
> > >>> I am trying to capture reader events using
> > >>> org.accada.reader.rp.client.EventSinkUI 9001
> > >>>
> > >>> On the reader command line console I do see the debug statement when
> > >>> a tag is read by the reader but I am not able to see the events using
> > >>> EventSinkUI.
> > >>>
> > >>>
> > >>>
> > >>> I have used reader client and configured it to capture events
> > >>> Started Event Sink
> > >>> Added a new tag to Shelf 1
> > >>> But this event is not shown in Event Sink
> > >>>
> > >>>
> > >>>
> > >>> Here is my reader configuration:
> > >>>
> > >>>
> > >>>
> > >>> 1) Create Notification Channel
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>44</id>
> > >>> <targetName></targetName>
> > >>> <notificationChannel>
> > >>> <create>
> > >>> <name>test</name>
> > >>> <address>tcp://localhost:9001?mode=connect</address>
> > >>> </create>
> > >>> </notificationChannel>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 2) Creating Read Trigger
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>28</id>
> > >>> <targetName></targetName>
> > >>> <trigger>
> > >>> <create>
> > >>> <name>ReadTrigger2</name>
> > >>> <triggerType>TIMER</triggerType>
> > >>> <triggerValue>100</triggerValue>
> > >>> </create>
> > >>> </trigger>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>> 3) Creating NotificationTrigger
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>30</id>
> > >>> <targetName></targetName>
> > >>> <trigger>
> > >>> <create>
> > >>> <name>NotificationTrigger</name>
> > >>> <triggerType>TIMER</triggerType>
> > >>> <triggerValue>500</triggerValue>
> > >>> </create>
> > >>> </trigger>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 4) Create DataSelector
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>46</id>
> > >>> <targetName></targetName>
> > >>> <dataSelector>
> > >>> <create>
> > >>> <name>DataSelector</name>
> > >>> </create>
> > >>> </dataSelector>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 5) Adding Event Filters to Data Selectors
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>52</id>
> > >>> <targetName>DataSelector</targetName>
> > >>> <dataSelector>
> > >>> <addEventFilters>
> > >>> <eventType>
> > >>> <list>
> > >>> <value>EV_OBSERVED</value>
> > >>> <value>EV_LOST</value>
> > >>> </list>
> > >>> </eventType>
> > >>> </addEventFilters>
> > >>> </dataSelector>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 6) Adding Field Names
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>54</id>
> > >>> <targetName>DataSelector</targetName>
> > >>> <dataSelector>
> > >>> <addFieldNames>
> > >>> <fieldNames>
> > >>> <list>
> > >>> <value>EVENT_TYPE</value>
> > >>> <value>READER_NAME</value>
> > >>> <value>TAG_ID</value>
> > >>> <value>TAG_ID_AS_PURE_URI</value>
> > >>> <value>TAG_ID_AS_TAG_URI</value>
> > >>> <value>SOURCE_NAME</value>
> > >>> </list>
> > >>> </fieldNames>
> > >>> </addFieldNames>
> > >>> </dataSelector>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 7) Setting DataSelector
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>58</id>
> > >>> <targetName>test</targetName>
> > >>> <notificationChannel>
> > >>> <setDataSelector>
> > >>> <dataSelector>DataSelector</dataSelector>
> > >>> </setDataSelector>
> > >>> </notificationChannel>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>> 8) Setting NotificationTrigger
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>64</id>
> > >>> <targetName>test</targetName>
> > >>> <notificationChannel>
> > >>> <addNotificationTriggers>
> > >>> <triggers>
> > >>> <list>
> > >>> <value>NotificationTrigger</value>
> > >>> </list>
> > >>> </triggers>
> > >>> </addNotificationTriggers>
> > >>> </notificationChannel>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 9) Add Current Source to Notification Channel
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>70</id>
> > >>> <targetName>test</targetName>
> > >>> <notificationChannel>
> > >>> <addSources>
> > >>> <sources>
> > >>> <list>
> > >>> <value>Shelf1</value>
> > >>> </list>
> > >>> </sources>
> > >>> </addSources>
> > >>> </notificationChannel>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> 9) Add Read Trigger to Source
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > >>> <ns2:command xmlns:ns2="urn:epcglobal:rp:xsd:1">
> > >>> <id>82</id>
> > >>> <targetName>Shelf1</targetName>
> > >>> <source>
> > >>> <addReadTriggers>
> > >>> <triggers>
> > >>> <list>
> > >>> <value>ReadTrigger2</value>
> > >>> </list>
> > >>> </triggers>
> > >>> </addReadTriggers>
> > >>> </source>
> > >>> </ns2:command>
> > >>>
> > >>>
> > >>>
> > >>> Any help is greatly appreciated
> > >>>
> > >>>
> > >>>
> > >>> -Boppana
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Jonas Haller <jh...@us...>
> > >>
> > >>
> > >>
> > >> -----------------------------------------------------------------------
> > >> --
> > >> This SF.net email is sponsored by: Splunk Inc.
> > >> Still grepping through log files to find problems? Stop.
> > >> Now Search log events and configuration files using AJAX and a browser.
> > >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> > >> _______________________________________________
> > >> accada-reader-user mailing list acc...@li...
> > >> https://lists.sourceforge.net/lists/listinfo/accada-reader-user
> > >>
> > >>
> > >
> >
> >
> >--
> >Jonas Haller <jh...@us...>
> >
> >
> >-------------------------------------------------------------------------
> >This SF.net email is sponsored by: Splunk Inc.
> >Still grepping through log files to find problems? Stop.
> >Now Search log events and configuration files using AJAX and a browser.
> >Download your FREE copy of Splunk now >> http://get.splunk.com/
> >_______________________________________________
> >accada-reader-user mailing list
> >acc...@li...
> >https://lists.sourceforge.net/lists/listinfo/accada-reader-user
>
>
> --------------------------------------------------------------------------------
> Sai cosa è successo oggi? <http://g.msn.com/8HMBITIT/2743??PS=47575>
|