I am planning to create a system for shops. I am going to use an android tablet and a receipt printer. The printer I am planning to use does not support Android.
My question is:
Can I create a driver for the printer?
Do I need to know anything about the printer such as (chip or any other electronic stuff)
Is it difficult to create the driver?
Thanks a lot
I would try to avoid this setup. The words shop and receipt sound as if some reliability and user friendliness are required. Today, communication with printers is mostly bi-directional because they send all kinds of information back. Processing at least some of these (toner low, out of paper) would certainly help your users. Apart from that, reverse engineering a specific printer's protocol isn't necessarily fun, especially should you not be experienced with respect to printer protocols. Also, low cost printers delegate all kinds of logic to the driver because this lowers the costs for the device. I would not rely on related documentation being available.
A good indication whether the printer of your choice is suitable at all may be if it's supported by some open source printing framework. Such a framework could also be your first address for answers to related questions.
Just my two cents.
I believe that the best choice would be to firstly try some open-source printer software which might work with this printer. If any open-source software doesn't work, you would get a good understanding after going over the open-source driver for another similar printer.
You would not be needing to know information about the chip and other electronic stuff to write a driver. Although, you would need a documentation of the printer which says the protocol the printer follows.
I don't think that it should be really tough writing a driver for a printer, although it depends on how much flexible driver you want to write. If you want to write a driver which just fulfils the specialized jobs you want it to do, the driver should not be tough to write although the driver could not then be extended beyond the requirements of your application and not used for any generic use. If you want to write a generic driver which can be used to print anything, then it might not be that easy.
Are you absolutely positively have to use the specific printer model? Because if not, you may want to take a look at Google Cloud Print. You will need to have a compatible app for Android(and there's plenty of those, the list is available here) and a cloud ready printer(again, there's many of them, you can find the list here), or a conventional printer, there is a way to connect those as well.
Related
I am new to using the RPi and just got the A+ model which I have been using to generate different types of data from external sensors. I was wondering if it is possible to send this data it is gathering to an android device in real-time, and if so the best method? I want to be able to notify the user (through a an app made with the Ionic framework) when the data enters a particular range etc.
And also is it possible to do this whilst the user is walking around with both the devices in hand?
The short answer to the question is: Yes, you can ;-)
The longer answer is much longer, since there are many ways to do this.
The one I personally would choose as the simplest is classic Bluetooth (not LE) using the SPP profile, which basically makes the BT link a serial connection between the RPi and the phone.
On this serial link you invent you own streaming protocol suitable for the data you want to transfer.
On the RPi side you install a module such as this: https://www.sparkfun.com/products/12577
(There are many alternatives, but the RN42 module is very foolproof...)
Don't know the level of your hardware skills, you might need something more plug and play if you feel uncomfortable hooking up the 4 wires needed for 3.3V power and serial communications between the Pi and the BT Module...
On the phone side you install https://github.com/don/BluetoothSerial, which gives you an API reachable from Ionic where you can receive the BT data stream.
With that and a bit of coding on both sides you are good to go.
I've used a Raspberry Pi in combination with an Android smartphone & Lego NXT.
Communication was achieved using Bluetooth on Raspbian. I used a cheap $1 USB Bluetooth dongle. The Bluetooth stack had to be compiled for Raspi, which may not be necessary anymore. Steps can be found here: Bluetooth error: Native Library bluecove_arm not available
Bluetooth seems most logical to me.
I'm at work at the moment, hence the lightweight answer, if you'd like to discuss this further then please leave a comment and I'll be happy to provide more verbose response.
You can upload the data to any cloud services. You can use Xively/Box. Xively is specially made for real time data collection.
To connect RPi to Xively, refer this: https://xively.com/dev/tutorials/pi/
For Box, refer this: http://www.sbprojects.com/projects/raspberrypi/webdav.php
You can then use Xively API in your android app. You can see GitHub for this
Google app store already has some apps for you, if you want to use
It might look a little complex. But its really simple once you follow the above methods.
Is this possible? I checked out printing to an AirPrint printer from Android, but it was closed for "not being a question" (I don't really know why, it seemed like a legitimate question to me) and the only answer to it totally doesn't answer the question.
What I need is a way to print to a wireless printer on the same network (possibly intranet) via my Android device, using code. If there's no Android official SDK for it, is there a custom library anyone knows of or a possible workaround to it? Possibly using AirPrint; if PrintBot can do it, there's no reason why there shouldn't be a corresponding hack for it.
Yes, it is possible to print to an AirPrint printer from Android.
There are a number of printer apps available that claim to support AirPrint.
As of my experience they don't work very well unfortunately.
In general it's a good idea to use the Android Print API. Job transmission and potential rendering should be done by appropriate printer drivers.
In case of AirPrint the driver could send a PDF straight to the printer. If you don't want to use Androids Printservice you can use my ipp-client.
I am interested to develop bluetooth printer app for Android so please guide me how to begin
it?
Is there any free third party library for that ?
Star Micronics has an SDK for Android printing via Bluetooth (as well as ethernet, wifi, and USB). You can download it here: http://www.starmicronics.com/support/SDKDocumentation.aspx.
You can't print natively from Android at this point in time so the alternate solutions are a 3rd party API, finding a 3rd party printing app, or writing your own printer support.
In my experience, it's best to use an API and not an external app. The biggest reason is you get total control over printer behavior. Using an external app is limiting because you can't customize your print outs the way you want to. Writing a printer driver is too hard because you need to intimately know the device for perfect support... the API gives you full control over the device without all the frustration of re-engineering the whole process.
The Star SDK I linked you to has an API and a really nice sample app that lets you test and customized printer functions to see them in action. It's well documented too.
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.
hi im trying to make a POS app for android using adobe air mobile .
i have an epson thermal printer connected to a Wifi router.
i have learned that printjob won't work with the mobile apps
Please give me some solution for this
I have seen people go about this in three different ways:
Use an API from a printer manufacturer
Use a 3rd party printing app
Write your own driver
From experience, #1 is by far the best option. It's much better to use an API because it allows you full customization over print outs (font, special device commands, etc) and it reduces the amount of time you need to spend researching and coding.
3rd party printing apps are limited in customization. They might be good for a full size office or home printer, but POS printing usually has more specific requirements and often needs a level of customization these apps can't offer. Writing a driver is hard because there are so many things you need to intimately know about the printer: how to establish communication, get status, format the receipt, and more. It's like spending months to reinvent the wheel because a well-constructed API handles all of this for you.
I highly recommend you check out Star printers. They have a great Android SDK with a printing API that's full of samples and it's heavily documented. http://www.starmicronics.com/support/sdkdocumentation.aspx
i am searching for a solution to print to an Epson POS Printer from Android devices and any kind of help is needed. So am i right that JavaPOS in this case is the right solution?
I found this example JavaPOS Hello World in Java. So i guess i somehow have to create the printer connection and then use JavaPos to send the specific commands?
Does anybody have any experience in doing that and can give me a little help in starting with this?
Thanks a lot in advance!
I don't believe any printer companies have JavaPOS utilities for Android at this time.
In my experience, it's best to use an API because you get total control over printer behavior without the complex nature of JavaPOS. If you have no experience with JavaPOS, it's definitely easier to use a well-written printer manufacturer's custom API, though you wind up with support for only that manufacturer's printer. It's not necessarily a bad thing, considering supporting one type of printer is much simpler than supporting printers from multiple manufacturers. Of course, that depends on your users' demands and your support model.
I know you mentioned Epson and I believe they have an Android SDK available. An alternative is Star Micronics' SDK for Android printing via USB, ethernet, and bluetooth. I used this extensively and highly recommend it for its ease of use, thoroughness in documentation, and many supported features. You can download it here: http://www.starmicronics.com/support/SDKDocumentation.aspx.
Hsve you tried the epson JAVAPOS SDK?
https://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=5355&scat=61&pcat=52