简体   繁体   中英

django work with a Thermal Printer in Raspberry PI

I have a website in django, I only going to visit the website using a Raspberry Pi, I need print a data, and for print I am using a Thermal Printer in the Raspberry Pi. I can print from the Raspberry pi using

("/dev/ttyAMA0",19200,timeout=5)

for obtain serial communication This work fine but only when the project is hosting local in the raspberry Pi , but the django project is hosting in a VPS with ubuntu then I have problems for printer from the Raspberry PI. because in ubuntu there are not

"/dev/ttyAMA0"

How I can work with this thermal Printer from a django project for print correctly using a RaspberryPi

install a print server on the pi and serve the printer. you may need some sort of tunnel so that the VPS can reach the pi.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM