Page 2 of 2

Re: TCP Client Software Device Plugin

Posted: Mon Jan 31, 2011 4:34 pm
by chrisrey
Everything is ok now, It was just a problem of syntax from my side, sorry... The plugin is very useful for me, thank you!

chris

Re: TCP Client Software Device Plugin

Posted: Wed Mar 02, 2011 9:53 pm
by edgar
Hi Osler,

Trying to get plug to work. I get an error " TCP Socket error: An address incompatible with the requested protocol was used.

I am trying to connect to the Eventghost Network Receiver and also my Python TCP server script (which i know for sure works).

Any help you can provide would be awesome...thanks much!

v/r

Kevin

Re: TCP Client Software Device Plugin

Posted: Thu Mar 03, 2011 11:56 pm
by Osler
XP, Vista, Win7 ?

Osler

Re: TCP Client Software Device Plugin

Posted: Fri Mar 04, 2011 12:17 am
by edgar
Windows 7 64 bit.....that is my 'development' laptop...my production is good ol XP....should i try that?

Kevin

Re: TCP Client Software Device Plugin

Posted: Fri Mar 04, 2011 12:24 am
by Osler
If you can. I think it may be an issue with IPv4 vs. IPv6. I think there is a work around to play nice with both address formats, but I am not sure yet.

Osler

Re: TCP Client Software Device Plugin

Posted: Sat Jan 28, 2012 8:27 am
by edgar
Thanks Osler,

I know it has been a long time on this topic. I gave up on trying to get the plugin working and then picked it up again. I finally got it working and you were correct with the IPV6 issue. The solution that is working for me is to add the IP address to the hosts file and then enter the name of the machine you put in the hosts file into the IP address for the server.

So now I can connect and all is working well. The problem I am having is that I need to send an additional Carriage return for the application I am using.

You helped me with this before with a Python client script. To send a carriage return with that I used the following python code:

cli.send('data\n')

the \n worked great. Using the \n in the plugin does not work. Is there a method to send a Carriage return in your plugin. I noticed you published the code..but that is a bit beyond my skills. Is there something I can do to the code maybe. I did notice for VB that I want to send a vbCrLF. I have tried all sorts of symbols and things to try to get it to work...but it seems to send exactly the data that goes into the TCSendData field.

Thanks in advance for anything you could help me with!

v/r

Kevin

Re: TCP Client Software Device Plugin

Posted: Wed Feb 01, 2012 4:16 pm
by lostdreamer
I think you might be looking for \r\n

\n is a newline
\r\n is a return + newline

LostDreamer

Re: TCP Client Software Device Plugin

Posted: Wed Feb 01, 2012 10:28 pm
by edgar
Thanks for the reply LostDreamer,

No luck with that. Osler's code has the data being sent as a byte array which is what I think the problem is. So even if you put a \r\n the data is being interpreted as UTF-7 characters vice being interpreted as as a Carriage return.

I tried recompiling the code (so I could tinker with it that way) but not having much luck with that either. (TCPClient does not appear in HB as a selectable plugin when I use my new dlls).

I have tried all sorts of special characters too..but they all get send as the characters. (except % which crashes HB).

I am pretty sure that is what is happening as I have a python client script that works just fine. I even tried a {13}, VbCrLF and various + symbols. I guess I am stuck for now.


Kevin

Re: TCP Client Software Device Plugin

Posted: Sat Jun 30, 2012 1:05 am
by art
I installed the plug-in as directed in the PDF and I am getting this error when starting HB:

"6/29/2012","6:01:55 pm","Device Module","Debug","Unable to find device initialization function (HBDeviceModuleInit) for Device DLL Module [C:\Program Files\HouseBot\Plugins\Devices\TCPClient.dll]."

TCPClient.dll is in the correct folder. Any ideas on what is going on?