how i force sequence pier slight wait line pristine before eventuality the data?


here's credentials i'm perplexing do:




  1. open sequence pier mobile device bluetooth printer.

  2. send an epl/2 form bluetooth printer, understands provide information receive.

  3. once form received, send information printer printed tag stock.

  4. repeat step 3 times required any tag printed.



step 2 wholly happens initial time, given form does need communicate any label. emanate i send form, i send tag information too fast print. infrequently i "bluetooth failure: radio non-operational" printed tag instead information i sent.



i have found proceed around emanate doing following:



for (int try = 0; try < 3; attempt++)
{
try
{
serialport.write(labeldata);
break;
}
locate (timeoutexception ex)
{
// record info arrangement info formed ex.message
thread.sleep(3000);
}
}


so basically, i locate timeoutexception retry slight after sharp certain volume (three seconds seems work time, nonetheless any reduction seems pitch difference each attempt). after 3 attempts i only assume sequence pier something wrong let user know.



this proceed seems work ok, nonetheless i'm certain there's improved proceed hoop this. there few properties serialport category i cruise i need use, nonetheless i can't unequivocally any good support examples them. i've attempted enactment around properties, nonetheless zero seem i'm perplexing achieve.



here's list properties i have played with:




  • cdholding

  • ctsholding

  • dsrholding

  • dtrenable

  • handshake

  • rtsenable



i'm certain multiple hoop i'm perplexing some-more gracefully.



i'm controlling c# (2.0 framework), zebra ql 220+ bluetooth printer windows mobile 6 handheld device, creates any inadequacy solutions.



any suggestions appreciated.



[update]



i should also note mobile device controlling bluetooth 2.0, since printer wholly during chronicle 1.1. i'm presumption speed inadequacy what's causing printer loaf behind receiving data.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?