The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Nuts and Bolts of a hub-app protocol




------=_NextPart_000_0006_01C4AEAB.24E4EDC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

MessageI've tried two hubs.  In the case of the xap-hub.exe from your site
=
it starts with what looks to be using eth0: address 0.0.0.0 on port 3639. 
=
I never see any message traffic when this hub is running.  I also cannot
st=
art another hub since 3639 has been claimed.  I also tried to look on your
=
site for any configuration information, but the site appears to be down.

I am able to get the hub functionality with Stuart's V1.2.1.5 GUI Hub.  In
=
my test application I have two sockets open for listening.  One at
127.0.0.=
1 and the other at 192.168.0.200.  This test app produces heartbeats and a
=
normal message.  I see all my traffic on 192.168.0.200.  I do see the
traff=
ic from other apps on 192.168.0.200 routed through the hub onto
192.168.0.2=
00:36768 back to my test app.  It does appear  that 127.0.0.1 is not being
=
used.
----- Original Message -----=20
From: Patrick Lidstone (Personal e-mail)=20
To: xAP_developer@xxxxxxx=20
Sent: Sunday, October 10, 2004 5:56 AM
Subject: RE: [xAP_developer] Nuts and Bolts of a hub-app protocol


Michael,
Who's hub are you using, and which version? There are some subtle differe=
nces between the flavours...
What you have described is basically correct: at startup, a connecting ap=
p should send a heartbeat to the hub on port 3639, indicating which port
it=
is using for incoming messages. The port the application chooses should be=
an unused (udp) port in the ephemeral port range (although some early xap =
apps just allocated sequentially from 3639 onwards). Once the heartbeat
has=
been received, the hub should broadcast on
127.0.0.1:<allocated_port>. Ear=
ly versions of some hubs incorrectly used the real ip address instead,
alth=
ough the principle was the same. Rebroadcast on the allocated port by the
h=
ub will continue until at least twice the hearbeat timeout interval,
specif=
ied in the original heartbeat message from the app to the hub, has expired.
HTH
Patrick


xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.