Author Topic: Possible bug? Serial number not returned  (Read 3464 times)

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Possible bug? Serial number not returned
« on: February 02, 2009, 01:45:51 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bug? Serial number not returned
« Reply #1 on: February 02, 2009, 05:31:05 pm »
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

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Possible bug? Serial number not returned
« Reply #2 on: February 05, 2009, 02:41:25 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bug? Serial number not returned
« Reply #3 on: February 11, 2009, 07:18:21 pm »
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

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Possible bug? Serial number not returned
« Reply #4 on: August 21, 2009, 03:35:01 pm »
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.

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





« Last Edit: August 22, 2009, 10:44:52 pm by hid1 »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bug? Serial number not returned
« Reply #5 on: August 23, 2009, 06:52:20 am »
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

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Possible bug? Serial number not returned
« Reply #6 on: August 23, 2009, 08:24:35 pm »
nrcom lib v.8.26 used.



HidDevice.Manufacturer returned but HidD_GetManufacturerString not returned.

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bug? Serial number not returned
« Reply #7 on: August 24, 2009, 03:28:49 am »
Hello

This value is available in following property:
Code: [Select]
nrhid1.HidDevice.Manufacturer
If you need the direct call of HidD_GetManufacturerString(), you should open device and use valid Handle:

Code: [Select]
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

  • Guest
Possible bug Serial number not returned
« Reply #8 on: August 28, 2009, 05:35:40 pm »
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

  • Guest
Possible bug Serial number not returned
« Reply #9 on: August 30, 2009, 10:45:57 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Possible bug? Serial number not returned
« Reply #10 on: September 09, 2009, 04:14:58 am »
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.