Windows 10 and Bluetooth printing

C Clive Lacey 3 years 7 months ago
64 1 0

Hi,
I have asked this over in the mobile computing area, but there does not appear to be much, if any activity there.
So posting here in hope of some dialog, many thanks in advance.
//-----------
I am looking to develop a small application that will eventually run as an U.W.P. App. on a Win10 mobile computer talking to one of the Bluetooth Mobile Zebra printers (exact model T.B.D.).
 
I am currently developing in MSVS 2015 and have a test application printing to a bluetooth printer using a standard hooks into the windows (print/device) driver. My test printer in a Zebra IMZ220 BT. This works fine, however......
 
In the past I have created my own USB handler (for windows applications) to enable me to send and receive S.G.D. commands to Zebra printers. I like the extended (and protocol independent) range of information I can send and receive using this method.
 
I would like to be able to achieve the same using the Bluetooth protocol.
 
I am not really very familiar with Bluetooth and was wondering if there are any "rules" I should follow or even better if there are any tools you have or can suggest to do this, bearing in mind I am not developing for Android?
 
Currently I am investigating using the 2 coms ports that Bluetooth utilises to use to see if I can receive the results of S.G.D. commands sent to the printer. I can see that the printer responds to a S.G.D. command by poking the response back to the same com port, rather than the "other" inbound one associated with the device/printer. Currently I am trying to devise some code to listen for this response "x" amount of time after sending the initial S.G.D. command.
 
Is this this correct way to progress or should I be looking to achieve this in a different way?
 
Any help /  pointers would be appreciate.
 
Regards
Clive
 
I have the same qu
 

Please Register or Login to post a reply

1 Replies

Y Yanis Dalabiras

Hi Clive,
Currently we do not have an SDK for Win10, so your methodology sounds correct.  I'll try to explain some of the best practices you should know about when it comes to Bluetooth printing.
The newer, what we call, Link-OS printers, like your iMZ220 have 2 channels (com ports) associated with Bluetooth. This is not standard for Bluetooth, but we have a reason for the two channels.   If you send communication on one port, it will respond on that port.  The difference is one is considered a raw port that you can send anything on and we recommend for your printing.  The other is for getting status or settings (S.G.D.) only.  This is so that getting status and settings does not interfere with printing.
The Link-OS printers also have the ability to provide S.G.D.s in JSON format.  It is highly recommended that you use this in order to ensure you are receiving a complete response to your query.  The response delay varies from setting to setting and model to model, so this really is the best way to make sure you are receiving a full response. Otherwise the delay could be up to several seconds for some commands. 

So say you want to set the variable location, the SGD is:
! U1 setvar "device.location" "My Desk"\r\n
You will not receive any response to this command, so to check the setting was properly set you send:
! U1 getvar "device.location"\r\n
Response: "My Desk"

With JSON, you can do the same workflow by sending:
{}{"device.location":"My Desk"}
response:
{"device.location":"My Desk"}

If you just want to get the current value, send a null as the value:
{}{"device.location":null}
response:
{"device.location":"My Desk"}

Hope these are helpful hints to get you started.
Robin

CONTACT
Can’t find what you’re looking for?