Trouble programmatically getting the firmware and hardware versions (link-os)

I have an iOS app which implements Link-OS for receipt printing to the iMZ220 bluetooth printer.

 

Occasionally a couple of our customers complain about receipts printing multiple copies (not at the end of a roll).  One of the troubleshooting steps that could really help me (I think) is being able to correlate details, like firmware version, and possibly hardware version.

 

Looking through Link-OS, I couldn't find a way to get the firmware version and the hardware version.

 

I *am* able to provide a way for the user to print a configuration label as follows:

 

    var serialNumber: String?

    if let connectedPrinter = EAAccessoryManager.shared().connectedAccessories.first(where:{$0.protocolStrings.contains(where: {$0 == "com.zebra.rawport"})}){

      serialNumber = connectedPrinter.serialNumber

        DispatchQueue.global(qos: .utility).async(execute: {

          let zebraConnection = MfiBtPrinterConnection(serialNumber: serialNumber)

          zebraConnection?.open()

          do{

            let zebraPrinter = try ZebraPrinterFactory.getInstance(zebraConnection)

            try zebraPrinter.getToolsUtil().printConfigurationLabel()

          } catch{

            DDLogVerbose("Couldn't get the zebraPrinter instance or the printConfigurationLabel failed")

          }

          zebraConnection?.close()

        })

    }

 

which spits out some useful info, but I want to programmatically log those versions, not require the end user to print the configuration label and then somehow send it to me (via email, mms or some such).

 

So I resorted to using iOS's EAAccessory.  This does not appear to be accurate for firmareRevision and harwareRevision.

 

    let connectedPrinter = EAAccessoryManager.shared().connectedAccessories.first(where:{$0.protocolStrings.contains(where: {$0 == "com.zebra.rawport"})}){

 

In Xcode's debug console, I print the connectedPrinter object:

 

po connectedPrinter

 

<EAAccessory: 0x174007950> {

  connected:YES

  connectionID:19337234

  name: XXXXJ154601825

  manufacturer: Zebra Technologies

  modelNumber: iMZ220

  serialNumber: XXXXJ154601825

  firmwareRevision: 0.0.1

  hardwareRevision: 0.0.1

  dockType: (null)

protocols: (

    "com.zebra.rawport"

)

 

As you can see, some of the info is very helpful to me: name, manufacturer, modelNumber, and serialNumber.  But the firmwareRevison and hardwareRevision are useless.

 

The printed configuration label shows me:

 

V73.19.13Z <- FIRMWARE

6.5.0 4.8 HARDWARE ID

 

Not actually sure if the hardware id is all that helpful, but the firmware definitely would be.

 

Any recommendations?

 

Thanks,

Del