quinta-feira, 5 de abril de 2012 14:37
I'm developing Print Extention App which should interact with USB device by means BiDi Queries in Win8.
And I have several questions about BiDi usage:
1. Is it possible to customize BiDi query?
2. In my case response on BiDi query is big portion of binaries data. How to transfer big portion of binary data from BiDi to Print Extention Application?
Are there any limitation on size of data of BIDI_TEXT and BIDI_STRING types?
3. Is it possible to set up timeouts on BiDi Read/Write operations?
Todas as Respostas
sexta-feira, 6 de abril de 2012 06:26Moderador
Did you project based on metro style app or general application.
On the other hand, you can check this document to find if the function can be used in metro style app.
Jesse Jiang [MSFT]
MSDN Community Support | Feedback to us
sexta-feira, 6 de abril de 2012 18:27
I think you're coming at the problem in the wrong way. A few observations and questions:
- You should never need to get binary data from your bidi extension. The point of a Bidi is to isolate your app from knowing the protocol level details about your device. You should use your Bidi extension JS file to parse the data into a data model. For example, say you want to know your consumable status. Your app simply needs to query \Printer.Consumables.
Over USB, that data may come back as a binary blob, but you should parse it out into the set of colors and the percentage values for the consumables.
Over WSD, that's a SOAP message, but we automatically put that into the Bidi Schema.
Over TCP, we'd query an OID and put those values into the Bidi schema for you.
- What kind of parameters are you talking about? Bidi GET operations can support a limited amount of variable data (eg \Printer.Consumables.[InkName] or \Printer.Configuration.[InputBin]). We do not support a sideband communication channel between apps and Bidi JS.
- What's the scenario for a timeout?
segunda-feira, 9 de abril de 2012 14:37
Thank you for your answer.
1. Actually I need to get some binary data (ex. image in jpg format) from printer device via USB. As I understand there is the only one legacy way to exectute custom USB queries in Metro App - it is Bidi. It is possible to send special USB query to printer device (via Bidi) and get binary data on Bidi side. But is there a way to transfer binary data from Bidi to Application?
2. Scenarios for timeouts can be the following:
- Due to printer device features, two USB queries need for getting some data: first query is for getting data size and second one is for getting actual data. And some pause are required between two queries.
- Also it is possible that device will take some time for query processing (slow device)and I need to set up timeout certain value for query of such types. By the way, what is default timeout value for USB query processing.
sexta-feira, 13 de abril de 2012 18:26
Thanks for describing the scenario. We have some changes that will be available in the next public release that address your concerns. We will have updated documentation and samples for your scenario.