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?
Hi
The meaning of the
code @"ZSDK_API_ERROR_DOMAIN" - code: 3 it's
Any ideas?
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’
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>:
Points: 0
You voted ‘up’
Joaquin,
If you change NSString *printer = accessory.name; to NS String *printer = accessory.serialNumber; do you still get the error message?
Thank you,
Beverly
Points: 0
You voted ‘up’
Yes, continue with the same error
2015-11-11 12:34 GMT-06:00 Beverly Vinson <
motorola-dev@motorola-dev.hosted.jivesoftware.com>:
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’