New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HID Device not detecting #88
Comments
@srganeshram please post the logging output from the output window. Also, please turn on break on all exceptions and post a screen shot of any exceptions. https://christianfindlay.com/2019/07/14/visual-studio-break-on-all-exceptions/ |
@MelbourneDeveloper Exception Details and breakdown I got the error @ WindowsBaseDevice.cs Exception details Device.Net.Exceptions.ApiException |
@srganeshram OK, I understand the problem. Thankyou very much for your detailed description. The problem is first occurring here:
The handle is being properly created so when it attempts to get the description for the Hid device, error 6 is returned. Error code 6 just means that the handle is invalid. One potential reason why this might be happening is that the device is being opened in read/write mode with file sharing. Perhaps the device doesn't allow this. I have added some better error handling so that the problem is caught earlier and there's a description of the problem. You can see it in the Develop branch:
So, a question comes... Is this device read only? Or could there be a problem with shared connections? If so, maybe that is why connection is failing. Perhaps the code needs to be changed Here:
And:
I've logged this issue: My advice to you is to clone the Develop branch, and fix the code for your device in those spots. Have a look at this documentation: If you get it working, I can review a PR and get the fix in to the library. |
@srganeshram try changing the desired access, share mode, and createdisposition values. Here is the documentation for CreateFile: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/opening-hid-collections |
@srganeshram the flags attributes argument could also be an issue... Do you know the protocol for the card reader? My guess that a card reader would just show up as a device drive. If it just shows up as a drive, there's not much point in trying to use Hid.Net. You can just use standard file access methods to read/write files etc. |
@MelbourneDeveloper I tried this but same issue. The device type is "USB RFID Id Contactless Proximity Smart Card Reader 125KHZ Em4001 Em4100". The reader is working fine, if I show the access card it reads it and displays in notepad or any textbox. I am not sure about the protocol, and I don't think that it supports protocol. I just want to read any raw data from that device. Any help appreciate; |
@srganeshram can I TeamViewer on to your computer right now? |
@srganeshram and chance you could send a "USB RFID Id Contactless Proximity Smart Card Reader 125KHZ Em4001 Em4100" to Australia? I'd like to try to get it working. |
@srganeshram please send me a TeamViewer link on Twitter or Slack |
@MelbourneDeveloper I will share in a few minutes. |
I just twitted. Please check |
@srganeshram I didn't get it |
your twitter id please. |
@srganeshram cfdevelop |
Please check now. |
@srganeshram you gave away your TeamViewer details publicly Please change your TeamViewer password immediately! |
I will reset no worries |
@srganeshram please send me a message. Not tweet. |
No!!!!! Delete this and change your password!!!!QUICKLY! This is a public forum. |
@srganeshram you cannot give away your credentials in public like this. |
I'm sorry. We cannot do TeamViewer at this point. Please regenerate your password and we can chat about this later. |
Ok. Not a problem. We can check later.. |
If it is fine, please share your email I will send the teamview link. |
@srganeshram where can I get a USB RFID Id Contactless Proximity Smart Card Reader 125KHZ Em4001 Em4100? Is it possible to send one to Australia? I will try to get this working if I can get one. |
@MelbourneDeveloper I will check and let you know. |
@MelbourneDeveloper I just found one, in amazon.com. RFID USB Card Reader |
@srganeshram I ordered one. It will take a couple of weeks. |
@MelbourneDeveloper I am very kind of you. Thanks for the support. |
@srganeshram the package arrived but they couldn't find my letterbox or something... I think it will be delivered again Monday. Could you please try the new 3.0 Beta 2 version to see if you are having the same issue? |
@MelbourneDeveloper, But, I could not able to read the data still.I have attached the error details for your reference. Console Window - (Using New version 3.0 Beta 2) Error Details - (Using New version 3.0 Beta 2) Let me know if you need any further details.. Thanks |
@srganeshram on the line where it tries to open the file handle change apicalls.genericread to 0 and see what happens. |
@MelbourneDeveloper I changed as stated. It seems it worked and passed the above line, I tried to read the data from the device by using "ReadReportAsync" method, but it throws me an error as "System.UnauthorizedAccessException: 'Access to the path is denied.'" |
@srganeshram this is the same issue I get when I try to read data from my mouse. Please wait until Monday when I get the same device. |
Ok. Thanks for your support. We can wait. |
@srganeshram , I got the device. The problem is that it doesn't seem to work... I put my card on it, but it doesn't beep or go green... |
@srganeshram I tried multiple cards but nothing... |
You have to use HID Proximity Card. It should work.
Open a notepad and show the card, your card number should appear.
On Aug 6, 2019 1:29 PM, Christian Findlay <notifications@github.com> wrote:
@srganeshram<https://github.com/srganeshram> , I got the device. The problem is that it doesn't seem to work...
I put my card on it, but it doesn't beep or go green...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#88?email_source=notifications&email_token=ABCG3RE7OOXGJPE4TWTXE53QDEVONA5CNFSM4IHJTQLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3UITJY#issuecomment-518556071>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABCG3RDONMNM4O3DCUH4E53QDEVONANCNFSM4IHJTQLA>.
|
@srganeshram I used my credit card and it didn't work. I also used another card. |
@srganeshram I tried three different credit cards, three different USB ports, and two different cables. Nothing works. The device beeps when I plug it in to the computer, the red LED appears, but nothing happens when I tap it with a credit card. |
@MelbourneDeveloper I am sure that you cannot use credit card to read the data. You should use RFID Proximity Card (RFID Proximity Id Card) The above card can be read from the device. Thanks |
@srganeshram oh no! So, I have to order something else from Amazon? Also, why can't you just use the device as a keyboard? The device is essentially a keyboard. The device sends keys to notepad like a regular keyboard. Is there some extra data if you read via USB? |
@MelbourneDeveloper I just showed the card. I have additional cards with me. If you need I can send the one to Australia.
On Aug 7, 2019 12:57 PM, Christian Findlay <notifications@github.com> wrote:
@srganeshram<https://github.com/srganeshram> oh no! So, I have to order something else from Amazon?
Also, why can't you just use the device as a keyboard? The device is essentially a keyboard. The device sends keys to notepad like a regular keyboard. Is there some extra data if you read via USB?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#88?email_source=notifications&email_token=ABCG3RHXI5WGBYEOQ6NLKYTQDJ2PRA5CNFSM4IHJTQLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3XPENA#issuecomment-518976052>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABCG3RAVURMR535HJKA4HIDQDJ2PRANCNFSM4IHJTQLA>.
|
@srganeshram send me a private message on Twitter or Slack. I will send you the address to send it to. |
@srganeshram again: Why can't you just use the device as a keyboard? The device is essentially a keyboard. The device sends keys to notepad like a regular keyboard. Is there some extra data if you read via USB? |
@srganeshram there is a computer shop near my work. I will try to buy some cards today. |
Great. If don't work let me send one for you.
On Aug 9, 2019 3:45 AM, Christian Findlay <notifications@github.com> wrote:
@srganeshram<https://github.com/srganeshram> there is a computer shop near my work. I will try to buy some cards today.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#88?email_source=notifications&email_token=ABCG3RFFBFEE3EEGVIE7P3TQDSLJHA5CNFSM4IHJTQLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35BUZY#issuecomment-519707239>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABCG3RDA6CWWX2FML4YNVMTQDSLJHANCNFSM4IHJTQLA>.
|
@srganeshram I haven't been able to find the cards here. You will need to send me one. But, I've tried all kinds of cards and nothing works. I also tried my passport. I'm pretty sure this device is useless. |
No Problem. I have found a workaround for this. As you stated that this device is detected as a simple keyboard that gave me a hint of reading raw input from keyboard. I used the below article If you want to read the data from that device, you should use the proximity card. I can share the one from my end, if you wish you can share your address in a private message through twitter(@SRGaneshRam) or email(sr.ganeshram@hotmail.com) Thanks. |
'max430AI.ConfigurationTool.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. why Exception while reading data ? please help error Exception occure during read data byte frame from hid USB device , using hid.net and device.net library |
Hi MelbourneDeveloper, im having an issue with Device.Net (and in general with all hid libraries that i've tested so far). The problem is that my app can communicate with my hid device only in administrator mode, when the app is not run in admin mode the device is not found. In admin mode i can read/write data without any problem. See this log from Device.Net and please help region: ApiService, message: Calling CreateFile for DeviceId: \?\hid#vid_0483&pid_a2ca&mi_00#7&1a31e08c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}. Desired Access: None. Share mode: 3. Creation Disposition: 3, LogLevel: Information |
Hi,
I am trying to read data from a HID device, the device type is (USB RFID Id Contactless Proximity Smart Card Reader 125KHZ Em4001 Em4100). The device type is not detected and no events like connected and disconnected event triggered.
Please suggest.
I have provided the sample code for your reference
` class Program
{
#region Fields
private static readonly TrezorExample _DeviceConnectionExample = new TrezorExample();
///
/// TODO: Test these!
///
private static readonly DebugLogger Logger = new DebugLogger();
private static readonly DebugTracer Tracer = new DebugTracer();
#endregion
The text was updated successfully, but these errors were encountered: