Motorola EMDK sdk, barcode2 QRCode scanning returns E_SCN_BUFFERTOOSMALL

4.8k views Asked by At

I’m testing EMDK .Net SDK 2.5 on a ES400 device and have managed to get basic barcode scanning to work. When I try to scan QRCode’s, I allways get E_SCN_BUFFERTOOSMALL. The ScanData.Buffersize is 112 which probably is to small, but where can I increase the buffersize?

The QRCode decoder is enabled. If I try the same QRCode with the DataWedge on the device, everything works fine. I have checked help files, samples etc without any luck. Any help or suggestions would be highly appreciated. Cheers!

3

There are 3 answers

0
Havad Ostgaard On BEST ANSWER

I found a workaround!!
By using Symbol.Barcode2 assembly, instead of the Symbol.Barcode2.DesingCF35 assembly, I am able to control the buffersize with the statement

MyScanner.Config.ScanDataSize = 256;

If you need more control, it looks as if you are better off looking at the “CS_Barcode2Sample” project as an inspiration instead of the “Barcode2ControlSample”. Good luck..

0
tcarvin On

You can set the buffer length on the ReaderData object via its constructor. Then you pass that instance to the Reader:

MyReader.Actions.Read(MyReaderData)

That's all there is to it!

1
James Allman On

You can use Symbol.Barcode.ReaderDataLengths.MaximumLabel to initialize the ReaderData buffer length to the maximum size.

Symbol.Barcode.ReaderData MyReaderData = 
    new Symbol.Barcode.ReaderData (
        Symbol.Barcode.ReaderDataTypes.Text,
        Symbol.Barcode.ReaderDataLengths.MaximumLabel);