• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Possible bug? Serial number not returned

Started by chedges, February 02, 2009, 11:45:51 am

Previous topic - Next topic

chedges

Hi Roman,

I'm trying to get the serial number but it seems to be always blank. I have confirmed that the serial number of the device
is available and correct.

nrHID1.HidDevice.SerialNumber always returns blank, below is a snippet of the device report

"Boca Systems Inc." "FGL46 Thermal Printer" VID=$0A43 PID=$0201
SerialNumber=0000176935
Input Report Size=255
Output Report Size=255
Feature Report Size=8


it's not a high priority, just something I spotted

Roman Novgorodov

Hello

The HID API allows to request serial number. But this value is empty often.
Possible something wrong with HID driver or with hardware implementation of HID interface on your device.

We will check again our source code, but it is simple single call. And it can't have any bugs.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

Hi Roman,

Just to follow up if I use HidD_GetSerialNumberString(nrHID1.Handle);
this returns the Serial number correctly while nrHID1.SerialNumber returns blank.

Not sure if this is intetional or not but I have a workaround regardless

thanks

Chris

Roman Novgorodov

Hello

Yes you are right.
We will correct this problem in the new version.

Thank you.

Roman Novgrodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1

August 21, 2009, 12:35:01 pm #4 Last Edit: August 22, 2009, 07:44:52 pm by hid1
Dear Roman,

it, solved with current version or  planned for next version? I think this problem same as "manufacturer name not returned" matter.
http://forums.nrcommlib.com/index.php?topic=134.msg411#new
Some delays, before, or after not solve it.

Bad guys(and companies) can make fake devices with our VendorID and ProductID, and of course they will not write  our company name in their devices.  We have to see our company name in our device strings before opening  device via our application. ;)

With HIDKomponente, manufacturer Name and Serial number returned . I hope this feature works correctly  with nrHID component also.

 if (DevListBox.Items.Count > 0) and (DevListBox.ItemIndex >= 0) then
  begin
   Dev := TJvHidDevice(DevListBox.Items.Objects[DevListBox.ItemIndex]);
   memo1.Lines.Add(Dev.VendorName)
  end;







Roman Novgorodov

Hello

The latest version of nrComm Lib contains the following calls:

HidD_GetManufacturerString();
HidD_GetSerialNumberString();

Do they work properly with your device?
DO you use the latest version of our product?

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1

nrcom lib v.8.26 used.



HidDevice.Manufacturer returned but HidD_GetManufacturerString not returned.

Roman Novgorodov

Hello

This value is available in following property:
nrhid1.HidDevice.Manufacturer

If you need the direct call of HidD_GetManufacturerString(), you should open device and use valid Handle:

nrhid1.Active := True;
s := HidD_GetManufacturerString(nrhid1.Handle);


Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

KarpovSergei

Yes it is possible, they are not hard-wired. They are controlled through some registers. In this registers you can choose between some different modes. As default setting at startup the registers contain the code for link/activity - mode. Here are the leds  controlled through hardware. But they are not hard-wired. You can write a one ore zero to the portpin as in any other microccontroller. and you can also use this pins as inputs. I can output something on the portpins already. I havent tried input yet.

KarpovSergei

in the Manual for the ADM5120 I have read that the GPIOs who drive the LEDs for 10/100 & Activity/Link are software-controlled and NOT hard-wired.

I want to use this GPIOs to drive something else e.g. an LCD or a keypad.

Is this possible? Has anyone done this before ore something similar?

Any comments are appreciated

best regards

Thomas

Roman Novgorodov

Hello

Unfortunately, we didn't hear before about such devices.

If this hardware is visible as HID device in Windows (has HID drivers), you can try TnrHid component.

Roman Novgorodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.