Comments (15)
@arturdev any luck?
from starprnt-sdk-ios-swift.
@arturdev what connection type does your printer have?
from starprnt-sdk-ios-swift.
it is a bluetooth printer
from starprnt-sdk-ios-swift.
@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.
@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.
The second one is added, but the first one is missing. Let me add it and try again
from starprnt-sdk-ios-swift.
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.
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.
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.
@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.
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.
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.
@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.
@gare-bear Can you help, please?
from starprnt-sdk-ios-swift.
@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)
- Is there a function to align left and right on a single line or column? or how to print like this design? HOT 2
- is this sdk work for M1 processer ? HOT 10
- Pods Issue StarIO for 2.8.2 - Signature not valid in the specified time frame HOT 7
- CPU usage above 90%!!! HOT 2
- Create receipt by commands vs. pdf HOT 1
- Print cash receipt from PDF HOT 1
- Printer Connection Failed!!![BUG] HOT 7
- Cash Drawer on Mpop HOT 4
- [BUG] Inconsistency in printed receipts HOT 1
- SPM Support [BUG] HOT 1
- Suggestion: Add StarPRNT emulation for Stargraphic printers HOT 1
- [BUG] App built with Xcode 14 causes crash when calling disconnect HOT 5
- Pod install failure for StarIO 2.8.1, 403 server failed to authenticate the request HOT 2
- [StarPRNTBuilderImpl setPageMode:] + 49 Fatal Exception HOT 7
- iPadOS 16.5 HOT 2
- Missing privacy manifest? HOT 1
- SM-T300i Connection HOT 1
- Rotate ticket failed after enable "180 Rotation" HOT 2
- Add support for TUP* models (open frame kiosk printers) HOT 2
- Cannot find TSP100GT printer that's shared through network HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starprnt-sdk-ios-swift.