newLISP-client for WinLIRC

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

newLISP-client for WinLIRC

Post 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. :-(
Hans-Peter

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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.
-- (define? (Cornflakes))

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post 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.
Hans-Peter

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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.
-- (define? (Cornflakes))

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post 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.
Hans-Peter

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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.
-- (define? (Cornflakes))

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post 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.
Hans-Peter

Locked