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: Communicatiing with xplHal



Actually I sorted it last night - hooray :-)

I just had to bind the receiving socket to ADDR_ANY rather than the
local IP - I'm guessing this is something to do with the hub
broadcasting messages rather than sending them to my specific address?

Anyway, all the config communication is now working.  There was just one
received message that I wasn't expecting - my own config.app heartbeat!
I suppose since the target is * that makes sense...

I was thinking of storing the device config in the registry - is there
any good reason not to do this?  Is there a defined structure for
placing keys under HKEY_LOCAL_MACHINE/SOFTWARE/xPl?  By Vendor/Device
perhaps?

And finally - I mentioned needing a vendor ID, and suggested MAL -
anyone know if this is OK?

Mal



John B wrote:

>>Well I made those changes - it certainly makes the code a lot
simpler
>>just waiting on recv() instead of having to mess around listening
for
>>
>>
>
>
>
>>and accepting and managing the connections.
>>
>>
>
>Yep - one of the advantages of using UDP.
>
>
>
>>Unfortunately I still don't receive anything back from the hub. 
The
>>xplMonitor confirms that the hub has sent  it, and the port number
and
>>ip address are the same as the ones I gave it in the config.app.  I
must
>>be missing some setting or other in my receiving socket - but I
have no
>>idea what.  This could take a while... :-(
>>
>>
>
>Does the hub recognise your app when it starts up and sends it's first
config.app message?
>Not sure which hub you're using - if you're using the one built into
xPLHal, or the VB.NET hub, then look in your Application event log - it
will log a message each time it detects a new application.
>
>Also, if you want to post the portion of your code relating to
creating/binding your receiving socket, then we can take a look.
>Alternatively, if you want to mail me the entire code offlist I'd be
happy to take a look.
>
>Regards,
>
>John
>
>P.S. Posted this last night, but it hasn't shown up yet here, so am
re-posting it now.
>
>
>
>
>xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
>To Post a Message: ukha_xpl@xxxxxxx
>To Subscribe:  ukha_xpl-subscribe@xxxxxxx
>To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
>Yahoo! Groups Links
>
>
>
>
>
>.
>
>
>




xPL Main Index | xPL Thread Index | xPL 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.