Android: Connecting and Printing to Bixolon SPP-R200

巧了我就是萌 提交于 2019-12-12 07:57:13

问题


I would like to print to a Bixolon SPP-R200 as I've heard, it's one of the easier mobile bluetooth printers to set up with android. However I am not sure how to get started.

  1. I guess first I'd have to connect to the printer via bluetooth - I assume for this purpose I resort to the native Android bluetooth API?

  2. I'd probably need some kind of SDK to send data to the printer - I read here, that there is an SDK, but browsing the bixolon page has not yielded any results (i.e. no SDK) - I wrote to support, but I am not expecting an answer any time soon...

I guess the other questions I'd have (like: Do you send bitmaps to the printer as you can do in .Net CF?) are tightly linked to an SDK for that printer - if it exists...


回答1:


Okay, as it turned, out support was lightning fast and provided me with an Android SDK which answers the second question I had.

Said SDK comes with a a sample project as well as a user manual and an API of the SDK (Unfortunately the SDK jar file contains no javadoc...). I have to say the SDK API is ... poorly written and lacks depth, aside from that, some methods used in the sample project are not covered at all (such as "initialize" which I thought sounds rather important and mandatory...). However when looking at the sample you get an idea about how to use the SDK. It covers everything from connecting via Wifi, USB or bluetooth (which answers my first question).

If anyone is in need of the SDK/Sample Project, I suggest dropping the bixolon support guy's an email via techsupp@bixolon.de for receiving the most up-to-date SDK. I did NOT find the android SDK on Bixolon's website! The only SDK I found was .Net related.

UPDATE

On an Additional note: Turns out one does not really need the SDK. We dumped the SDK and instead, created two threads: One that accepts connection requests (to connect to the printer) and another one, which (once a connection has been established) has a BluetoothSocket and writes to it/reads from it. This has the advantage, that we can use it with any mobile printer, as it is not Bixolon-specific anymore.

For more Bluetooth-related infos check out this Q&A where I documented the steps to get the Bixolon (and Fujitsu) to communicate with android devices.

UPDATE 2

Since I passed by this post recently, and looked it up, here is some additional links for the Bixolon SPP-R200:

  • Downloads for Bixolon SPP-R200 (drivers, manuals, command manuals etc...)
  • Product Overview Bixolon SPP-R220
  • There is a Q&A section in Bixolon's website here. However you need to create an account first to see the answers in the Q&A section. If you type "android" in the search box a few answers pop up - however since I have no account, I did not read them - but it might be worth a shot



回答2:


I've been working with this JAR (Dated 2014) that may be help. However, it is possible that the easier solution could be sending ESC sequences via the bluetooth serial port. So, in this point if your are creating a Phonegap App, you can use from this Plugin the Chat sample and send ESC sequences (documentation about printer ESC secuences available too).



来源:https://stackoverflow.com/questions/8702888/android-connecting-and-printing-to-bixolon-spp-r200

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!