Page 1 of 1

newLISP-client for WinLIRC

Posted: Wed Apr 13, 2005 9:12 pm
by HPW
I am experimenting with WinLIRC.
It offers a TCP/IP server and I thought it might be possíble to write a client in lisp using newLISP net-support commands.

http://winlirc.sourceforge.net/developer.html

I have bought a IR-cable for the COM1 port and have a delphi-demo running with WinLIRC. So I know the server is running and sending signals. But I do not know how to do it in newLISP. :-(

Posted: Wed Apr 13, 2005 9:30 pm
by newdep
Hi Hans-Peter,

What exactly is the problem? Are you unable to communicate over IR ?
Or is it the TCP/IP communication?

Regards, Norman.

Posted: Wed Apr 13, 2005 9:36 pm
by HPW
Hello Norman,

The TCP/IP communication!
I think I have to use the net-commands to poll the data from the server.
But I have no experience with that.

Posted: Wed Apr 13, 2005 9:51 pm
by newdep
Im not quiet sure yet how that IRserver works, if you need to send dat a first befor receiving anything or just can wait.. Anyway you could start with a simple test.


Start the following in the newlisp console ->
This will connect to the IR server and wait for data from the server

(setq sid (net-connect "IP address of the IRserver" 8765))
(net-receive sid 'buffer 512 "\n")

Now start that Delphi example you have an send something to the server.
Newlisp should display something with (print buffer)

Let me know what it brings

Norman.

Posted: Thu Apr 14, 2005 11:15 am
by HPW
Just tried:

Code: Select all

> (setq sid (net-connect "localhost" 8765)) 

1776
> (net-receive sid 'buffer 512 "\n")
but get only a hang. Will further investigate.

Posted: Thu Apr 14, 2005 11:36 am
by newdep
Oke..i assume the "hang" is an infinite wait? Is so then another client
could send data to the serve "your client Delphi version" and then the newlisp
should see something...

After a 'net-connect you could also try to send something first to the server
to trigger some reply. Im not sure exactly how the IRserver works..

Regards, Norman.

Posted: Thu Apr 14, 2005 8:15 pm
by HPW
I have got a neobook-plugin running:

http://www.neosoftware.com/forum/viewtopic.php?t=12922

So for now I can use it from newLISP.dll from there.