XCODE problems to pritn on Zebra Printer

I have iMZ320 Zebra printer, I downloed the sdk and the examples from Zebra page, the example works fine on Ipad and I can send to print.

Now, I work on my project and I have this issue, I have one error when execute the line

self.printer = [ZebraPrinterFactory getInstance:self.connection error:&error];

This the error

@"ZSDK_API_ERROR_DOMAIN" - code: 3  

The line original to do the connection is

self.connection = [[[MfiBtPrinterConnection alloc] initWithSerialNumber:self.connectivityViewController.bluetoothPrinterLabel.text] autorelease];

But I don't have any

self.connectivityViewController.bluetoothPrinterLabel.text

So I change by

 EAAccessoryManager *manager = [EAAccessoryManager sharedAccessoryManager]; self.bluetoothPrinters = [[NSMutableArray alloc] initWithArray:manager.connectedAccessories]; EAAccessory *accessory = [self.bluetoothPrinters objectAtIndex:0]; NSString *printer = accessory.name; self.connection = [[MfiBtPrinterConnection alloc] initWithSerialNumber:printer];

Any ideas?

Joaquin vt9yxeu...
HiThe meaning of the code @

Hi

The meaning of the code @"ZSDK_API_ERROR_DOMAIN" - code: 3  it's

@"NSLocalizedDescription" : @"Unable to determine printer language"

Any ideas?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Joaquin,Usually, updating

Hi Joaquin,

Usually, updating the timeout (as you mentioned you did in this post) resolves the issue. Can you share the code where you make the connection via BT and also where you added in the timeout update line? What timeout values did you try?

Thank you,

Beverly

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joaquin vt9yxeu...
Hi Beverly, nice to write you

Hi Beverly, nice to write you.

here my method

-(void)setZebraPrinter{

EAAccessoryManager *manager = [EAAccessoryManager

sharedAccessoryManager];

self.bluetoothPrinters = [[NSMutableArray alloc]

initWithArray:manager.connectedAccessories];

EAAccessory *accessory = ;

NSString *printer = accessory.name;

//self.connection = [[[MfiBtPrinterConnection alloc]

initWithSerialNumber:self.connectivityViewController.bluetoothPrinterLabel.text]

autorelease];

self.connection = [[MfiBtPrinterConnection alloc]

initWithSerialNumber:printer];

[((MfiBtPrinterConnection*) self.connection)

setTimeToWaitAfterWriteInMilliseconds:30];

NSError *error = nil;

;

*self.printer = [ZebraPrinterFactory getInstance:self.connection

error:&error]; Here I have the error, of course in last lines code I have

gotten correct values*

if(error != nil) {

[self performSelectorOnMainThread:@selector(showErrorDialog:)

withObject:[error localizedDescription] waitUntilDone:YES];

}

}

2015-11-11 10:46 GMT-06:00 Beverly Vinson <

motorola-dev@motorola-dev.hosted.jivesoftware.com>:

Zebra Technologies LaunchPad <https://developer.motorolasolutions.com/> XCODE

problems to pritn on Zebra Printer

reply from Beverly Vinson

<https://developer.motorolasolutions.com/people/bvinson%40zebra.com?et=wa...

in Label And Receipt Printing - View the full discussion

<https://developer.motorolasolutions.com/message/86874?et=watches.email.t...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Joaquin,If you change

Joaquin,

If you change NSString *printer = accessory.name; to NS String *printer  = accessory.serialNumber; do you still get the error message?


Thank you,

Beverly



Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joaquin vt9yxeu...
Yes, continue with the same

Yes, continue with the same error

2015-11-11 12:34 GMT-06:00 Beverly Vinson <

motorola-dev@motorola-dev.hosted.jivesoftware.com>:

Zebra Technologies LaunchPad <https://developer.motorolasolutions.com/> XCODE

problems to pritn on Zebra Printer

reply from Beverly Vinson

<https://developer.motorolasolutions.com/people/bvinson%40zebra.com?et=wa...

in Label And Receipt Printing - View the full discussion

<https://developer.motorolasolutions.com/message/86906?et=watches.email.t...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Joaquin,There is a new

Hi Joaquin,

There is a new version of the SDK available, please download it and see if the issue persists. It appear many people are seeing the same or a similar issue so I am working to replicate and test code etc. here. I will let you know what I find out.

What firmware is on the printer you are using? What version of Xcode are you running? What iOS version is your iPad running? I want to gather this data to compare the issues between users and with what I am testing with.

Thank you,

Beverly

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments