[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Re: Netiom-xAP
> I downloaded James's Floorplan and used it to control the netiom,
> which it did perfectly.
>
That's good to hear ;-)
> So after that I downloaded the xap GuiHub which reported that my
> messages were malformed. They had a trailing hex zero on the end.
>
> After fixing the message it now shows up in the hub window as ok but
> does not get a response from the netiom. If I hit the resend button in
> the hub then it works fine and gets an info message in response from
> the netiom!
>
> Does anyone have any ideas as I'm pulling my hair!
I have seen this kind of thing before. As I understand it xAPFramework
apps don't directly relay messages but pull them apart at receipt and
rebuild them for sending. This is why the order of elements can change.
This also has the side effect of stripping of some odd characters from
the ends of lines. I have made messages that wouldn't pass through a hub
but if you opened the up in viewer and hit resend it worked, that time I
had used a vbcrlf instead of a chr(10) at the end of a line.
A very simple vb code for sedning a message would look like this:
xapmessagebody = "xap-header" & Chr$(10) & "{"
& Chr$(10)
xapmessagebody = xapmessagebody & "v=12" & Chr$(10)
xapmessagebody = xapmessagebody & "hop=1" & Chr$(10)
xapmessagebody = xapmessagebody & "uid=FF" & xAPUID &
"00" & Chr$(10)
xapmessagebody = xapmessagebody & "class=xAP-OSD.Display"
& Chr$(10)
xapmessagebody = xapmessagebody & "source=mi4.weather." &
xx & Chr$(10)
xapmessagebody = xapmessagebody & "}" & Chr$(10)
xapmessagebody = xapmessagebody & "Display.Tivo" &
Chr$(10)
xapmessagebody = xapmessagebody & "{" & Chr$(10)
xapmessagebody = xapmessagebody & "Text=Outside temperature is
" &
tmp & " Wind is " & wnd & " " & winddir
& Chr$(10)
xapmessagebody = xapmessagebody & "Duration=30" & Chr(10)
xapmessagebody = xapmessagebody & "}" & Chr$(10)
xapudp.SendData xapmessagebody
where xapudp. is the winsock control. It would be worth double checking :
That every line ends in a chr$(10)
That if the Source= line contains a : that the uid doesn't end in a 00
That if the Source= line doesn't contains a : that the uid does end in a
00
hth
James
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|