Windows 7 32 bit Problem: Carriage Return every 64 chars? #126

Closed
opened 2019-11-28 02:33:20 -06:00 by maxwell130631 · 2 comments
maxwell130631 commented 2019-11-28 02:33:20 -06:00 (Migrated from github.com)

I am using hid_read_timeout read measurement data from a HID device. This works fine under Linux and Windows 10 64 bit. Usually, I do

hid_read_timeout( _handle, readBuf, MAX_STR, static_cast(_recvTimeout->value()*1000) );

and scan the buffer until I find a Carriage Return. In Linux and Windows 64 bit the length of the buffer until carriage return is about 180. However, My software was used on a Windows 7 32 bit machine and there my buffers contain a Carriage Return already after 64 characters. What could be a possible reason?

I am using hid_read_timeout read measurement data from a HID device. This works fine under Linux and Windows 10 64 bit. Usually, I do hid_read_timeout( _handle, readBuf, MAX_STR, static_cast<int>(_recvTimeout->value()*1000) ); and scan the buffer until I find a Carriage Return. In Linux and Windows 64 bit the length of the buffer until carriage return is about 180. However, My software was used on a Windows 7 32 bit machine and there my buffers contain a Carriage Return already after 64 characters. What could be a possible reason?
Youw commented 2019-11-28 07:02:19 -06:00 (Migrated from github.com)

Hi @maxwell130631,

Unfortunately you didn't provide enough info for us to even try help you.

  • What kind of device you're using?
  • What is MAX_STR?
  • What size is readBuf (I'd assume it is MAX_STR size, but who knows)?
  • What is the nature of the data you're getting from the device? Does make sense, when \r appears early?
  • How do you search for Carriage Return (\r)?
  • Are you sure the device sends data you're expect (and not the one you're actually getting)?
  • Did you try to dump per-byte all the data you're getting in case of Win64 and Win32 and check how different (per-byte) it is?

A code sample of you read (and \r search) routine should also help identify where the problem might be.

Hi @maxwell130631, Unfortunately you didn't provide enough info for us to even try help you. - What kind of device you're using? - What is `MAX_STR`? - What size is `readBuf` (I'd assume it is `MAX_STR` size, but who knows)? - What is the nature of the data you're getting from the device? Does make sense, when `\r` appears early? - How do you search for Carriage Return (`\r`)? - Are you sure the device sends data you're expect (and not the one you're actually getting)? - Did you try to dump per-byte all the data you're getting in case of Win64 and Win32 and check how different (per-byte) it is? --- A code sample of you read (and `\r` search) routine should also help identify where the problem might be.
mcuee commented 2021-06-10 03:12:45 -05:00 (Migrated from github.com)

Close the issue since the OP does not come back.
To OP: please reopen if provide more info.

Close the issue since the OP does not come back. To OP: please reopen if provide more info.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi#126
No description provided.