Android Tutorial BlueTooth Printing via SPP

padvou

Active Member
Licensed User
Longtime User
The Bluetooth connection is bidirectional so conceivably that can be done

I don't know if the SPP profile supports it though

Give it a try

I assume you would do a textreader

I haven't done it so I cannot really say
Do you perhaps know how to do a textreader?
 

Bryanne Vega

Member
Licensed User
Longtime User
No I just got the printer and just realized it had a credit card swiper. I'm able to print (text only). I'm pretty sure reading wont be a problem, just gotta learn how to listen :/
 

timwil

Active Member
Licensed User
Longtime User
try the demo/sample program that they have included to make sure it will read and everything is working

presumably the reader is an input device and you would use an input stream to read it

I have never done it - try some things - if they work let us know
 

Bryanne Vega

Member
Licensed User
Longtime User
It worked.

B4X:
cmp20 is Serial.

Dim inText As AsyncStreams      

inText.Initialize(cmp20.InputStream,cmp20.OutputStream,"inText")
      

Dim th As String
th = BytesToString(Buffer, 0, Buffer.Length, "ASCII")

Just make sure the device is connected and it will read it.
I recieve 3 seperate packets from time to time. Is there a way to wait for all data to be received instead of fetching new data one by one?
 

timwil

Active Member
Licensed User
Longtime User
What are you receiving?

The AsyncStream has a stream finished event does it not?
 

Bryanne Vega

Member
Licensed User
Longtime User
I'm not too familiar.
B4X:
B45********885^C    /BRYANNE^20*******000000?
;45*********85=20********274?

It has CreditCard data so I **** it out.
 

Bryanne Vega

Member
Licensed User
Longtime User
A small note: you would need to be connected to the device, see the forums on how to or send me a message !
 

Bryanne Vega

Member
Licensed User
Longtime User
CountingInputStream is not asyncstream. So I cant use the stream finish :/ do they work the same?
 

rubach

Member
Licensed User
Longtime User
Hello,
I am developing a POS solution with a Datamax Onell, Apex 3 (bluetooth), I can print with AsyncStreams, with POS command, but I have a problems to read from the printer after print, I need setup a first line to print, the paper have a blak mark to define de invoice, sometimes work but sometimes fail to read.

Any know hoy can read the black mark?

Thank you!
 

timwil

Active Member
Licensed User
Longtime User
For a very nice but really cheap printer check out these guys

http://rongtatech.com/

I get the RPP-02N model from Jeff for US$39 each

I have very satisfied customers - I just ordered another 20 units (already had 42 units from two previous orders)
 

mrjaw

Active Member
Licensed User
Longtime User
Cant purchase, would you post link?

THis printer RPP-02 can print with ESC/POS commands? I worked with something like that and I cant use the ESC/POS from B4A but I use another app and this it can.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…