我在Raspberry Pi上使用Raspbian(像OS一样使用debian) .

我的目标是打印一个文件(更好的说法:一串字符)代表"order"到ESC / POS热敏打印机(我成功使用USB连接的Epson TM-T20),为了清楚,请参阅:https://twitter.com/solyarisoftware/status/464433524310024192

因此,我使用Ruby开发了一种在Windows 7上平滑运行的ESC / POS驱动程序(使用串行端口接口),但在这里我要问使用Raspberry作为主机 .

使用Raspberry的两个问题:

Question 1: printing to a USB printer (through a USB port)

我能够将/ dev / usb / lp0打印成一个ESC / POS字节序列流,只需将/ dev / usb / lp0视为RAW FILE设备......这样做写入和读取......这是一种正确的方法吗?

Question 2: printing to a Bluetooth printer (through a bluetooth dongle)

我按照这里的建议安装了:https://www.modmypi.com/blog/installing-the-raspberry-pi-nano-bluetooth-dongle

但我仍然没有蓝牙打印机进行测试(可能是这样的:http://www.aliexpress.com/item/2-inches-ZJ-5802LD-mini-Android-Bluetooth-port-thermal-Receipt-printer-thermal-printer/1539746196.html

对不起我对蓝牙( Profiles )的无知;我可以在Linux中将蓝牙打印机视为RAW FILE,我可以直接写入字节吗?

有经验/建议吗?

谢谢!乔治