Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: USBHost_t36: Question about USBSerial_BigBuffer

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    5

    USBHost_t36: Question about USBSerial_BigBuffer

    I'm trying to understand the difference between USBSerial_BigBuffer userial(myusb, 1) and USBSerial userial(myusb) and how it effects my project. The project I'm working on has the Teensy attached to a 3d printer through USB host. There is a command I can send the printer that will return a large block of data and while returning the data I believe I'm running into a buffer overrun. The data is being passed to another device through Serial1. I have the serial1 tx\rx buffers at 1024 which should be enough, but I'm capped at 1024 by the other device.

    My question is, I see in Serial.ino it says that BigBuffer is good to 512 bytes, will this impact my project if the userial is returning more than 512? Can I do anything to increase the buffer size of userial beyond 512? Do I understand this correctly or am I missing something altogether?

    I can provide my code if that will help. I'm fairly new to the hobby and USB protocols. Thanks.

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,979
    The Big Buffer version was setup mainly for a few USB To Serial devices whose USB Interface Descriptors are setup to transfer 512 byte records instead of 64, like most of the others do.

    My guess it would not have much impact on your sketch. But could be wrong

  3. #3
    Junior Member
    Join Date
    Aug 2022
    Posts
    5
    Thank you. I should have known it was the serial buffer. I have to figure out how big the block actually is and how to get it through with the code. I appreciate the information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •