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 74443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:21:33+00:00 2026-05-10T20:21:33+00:00

Here’s some background on what I’m trying to do: Open a serial port from

  • 0

Here’s some background on what I’m trying to do:

  1. Open a serial port from a mobile device to a Bluetooth printer.
  2. Send an EPL/2 form to the Bluetooth printer, so that it understands how to treat the data it is about to receive.
  3. Once the form has been received, send some data to the printer which will be printed on label stock.
  4. Repeat step 3 as many times as necessary for each label to be printed.

Step 2 only happens the first time, since the form does not need to precede each label. My issue is that when I send the form, if I send the label data too quickly it will not print. Sometimes I get ‘Bluetooth Failure: Radio Non-Operational’ printed on the label instead of the data I sent.

I have found a way around the issue by doing the following:

for (int attempt = 0; attempt < 3; attempt++) {     try     {         serialPort.Write(labelData);         break;     }     catch (TimeoutException ex)     {         // Log info or display info based on ex.Message         Thread.Sleep(3000);     } } 

So basically, I can catch a TimeoutException and retry the write method after waiting a certain amount of time (three seconds seems to work all the time, but any less and it seems to throw the exception every attempt). After three attempts I just assume the serial port has something wrong and let the user know.

This way seems to work ok, but I’m sure there’s a better way to handle this. There are a few properties in the SerialPort class that I think I need to use, but I can’t really find any good documentation or examples of how to use them. I’ve tried playing around with some of the properties, but none of them seem to do what I’m trying to achieve.

Here’s a list of the properties I have played with:

  • CDHolding
  • CtsHolding
  • DsrHolding
  • DtrEnable
  • Handshake
  • RtsEnable

I’m sure some combination of these will handle what I’m trying to do more gracefully.

I’m using C# (2.0 framework), a Zebra QL 220+ Bluetooth printer and a windows Mobile 6 handheld device, if that makes any difference for solutions.

Any suggestions would be appreciated.

[UPDATE]

I should also note that the mobile device is using Bluetooth 2.0, whereas the printer is only at version 1.1. I’m assuming the speed difference is what’s causing the printer to lag behind in receiving the data.

  • 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. 2026-05-10T20:21:33+00:00Added an answer on May 10, 2026 at 8:21 pm

    Flow control is the correct answer here, and it may not be present/implemented/applicable to your bluetooth connection.

    Check out the Zebra specification and see if they implement, or if you can turn on, software flow control (xon, xoff) which will allow you to see when the various buffers are getting full.

    Further, the bluetooth radio is unlikely to be capable of transmitting faster than 250k at the maximum. You might consider artificially limiting it to 9,600bps – this will allow the radio a lot of breathing room for retransmits, error correction, detection, and its own flow control.

    If all else fails, the hack you’re using right now isn’t bad, but I’d call Zebra tech support and find out what they recommend before giving up.

    -Adam

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

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Short answer: set the value of the exportselection attribute of… May 11, 2026 at 1:49 pm
  • added an answer You have to have an a tag inside the li's.… May 11, 2026 at 1:49 pm
  • added an answer Sample code for a solution using Delegate.GetInvocationList: public class MyEventArgs… May 11, 2026 at 1:49 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.