Information comand K8090

we send and receive information through the k8090 hyper terminal or directly from the command line. is it possible? if so what commands should I send? you can make an example with a list of commands.
Thank you. excuse my English.

As far as I know Hyperterminal is for text-based communication. The K8090 communicates uses bytes that cannot be represented by readable/typeable characters. You will see data appear in Hyperterminal, but you won’t be able to interpret it or send anything back that makes sense.

Our installation package for the K8090 contains a complete description of the protocol. It also contains a demo application, source code, a dll for easy communication, and a library for .NET.

velleman.eu/downloads/files/ … 100219.zip

You may also want to try this (which is also included in the install package):
viewtopic.php?f=3&t=4153&p=16648&hilit=K8090C#p16648

Thanks very kind! I got to experience everything that the Software is supplied with the K8090.
I also tested the K8090.exe, works perfectly, the problem is that activates the relay but no return value.
In summary, the K8090 I interfaced with software that already possess without major changes.
Originally my software communicates with a modem via AT commands and responses logically recognizes the modem,
Example, the software sends the command ATH (Answer OK if the command is executed, ERROR if not executed)
What I do consider that the software is very complicated, not only performs this operation and rewrite it completely takes away verry long time.
Was to replace only the commands to send to com port, and therefore logically adapt responses received from it.
you can get back a response from K8090.exe

If you can not do this job with your K8090, there’s another product that could meet my needs?
Alex

Alessio

What response (or ‘return value’) would you expect?

K8090C.exe -p PORT -c CHANNEL -f FUNCTION

p - port name - COM1, COM2, …, COM20, …
c - channel number - 1, 2, 3, 4, 5, 6, 7, 8
f - funcion - ON, OFF, TOGGLE

Example:

K8090C.exe
p - port name - COM1
c - channel number - 1
f - funcion - ON
Reply - K8090-channel 1 ok/error[/color]

connecting to port com1
sending command…
REPLY channel 1 ok
disconnetting…

would be useful to a command to turn off all relays.
In short, a command for each function of the k8090 with appropriate response (ok/error)

Command Value
Switch relay ON
Switch relay OFF
Toggle relay
Query relay status
Set button mode
Query button mode
Start relay timer
Set relay timer delay
Query timer delay
Button status
Relay status
Reset factory defaults
Jumper status
Firmware version

Above this is a possible solution, the better solution for me at this moment would send commands directly to the com port and receive a response from the device.
how to make a GSM modem sending a command as AT + VTS = 5 the answer modem ok/error

Note that the K8090C will return 1 on error, 0 on success

Sorry! where am I going to read this value? send me an example.

excuse me, the example does not serve, I retested k8090c.
other information, k8090c only recognizes these commands?
-p -c -f

there is a command to enable two channels simultaneously or one to know which channels are active or want to know the firmware version etc.

thanks

Download the software for the K8090:
velleman.eu/downloads/files/ … 100219.zip

It includes a complete description of the protocol, a DLL that implements this protocol + documentation on how to use it, a demo application, and example source code in .NET, …

Thanks to his guidance we were able to figure out what to do.
We unfortunately still use the 2003 version of Microsoft Visual Studio using the. NET Framework 1.1 and fails to include the library Velleman.Kits.dll.
Is there a solution to this problem?

Thanks for your patience :unamused:

If it’s an option, you can download free versions of Visual Studio 2008 called Visual Studio Express
microsoft.com/express/

I already did! The problem is that Visual Studio 2008 SDK 5.1 no longer supports the fundamental part of my software. You can not convert my software developed with Visual Studio 2003 before being amended with Visual Studio 2008. VS2008 C + + no longer supports the function sphelper.h
The easiest thing at this time would be able to load your DLL in Visual Studio 2003.

thanks

This is the source code for our Kits.NET assembly:
downloads.velleman.be/cf6a97527e … ts.NET.zip

Maybe you can use that as a reference to get something working

Excuse them late answer. Given the situation I was forced to convert and edit the project with VS2003 to VS 2008. Now this is done … I have solved all problems!!! I tried to embed your K8090Board DLL following the instructions, unfortunately the manual is illustrated an example in Windows Forms, the problem I have now is that my software is an MFC. How do you embed your dll to a MFC project?

Thank you.

I’ve created a little archive for you:
velleman.eu/downloads/files/ … 90_CPP.zip

It contains everything you could need in C/C++:

  • lib file
  • header file
  • the dll itself

Should make it a lot easier for you :wink: You can’t use a .NET DLL in MFC so the Kits.NET assembly is not useable…

thanks! I do not know how to thank you for availability!
I refer back to work. :smiley:

Still confident in his patience! :blush: is a week we try to add to our project commands k8090 but with poor results.
With his example surely solve the problem. is for us the first time!
Our project is already working on MFC developed. we are probably incorporating the project files that we have prepared the wrong way! there too many mistakes.
How do we correct them if they have others. how to be included in our project files K80900D.lib K8090D.dll K8090h sure we’re including the files in the wrong way.

Thanks

Sorry i was on holiday

You’re going to have to be more specific about what you don’t understand, what it is that is not working or what errors you are getting…

The things you need to get working:

  1. Include the header file and get it to compile without errors
  2. Include the .lib file in your project
  3. Put the DLL in an accessible location (system32 folder might be the easiest)

Hi,

I’m trying to control my K8090 from Borland Turbo C++ 2006. I think I have now got this working but I will share what I’ve found in case it helps others.

I downloaded the MS C++ file pack from http://www.velleman.eu/downloads/files/downloads/K8090_CPP.zip and added the files to my Borland project.

I had to edit the following line in the header file to avoid a compiler error as PK8090_DEVICE does not appear to be defined anywhere:

  /// Device handle
  #define HK8090 HANDLE // PK8090_DEVICE

I also had to create a Borland C++ compatible .lib file using the Borland IMPLIB utility from the command prompt (Note: this creates a new K8090D.lib file):

  implib K8090D.lib K8090D.dll

My project was previously connecting to the K8055 USB interface board and I had to remove the related files from my project before my code would actually work (probably the culprit was the K8055D_C.DLL file). I suspect this is because both the K8055 and K8090 have OpenDevice() and CloseDevice() functions defined which work in different ways.

May I suggest that Velleman rectify this conflict for future code releases?

The following code now appears to work ok:

  HK8090  hRelay; // handle to K8090 relay board

  hRelay = OpenDevice("COM8");
  if (hRelay == NULL)
    ShowMessage("Unable to connect to K8099 Relay board.");
  else
  {
    ShowMessage("K8099 Relay board found.");
    SendCommand(hRelay, CMD_SWITCH_RELAY_ON, 0x03, 0x00, 0x00);
    CloseDevice(hRelay);
  }