Giter Club home page Giter Club logo

Comments (15)

gare-bear avatar gare-bear commented on May 29, 2024 1

@arturdev any luck?

from starprnt-sdk-ios-swift.

gare-bear avatar gare-bear commented on May 29, 2024

@arturdev what connection type does your printer have?

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

it is a bluetooth printer

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

@gare-bear
The log from this demo app

PrinterSetting
{
portName: BT:TSP100
portSettings:
macAddress: 00:11:62:18:35:61
modelName: TSP143IIIBI GY
emulation: 3
cashDrawerOpenActiveHigh: true
allReceiptsSettings: 7
selectedPaperSize: threeInch
selectedModelIndex: tsp100
}

from starprnt-sdk-ios-swift.

gare-bear avatar gare-bear commented on May 29, 2024

@arturdev there are two key/value pairs you should add to your plist to ensure you have the proper permission to discover Bluetooth printers.

  • Supported external accessory protocol - so you can discover the printer using searchPrinter
  • Privacy - Bluetooth Always Usage Description - a description shown to the user when you want to request permission to use a Bluetooth printer

This is mentioned in section 2 of our documentation

Check if these are missing from your plist

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

The second one is added, but the first one is missing. Let me add it and try again

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

The person who owns the printer is in a different timezone, I'm waiting for him. Will report back as soon as he tests it.

Thanks for your interest, appreciate that ❤️

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

After adding the missing entry to the info.plist, now it is able to find the printer. The printing returns success status code but nothing is printed in reality. Trying to figure out what is the issue.
Thanks

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

It seems correct. I'm using the same function for printing as in the demo app.
https://github.com/star-micronics/StarPRNT-SDK-iOS-Swift/blob/master/SDK/Swift%20SDK/Communications/Communication.swift#L28

And the completionHandler is being called with SMStarIOResultCodeSuccess but nothing is printed.

from starprnt-sdk-ios-swift.

gare-bear avatar gare-bear commented on May 29, 2024

@arturdev You're probably trying to print text which the TSP143III doesn't support.
This particular printer is Raster only, so you must send your data in graphical form using a UIImage.
Then use the ISCBBuilder and the appendBitmap method to print the image.
Here you can find the supported methods for each printer model.

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

Yes, I was trying to print a text. So I need to programmatically check what type the currently connected printer supports (text/image/etc..) and build the print-data accordingly, right?

from starprnt-sdk-ios-swift.

gare-bear avatar gare-bear commented on May 29, 2024

Exactly! You can use the ModelCapability class to determine what emulation the printer supports. Just FYI the correct emulation is starGraphic.

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

@gare-bear Hi again.
I'm having some issue when I'm printing second time in a row.
First time it prints successfully. But second time it doesnt.

My flow is the following:

When user prints, I'm creating StarIoExtManager instance with the selected printer port settings.
Then, sending commands (I'm using the same Communications class which is in this demo project).
The second time I'm getting errorOpenPort.
Is there anything wrong I'm doing?

from starprnt-sdk-ios-swift.

arturdev avatar arturdev commented on May 29, 2024

@gare-bear Can you help, please?

from starprnt-sdk-ios-swift.

gare-bear avatar gare-bear commented on May 29, 2024

@arturdev please post this as a new issue and i'll be happy to help you. please post your code as well.

from starprnt-sdk-ios-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.