May 9, 2012 Replies: 238 I finally have reliable, stable printing to a blue tooth printer (Citizen CMP-10 and CMP-20) from my Samsung 5570L Galaxy Mini Android Device running v2.3.6 Attached is a skeleton project (based on the Serial example posted here) in Basic4Android v1.8 that requires the following libraries Core v1.77 Serial v1.20 ToggleLibrary 1.00 It may work with other versions but this is what works for me in my specific situation To print you must first pair the phone/device to the printer In the program you must place what you wish to print in PrintBuffer (string) variable and call StartPrinter (sub) If the printer is not turned on it returns an error message and allows you to reprint Hope this helps someone Tim Attachments BTPrint.zip BTPrint.zip 8.7 KB · Views: 7,369 Last edited: May 9, 2012 Click to expand...
I finally have reliable, stable printing to a blue tooth printer (Citizen CMP-10 and CMP-20) from my Samsung 5570L Galaxy Mini Android Device running v2.3.6 Attached is a skeleton project (based on the Serial example posted here) in Basic4Android v1.8 that requires the following libraries Core v1.77 Serial v1.20 ToggleLibrary 1.00 It may work with other versions but this is what works for me in my specific situation To print you must first pair the phone/device to the printer In the program you must place what you wish to print in PrintBuffer (string) variable and call StartPrinter (sub) If the printer is not turned on it returns an error message and allows you to reprint Hope this helps someone Tim
padvou Active Member Licensed User Longtime User Jun 9, 2015 #141 timwil said: 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 Click to expand... Do you perhaps know how to do a textreader?
timwil said: 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 Click to expand... Do you perhaps know how to do a textreader?
Bryanne Vega Member Licensed User Longtime User Jun 18, 2015 #142 my mobile printer (p25i) has a credit card swiper. Anyone could give a hand for this?
timwil Active Member Licensed User Longtime User Jun 18, 2015 #143 do you have a test/demo program that does the swipe?
Bryanne Vega Member Licensed User Longtime User Jun 18, 2015 #144 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 :/
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 Jun 18, 2015 #145 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
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 Jun 18, 2015 #146 It worked. Code: Copy 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?
It worked. Code: Copy 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 Jun 18, 2015 #147 What are you receiving? The AsyncStream has a stream finished event does it not?
Bryanne Vega Member Licensed User Longtime User Jun 18, 2015 #148 I'm not too familiar. Code: Copy B45********885^C /BRYANNE^20*******000000? ;45*********85=20********274? It has CreditCard data so I **** it out.
I'm not too familiar. Code: Copy 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 Jun 18, 2015 #149 Could you please point me to a _Finished event? (example or link)
timwil Active Member Licensed User Longtime User Jun 18, 2015 #150 https://www.b4x.com/android/help/randomaccessfile.html#top use AsyncStreams Sub Rx_StreamFinish(Success As Boolean, TaskId As Int)
https://www.b4x.com/android/help/randomaccessfile.html#top use AsyncStreams Sub Rx_StreamFinish(Success As Boolean, TaskId As Int)
Bryanne Vega Member Licensed User Longtime User Jun 19, 2015 #151 A small note: you would need to be connected to the device, see the forums on how to or send me a message !
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 Jun 19, 2015 #152 timwil, I left my reader/printer at the office, will check that up tomorow!
Bryanne Vega Member Licensed User Longtime User Jun 19, 2015 #153 CountingInputStream is not asyncstream. So I cant use the stream finish :/ do they work the same?
R rubach Member Licensed User Longtime User Jul 29, 2015 #154 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!
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!
omarruben Active Member Licensed User Longtime User Sep 9, 2015 #155 great !! working fine with LG transpire and woosim porti-sc30
timwil Active Member Licensed User Longtime User Sep 9, 2015 #156 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)
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)
Bryanne Vega Member Licensed User Longtime User Sep 16, 2015 #157 timwil said: 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) Click to expand... Cant purchase, would you post link?
timwil said: 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) Click to expand... Cant purchase, would you post link?
J Jose Marcano New Member Sep 18, 2015 #159 https://www.b4x.com/android/forum/threads/android-serial-tutorial.6908/ its works
mrjaw Active Member Licensed User Longtime User Sep 21, 2015 #160 Bryanne Vega said: Cant purchase, would you post link? Click to expand... 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.
Bryanne Vega said: Cant purchase, would you post link? Click to expand... 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.