Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:51:26+00:00 2026-06-05T06:51:26+00:00

Hey I have been trying to work on this for some time but I

  • 0

Hey I have been trying to work on this for some time but I am just getting no where

I am trying to get bytes in from a USB device, this works fine for one or two lines coming in but when it gets to quite a few it just doesn’t work.

I am using this line of code to bring in data:

conn.bulkTransfer(epIN, buffer, 57600, 500);

is there any way to do a USB transfer over and over again until there is no more data coming in? Because the amount of data coming in can be anything from 8 bytes to a few MB


In reply to user387184

Would something like this work to transfer large amounts of data?

while ( conn.bulkTransfer(epIN, buffer, 57600, 500) > 0 ){
    \\do some stuff
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:51:28+00:00Added an answer on June 5, 2026 at 6:51 am

    If your USB connection really stops receiving data if there is no more data then all you need to do is to put a while receivedBufferIsNotEmpty around your statement since:

    lenOfReceivedBuffer = conn.bulkTransfer(epIN, buffer, 57600, 500);
    

    gets 0 in lenOfReceivedBuffer if no more data can be found on the port using 500ms timeout.

    You may also increase the timeout a bit, if your sending side is too slow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey, have been trying to work this out for last day or so but
Hey all i have been trying to figure out why i am getting this
Hey all, i have been trying for a few minutes on this problem and
hey people I'm new at jquery and i have been trying to figure this
Hey, I currently am having trouble trying to get this to work. Here's a
Hey guys i have been trying to download it from the below link http://www.enterprisedb.com/products-services-training/pgdownload
Hey, I have been trying to switch my code from using an ie object
I've been trying to get this complex MYSQL query to work exactly right over
Hey guys, I've been trying to play with mongoose & node, but I have
Hey, I've been trying to fix this problem for a long time, The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.