Hi All
I’ve been experimenting with xapflash with windows iServer (iServer F that comes with xapflash). My setup was:
192.168.1.250 – web server storing xapflash swf, config.xml, xapconfig.xml (iserver ipaddr set to 192.168.1.100)
192.168.1.100 – pc running iServer F
192.168.1.50 – PLC with custom xap stack
Member for
14 years 8 monthsmore info
This is how xapBSC.info message is properly routed to the client
[dbg][rx.c:23:readXapData] Rx xAP packet
xap-header
{
v=13
hop=1
uid=FFDBDB02
class=xAPBSC.info
source=khome.PLC.41:study.light.1
}
input.state
{
state=OFF
}
[dbg][parse.c:33:xapGetValueF] section=xap-header key=target
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=khome.PLC.41:study.light.1
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=use.last.device addr=khome.PLC.41:study.light.1
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=khome.PLC.41:study.light.1
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.light.1 addr=khome.PLC.41:study.light.1
[dbg][filter.c:136:xapCompareFilters] match=1
[dbg][main.c:125:sendToClient] 192.168.1.100 msg <xap>xap-header
{
v=13
hop=1
uid=FFDBDB02
class=xapbsc.info
source=khome.plc.41:study.light.1
}
input.state
{
state=off
}
</xap>
Member for
14 years 8 monthsEven more info
And here is the unrouted request message from client
[dbg][rx.c:23:readXapData] Rx xAP packet
xap-header
{
v=13
hop=1
uid=FF.0738:0000
class=xAPBSC.query
source=UKUSA.xAPFlash.HAHflash
target=khome.PLC.41:study.scene.1
}
request
{
button=study.scene.1
}
[dbg][parse.c:33:xapGetValueF] section=xap-header key=target
[dbg][parse.c:42:xapGetValueF] found value=khome.PLC.41:study.scene.1
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.scene.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=use.last.device addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.light.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.scene.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
Member for
14 years 8 monthsAnd here is lost xapBSC.cmd
And here is lost xapBSC.cmd from client
[inf][tx.c:19:xapSend] send
xap-header
{
v=13
hop=1
uid=FF.0738:0000
class=xAPBSC.cmd
source=UKUSA.xAPFlash.HAHflash
target=khome.PLC.41:study.scene.1
}
output.state.1
{
ID=01
state=toggle
}
[dbg][rx.c:23:readXapData] Rx xAP packet
xap-header
{
v=13
hop=1
uid=FF.0738:0000
class=xAPBSC.cmd
source=UKUSA.xAPFlash.HAHflash
target=khome.PLC.41:study.scene.1
}
output.state.1
{
ID=01
state=toggle
}
[dbg][parse.c:33:xapGetValueF] section=xap-header key=target
[dbg][parse.c:42:xapGetValueF] found value=khome.PLC.41:study.scene.1
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.scene.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=use.last.device addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.light.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
[dbg][parse.c:33:xapGetValueF] section=xap-header key=source
[dbg][parse.c:42:xapGetValueF] found value=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:53:xapFilterAddrSubaddress] filterAddr=khome.PLC.41:study.scene.1 addr=UKUSA.xAPFlash.HAHflash
[dbg][filter.c:136:xapCompareFilters] match=0
Member for
16 years 10 monthsOne obvious thing stands out
One obvious thing stands out ID is uppercase. I wonder if there is a bug deep in the xaplib library that is not being case agnostic. Also you are using ID=01 instead of ID=* yes it should match but again there might an issue around that too.
If others are matching and this one isn't then I think we might have a smoking gun.
Also this is a v13 message I've not done a lot of testing with this.
Brett
Member for
16 years 10 monthsCan't see the issue
I had a close look at xaplib2 the filters are case agnostic so there isn't an issue there. Looking at iServer I did see a case issue however this is deleting a filter, so its not applicable in your case. But I will file an issue on that.
The iserver will only forward message that it has been told to filter according to what the .SWF application tells. You need to gather the debug that iServer display when a CLIENT (.SWF) application connects and sets up all the filter for what is allowed to by relayed by iServer.
The iServer has been working successfully for many other folk and you are the first to report an issue, I can only say at this point it looks more like a configuration problem, however I won't rule anything out until we can better understand what is going on. Often bugs lay dorment for a long time.
If you can reduce this to a simple case of ONE control item in the .SWF and send synthetic event via xFXViewer that isn't being routed, and the windows iServer does, that would give me a chance to reproduce then I could investigate a little deeper.
Brett
Member for
14 years 8 monthsresolved
Thansk for your reply. Looks like the problem is in UDP implemenation on the PLC - it does not accept broadcasts like 192.168.1.255, only direct addressing 192.168.1.50
So I wrote a simple plugboard script that does the job
Thanks again for the GREAT software!
Member for
16 years 10 monthsDirect addressing xAP
Really? Well this device is operating against the xAP standards that say it should use a BROADCAST not UNICAST. Thats pretty poor for the PLC to have such a non-standard implementation.
Well spotted - I did find a few things in the iServer that I will tidy up anyway with regards to case, but I suspect nobody is running into these. Glad its sorted. If you want to share your LUA solution for others post it to the sample scripts section.
Brett