bluetooth - Zebra ZQ 510 Mobile Printer compatible with Motorola MC32NO (Windows Embedded Compact 7.0) -


have problem connect new purchased zebra zq 510 mobile printer motorola mc32n0 via bluetooth using following legacy code(referencing inthehand.net.personal dll):

using inthehand.net; using inthehand.net.bluetooth; using inthehand.net.sockets; using inthehand.net.ports;  bluetoothaddress mac = bluetoothaddress.parse("b0b44879581d"); bluetoothendpoint btendpoint = new bluetoothendpoint(mac, bluetoothservice.serialport); bluetoothclient bluetoothclient = new bluetoothclient(); bluetoothclient.connect(btendpoint); 

my workaround use bluetoothsecurity.pairrequest() function pair printer, manually assign serial port( either com5 or com9) using btui application. use following code(referencing zebra link os sdk(zsdk_api.dll)):

using zsdk_api.comm; // instantiate connection zpl serial port on com5.  zebraprinterconnection theprinterconn = new serialprinterconnection("com5"); // open connection - physical connection established here. theprinterconn.open(); 

to connect print.

have 2 questions ask: 1. know whether zebra zq 510 mobile printer smart bluetooth compatible motorola mc32no (running on windows embedded compact 7.0)? 2. there way create virtual com port programmatically in windows ce?

finally find out solution. downloaded motorola emdk .net v2.9, , referenced symbol.wpan.dll. using following code, managed connect zebra zq510 printer, , printed out label expected. don't forget copy btinterface.dll emdk program folder.

        using symbol.wpan.bluetooth;         bluetooth m_bluetooth = new bluetooth();         m_bluetooth.enable();         remotedevice rd = new remotedevice("", currentbtprintermacadd, "");         rd.localcomport = localcomportforzebraprinterzq510;         m_bluetooth.remotedevices.add(rd);          if (!rd.ispaired)             rd.pair();          rd.openport();         rd.write(encoding.default.getbytes(template));          rd.closeport();         rd.unpair();          m_bluetooth.disable();         m_bluetooth.dispose(); 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -