Forum.Deepsoftware.Com

DeepSoftware Products => nrComm Lib VCL (32bit / 64bit) => nrComm Lib => HID (Human Interface Device) => Topic started by: lopezan on December 10, 2013, 04:30:14 PM

Title: Send and receive
Post by: lopezan on December 10, 2013, 04:30:14 PM
Hello,

I'm new with nrcomm and I'm trying it before to purchase.
I need to send data to a HID device and wait that the device send some confirmation data.
How can I implement this procedure?

Regards.
Title: Re: Send and receive
Post by: Roman Novgorodov on December 11, 2013, 09:54:25 AM
Hello

If your device supports any data transfer protocol you need implement them.
nrComm Lb includes solution for Modbus, ASTM protocols.
Also you can implement any original protocol with TnrDataProcessor component (see Demos\DataProc\dataproc.dpr sample)

Roman Novgorodov
DeepSoftware llc
Title: Re: Send and receive
Post by: lopezan on December 11, 2013, 11:33:42 AM
Hello,

but can I use the SendString method to send data and the OnAfterReceive event to read data sent by the device?

Regards.
Angelo
Title: Re: Send and receive
Post by: Roman Novgorodov on December 11, 2013, 11:37:49 AM
Hello

Yes of course.
You can take a look at HIDDemo sources. It does same.

Roman Novgorodov
DeepSoftware llc
Title: Re: Send and receive
Post by: lopezan on December 16, 2013, 03:47:26 PM
Hello,
please, could you help me? Demo isn't more clear for me. I'm beginner with communications control.
I have to send an ASCII fixed length string.
I haven't understood the OutputReportLength method.
How can I do?

Thanks and regards.
Title: Re: Send and receive
Post by: Roman Novgorodov on December 17, 2013, 07:03:32 AM
Hello

Usual HID device expects the exact length of data.
The exact fixed length is available in OutputReportLength property.
If your data length lower than OutputReportLength you need add necessary length.
First char is report ID.

Roman Novgorodov
DeepSoftware llc
Title: Re: Send and receive
Post by: lopezan on January 15, 2014, 12:24:36 PM
Hello,
if I send more data to the HID device, the report ID have to change anytime I send data?
Title: Re: Send and receive
Post by: lopezan on January 15, 2014, 03:21:17 PM
I'm trying your product to see if it's useful for my project.
I have to do this steps:

- I read data from a table of a sqlite db.
- I send data to HID device
- When I send data, I wait to receive a response from HID device with a checksum
- I loop the send and receive until EOF table.

How can I do this?