B4A Library SD: BT Printer Bluetooth

Star-Dust

Expert
Licensed User
Longtime User
Ops ?? sorry
 

EduardoElias

Well-Known Member
Licensed User
Longtime User


Why it says there is a 0.21 and only has de 0.18 of this thread?

anyways: question:

I am trying to use it to print on a SUNMI K2 that is basically equal to others SUNMI innerprinters... it connects to the bluetooth, it does not give any errors, but nothing happens....

Using the test app supplied

Any help?
 

Star-Dust

Expert
Licensed User
Longtime User
Good morning,

The demo version that was released was in version 0.18 now it has been updated. I cannot assist you on SUNMI devices.
 

Star-Dust

Expert
Licensed User
Longtime User
Donated a little, waiting for library to do a proper one
Hi Marvin,

Thanks for the donation. In the library thread I wrote this:

The full version of the library will be issued to those making a donation (Contact me in private before making a donation). In the donation indicate the library you want and your NickName.

Unfortunately, even though I appreciate your donation, the amount you donated does not correspond to my request. Then I will proceed to return the donation
 
Hello, I would like to know how much I should donate, I am very interested in the SD-BT_Printer library.

Greetings.
 

Star-Dust

Expert
Licensed User
Longtime User
I started working on the BLE (Beacon) version and it seems to work fine.

A got a new class will be added in BT_Printer which will allow you to use BLE




 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Code:

B4X:
Public NamePrinter As String

Sub ButtonScan_Click
    Ble.ScanPrinter
End Sub

Sub ButtonSendText_Click
    Ble.InitializePrinter
    Ble.RightJustify
    Ble.Writeline(ESC_POS.DoubleOn & "RIGHT PRINT" & ESC_POS.DoubleOff)
    Ble.CenterJustify
    Ble.Writeline(ESC_POS.FontA_DoubleHight & "CENTER PRINT" & ESC_POS.FontA_Normal)
    'Ble.LeftJustify
    Ble.Writeline("LEFT PRINT")
End Sub

Sub ButtonImage_Click
    Ble.PrintBitmap(LoadBitmap(File.DirAssets,"qr.jpg"))
End Sub

' ---------------------------  BLE EVENT  -----------------------
Sub Ble_PrinterFound(Name As String, ID As String)
    NamePrinter=Name
    log($"Found device: ${NamePrinter} ${CRLF}(${ID})"$)
    Ble.connect(ID)
End Sub

Sub Ble_Connected(services As List)
    log($"Connect to printer: ${NamePrinter}"$)
End Sub

Sub Ble_Disconnected
    log("Diconnect")
End Sub

Private Sub Ble_ImageWriteComplete
    LabelInfo.Text="Image Printed "
End Sub

Private Sub Ble_WriteComplete (Characteristic As String, Success As Boolean)
    LabelInfo.Text="Text Printed "
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Any news about iOS version ?
I'm working on it.
By copying the identical code the result is not the correct one. In addition to the fact that the printing of the image is very slow
 

Star-Dust

Expert
Licensed User
Longtime User
new release 0.22, is it already available?
As you can see from the first post the new version is 1.00. It is already available. The free version will remain at version 0.21
 

Xfood

Expert
Licensed User
As you can see from the first post the new version is 1.00. It is already available. The free version will remain at version 0.21
to have an update of the library, for those who have previously made the donation?
 

Star-Dust

Expert
Licensed User
Longtime User
I did not foresee this because the new library does not add anything to the previous one regarding the Bluetooth class. But it adds a new class for BLE.

So who has the previous version does not need the new one to connect to the printers. BLE is slower than Bluetooth SPP
 

Star-Dust

Expert
Licensed User
Longtime User
ANNOUNCEMENT
I have also completed the TESTS for USB printing and it seems to work.
So you will have Bluetooth SPP, BLE (bacon), USB
 

Xfood

Expert
Licensed User
Currently I release the library in three versions:
  • 0.21 SPP bluetooth only.
  • 1.00 Bluetooth SPP + BLE.
  • 1.01 Bluetooth SPP + BLE + USB.
If you are interested in private I will be able to tell you the quotation of each version
1.02 Bluetooth SPP + BLE + USB + LAN ???
1.03 Bluetooth SPP + BLE + USB + LAN + serial ???

it's not a joke, but the lan and serial part might interest me
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…