ios - Star Micronics TSP650II bluetooth printer, can't write to EASession.OutputStream -


i'm trying print label star micronics tsp650ii printer in monotouch app.

the problem session.outputstream.hasspaceavailable() returns false. missing?

the c# code have goes (cut simplicity):

    var manager = eaaccessorymanager.sharedaccessorymanager;             var starprinter = manager.connectedaccessories.firstordefault (p => p.name.indexof ("star") >= 0); // find eaaccessory correctly      var session = new easession (starprinter, starprinter.protocolstrings [0]); // second parameter resolves "jp.star-m.starpro"     session.outputstream.schedule (nsrunloop.current, "kcfrunloopdefaultmode");      session.outputstream.open ();      byte[] tosend = getinitdata(); // comes project same printer ethernet cable used in windows environment , worked, not null sure     if (session.outputstream.hasspaceavailable()) {        int byteswritten = session.outputstream.write (tosend, (uint)stilltosend.length);          if (byteswritten < 0) {             debug.writeline ("error writing data");          } else {              debug.writeline("some data written, ignoring rest, test");         }     } else        debug.writeline ("no space"); // prints, output stream never ready take output 

update: able work-around problem binding star micronics ios sdk project, that's less ideal adds 700k package should work without binding.

update 2: i've been getting requests binding code. still recommend try figure out bluetooth connectivity , not use binding brave enough, here is.

you this find eaaccessory correctly

could reason outputstream returns false if session null?

best regards,

star support


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -