newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: HPW on April 13, 2005, 02:12:49 PM

Title: newLISP-client for WinLIRC
Post by: HPW on April 13, 2005, 02:12:49 PM
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. :-(
Title:
Post by: newdep on April 13, 2005, 02:30:12 PM
Hi Hans-Peter,



What exactly is the problem? Are you unable to communicate over IR ?

Or is it the TCP/IP communication?



Regards, Norman.
Title:
Post by: HPW on April 13, 2005, 02:36:46 PM
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.
Title:
Post by: newdep on April 13, 2005, 02:51:09 PM
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.
Title:
Post by: HPW on April 14, 2005, 04:15:41 AM
Just tried:

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

1776
> (net-receive sid 'buffer 512 "n")


but get only a hang. Will further investigate.
Title:
Post by: newdep on April 14, 2005, 04:36:46 AM
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.
Title:
Post by: HPW on April 14, 2005, 01:15:30 PM
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.