I need to print on a Bluetooth printer.
I already have a program for the Windows mobile platform, that sends commands and data via Bluetooth to a Zebra RW 420 printer, using the Zebra Printer Protocol. It's just a stream sent on Bluetooth.
Now, we'd like to do this on Android. I would like to know some basic information:
Is this type of printing possible/doable (we've seen very little information regarding printing on Android), or is Bluetooth limited to audio and file transfer?
How to connect a Bluetooth printer to the Android device.
Your best bet will be to use the ZebraLink SDK for Android devices. You can download it from Zebra here. The SDK comes with a load of sample code and documentation which covers how to use it, so you should be able to jump right in!
Printing via Bluetooth on Android is not possible as of now (as per my knowledge), as Android does not support Bluetooth 'Profiles', such as BPP (Basic Printing Profile), HCRP (Hardcopy Replacement Profile), BIP (Basic Imaging Profile) etc. which are the common profiles used with Bluetooth Printing. Ref. this to know about Printing BT profiles.
Currently, Android supports OPP (Object Push Profile) which is used to send files over Bluetooth and perhaps even A2DP.
To have Bluetooth profiles implemented within the Bluetooth Stack for Android, you can refer Sybase-iAnywhere-Blue-SDK-for-Android, which provides an SDK to add this functionality to the existing BT stack implementation on Android.
You can use a datecs printer too: http://www.datecs.bg/en (look for SDK). There are many printers, card readers, etc.
Related
Does any one provide me some information about how to connect a bluetooth printer from android platform (android tablet).
How do i achieve this?
Are you looking to print to a big desktop printer or a receipt printer?
If you're looking for a receipt printer, Star Micronics has an Android SDK that you can freely download here: http://www.starmicronics.com/support/SDKDocumentation.aspx.
It covers USB, bluetooth, and wifi/ethernet printing.
This SDK has a really nice sample app that lets you test and customize a lot of printer functions to see them in action. Each function is documented in the source code. The commands and their parameters are also available in the app itself as a quick on screen reference which is convenient. On top of all that, it's well documented.
If you use their SDK, you can send plain text to the printer along with commands. The API handles converting the data into what the printer can understand.
i need to find a way to print file/content/.. programmatically from my application to blue-tooth printer (or) printer connected with USB.
Could anybody give me a idea? any reference will be helpful.
is there any open source api available for printing in android?
Are you looking to print to a big desktop printer or a receipt printer?
If you're looking for a receipt printer, Star Micronics has an Android SDK that you can freely download here: http://www.starmicronics.com/support/SDKDocumentation.aspx.
It covers USB, bluetooth, and ethernet printing.
This SDK has a really nice sample app that lets you test and customize a lot of printer functions to see them in action. Each function is documented in the source code. The commands and their parameters are also available in the app itself as a quick on screen reference which is convenient. On top of all that, it's well documented.
If you use their SDK, you can send plain text to the printer along with commands. The API handles converting the data into what the printer can understand.
You need to create Connection between your application & bluetooth printer.
Look at to my answer here.
Mobile devices/tablets have usb ports so is there a way to send the print job directly via USB if connected to the printer?
Also, is it an ok solution in terms of simplicity and reliability to have the android device to create a 2d graphic of text, upload it to an application server via wifi, notify a desktop with a printer to do the job with the graphic.
Someone suggested to me to use a wireless (wifi) printer but really I need to set this up for a thermal printer to print receipts from my app.
If there are other better methods please share them. Thanks.
Here is the options for printing from the Android Device.
Thermal Printers - In market no of thermal printer are available like EPSON, Casio, STAR or Chinese printers. These printers have their own SDK. By simply import that sdk in project you can print from the application.
Connectivity is the main thing in using those printers. Every user have different kind of needs. So we can connect with thermal printers via USB, Bluetooth, WiFi, COM Port 232, Ethernet.
Also one more thing is you can install your printer drivers and CUPS on Server and directly send the printing request to the server and server send it to printer IP. This feature allow you to print form anywhere no issue of slow connection like we face in BT and WiFi.
Google Cloud Printers - In this case you have to registered your printer on Google printers and through Google Cloud printer API's we can print from the Android Device.
My personal opinion is to go for the Thermal printer as i have used the EPSON, Casio and some other and they are fairly easy to use and satisfy all our needs.
For the Developers here is one sample how to deal with thermal printer
How to print from the Thermal Printer in Android?
I think that you have two main approaches:
Google Cloud print system -> but there is no thermal printer that supports the protocol so the printer must be connected to some computer (win/mac)
Try to use some bluetooth thermal printer as discussed in this question.
Personally, I think the best way is doing by bluetooth printer...
I actually found out that STAR Micronics support android printing on certain models (there are quite a few models supported).
STAR give you the option of using the WiFi or Bluetooth to connect, I think Ethernet is also supported but you have to have certain models of the Ethernet adapter inserts that plug into the back of your thermal printer.
Here is the link:
http://www.star-m.jp/eng/dl/dl02_06_02spsd.htm
The reason this is so difficult to find is that it is not listed on the other star micronics websites (only this japanese one) and you have to manually go to the Downloads section to see it.
In case the link gets broken the Android SDK you want is called:
StarIO_Android_V1000a
If you do a google search you should find it.
The link posted above to the Japanese site is broken. The latest version of the Star Android printer SDK can be found here: http://www.starmicronics.com/support/SDKDocumentation.aspx
A lan/wifi printer should work.However you should handle data flow.If you have a desktop app then things change.Do you have a desktop app or not?
I am developing an application for Android Tablet,now in my application if i select print option then data should be print in the Bluetooth printer.to achieve this first i want to know how to recognize nearest Bluetooth devices and also how to print data in a Bluetooth printer.
Have you looked at any of the Android Bluetooth Documentation?
Star Micronics has an SDK for Android printing via Bluetooth (as well as ethernet and USB). You can download it here: http://www.starmicronics.com/support/SDKDocumentation.aspx.
At this point in time, the Android OS doesn't support native printing over Bluetooth.
In my experience, it's best to use an API and not an external application. The biggest reason is you get total control over printer behavior. It's easy too if the API is built intelligently. Using an external app is limiting because you can't customize your print outs the way you want to.
The Star SDK I linked you to has a really nice sample app that lets you test and customize a lot of printer functions to see them in action. Each function is documented in the source code. The commands and their parameters are also available in the app itself as a quick on screen reference which is convenient. On top of all that, it's well documented.
If you choose this way, you can send plain text to the printer along with commands. The API handles converting the data into what the printer can understand.
Is it possible to communicate an Android application with a PIC microcontroller by the serial port? What phones of low cost can I use?
Sorry by my englisg, I'm from Colombia.
Not sure about PIC, but Arduino might be a good reference point and has a Android coupler called Amarino. Good luck.
Yes it is possible to communicate an Android application with a PIC microcontroller via Bluetooth also. Check that post here every thing written so descriptive and i test the code, they are given, it simulate in proteus.
http://www.nbcafe.in/interfacing-android-with-pic-microcontroller-via-bluetooth/
Well, it is indirectly possible via Bluetooth, that is for sure. As Peter Chuang stated, there has been some work done for interfacing Arduino boards and Android phones in the past. The exact same methodology can certainly work with a PIC microcontroller.
All you need is:
A PIC, preferably with an hardware UART to simplify coding (else software UART routines exist all over the net);
A Bluetooth serial module. An example of one would be the RN-42/RN41 from RovingNetworks (which is the basis for many Bluetooth adapters you might find on Sparkfun and other hobbyist-catering electronics stores)
An Android phone with Bluetooth.
I have actually tested such an interface myself, with a PIC18F26K22 linked to a RN-42 module, both being powered by a 3.3V linear regulator (MCP1700 3.3V). It is nearly plug and play, with baud rates easily achievable if in the low range (9600 baud and 19200 baud). As for higher baud rates, it is also possible if the PIC is clocked by a stable oscillator in the MHz range, and if the baud rate chosen corresponds to a USART BSEL register value that results in a close baud rate match between the 2 devices (which is possible because the RN-42 allows custom baud rates).
As for coding Bluetooth using Android SDK, it is a straightforward task using Google's own Bluetooth classes (BluetoothAdapter, inter alia)...
Microchip now has a PIC 24F based board that uses the Android Open Accessory (I think that's what AOA stands for) protocol over the USB port. You can buy the board (called the Android Discovery Kit or ADK) from Microchip. I believe both the Android software and the PIC software are inside the current Microchip PIC software libraries down load package.
Of course if you want to go open-souce you can go out and get the IOIO board. I believe that board uses a slightly different PIC 24F processor. And it may be using the Android debugging protocol instead of the newer AOA protocol. I think it depends on what version of the IOIO board you get. Also, I think the IOIO board can play host to either the Android (like the ADK does) as well as some (not all) bluetooth USB dongles.
You will have to "roll your own code" based on the example Android ADK code from Microchip. However, with the IOIO board, you can download a library of methods that you can call. The library abstracts the PIC features to the point of simply typing IOIO... into the Eclipse editor and having it come back with a list of matching methods. Or so I understand.
Yeah it is possible. You need to use Bluetooth chip which talks over Bluetooth SPP.
e.g. I used CSR-BC417 for more info Link to info of Bluetooth Chip
Micro-controller talks to Bluetooth chip using UART AT commands.
On other end you already have Android App like Bluetooth Chat where you can see the data coming from micro-controller and respond to it.
Download Android App
It is possible, i was using my Android smartPhone to send orders to a PIC microcontroller, you can use Bluetooth or WiFi hardware and the UART of the PIC, for example with de HC-06 bluetooth module or the Microchip's RN171XV WiFi module
about the app, i'm using this one:
https://play.google.com/store/apps/details?id=com.vagoscorp.virtualterminal
it's free and have a lot of working modes
for example instead of sending 123 as a character string '1' '2' '3', you can send it as a byte (byte value can be 0 up to 255), letting you to save and use directly the data as a number in the microcontroller ;).
You can see the received information as characters and/or bytes too (character 'A' have a byte value of 65, that's ASCII code, '1' will be 49)
I hope it will help you
Yes you can connect it. The best or easy way to connect is use HC-05 Bluetooth module. It is cheep and a loot of tutorials available make a google serch HC-05 interface pic.
Another way if you want connect through usb to serial converter you need to develop usb to serial driver or you can use a usb to serial converter chip that supports linux Driver and make a android application with these driver. If you are not a expert, I suggest to use hc-05 Bluetooth. It is a better option.