Fiscal Printer

bashka_abdyli

Member
Licensed User
Longtime User
Hi, I want to send commands via Bluetooth to a fiscal printer, who can help to provide a working code. Some sample of commands are below.


**Normal sale
48,1;000000;1
58,D00011*2.000#2.50
58,D00022*3.000#1.50
58,D00033*2.000#1.70
53
56


*Cash IN -
70,100

*Cash OUT -
70,-50

*X-Report
69,2

*Z-Report
69,0
 

bashka_abdyli

Member
Licensed User
Longtime User
Thanks Erel, tried but bin a bit confused, now 3day working on that, I really need someone who finishes this part. If anyone interested can contact me alto privately. Thanks for understanding.
 

Picena Informatica

Active Member
Licensed User
Longtime User
Which connectivity has your printer? Bluetooth, RS232 or USB?
You can search the forum for "Bluetooth Printer" or "Serial Printer".
 

aeric

Expert
Licensed User
Longtime User
Which part are you stuck?

Are you developing with B4A?

First try to pair the device.

Connect to the printer using Serial library.

Maybe something like this.

B4X:
Dim PairedDevices As Map = Serial1.GetPairedDevices

Serial1.Connect( <Selected device> )

Sub Serial1_Connected (Success As Boolean)
    If Success Then
        AStreams.Initialize( ... )
        Serial1.Listen
    End If
End Sub

Dim data As String = "70" & Tab & "100"
AStreams.Write(data.GetBytes("utf8"))
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…