Printer Response January 07, 2019 09:13PM |
Registered: 6 years ago Posts: 7 |
Re: Printer Response January 07, 2019 09:42PM |
Admin Registered: 14 years ago Posts: 7,163 |
Re: Printer Response January 08, 2019 01:55AM |
Registered: 10 years ago Posts: 590 |
Re: Printer Response January 08, 2019 03:34AM |
Registered: 6 years ago Posts: 7 |
Quote
Dust
This makes zero sense.
the printer does respond with 'ok'
so there is an issue
if you notice several lines down you get the k..
There is something wrong with your code...
How about sharing your code, instead of posting the same thing again?
Re: Printer Response January 08, 2019 03:37AM |
Registered: 6 years ago Posts: 7 |
Quote
enif
Could this be that the setting of your serial connection is wrong, so that the Pi interprets the parity bit of the arriving byte to be the 8th data bit?
(That could explain why the "k" is received correctly and the "o" not - the 2 characters have different parity.)
Re: Printer Response January 08, 2019 04:14AM |
Admin Registered: 14 years ago Posts: 7,163 |
Re: Printer Response January 08, 2019 04:34AM |
Admin Registered: 14 years ago Posts: 7,163 |
Re: Printer Response January 08, 2019 07:23AM |
Registered: 6 years ago Posts: 7 |
Quote
Dust
UTF8???
we work in ascii...
Sure some of it is the same... (values under 128) ... needs looking deeper.
EDIT: On further reflection I don't think this is it...
Re: Printer Response January 28, 2019 06:59AM |
Registered: 6 years ago Posts: 7 |
Re: Printer Response January 28, 2019 09:29AM |
Registered: 7 years ago Posts: 1,902 |
printer.connect(port=port, baudrate=baudrate, profile=printer_profile["id"] if "id" in printer_profile else "_default")
self.printer = Serial(port = self.port, baudrate = self.baud, timeout = 0.25, parity = PARITY_ODD)
Re: Printer Response January 28, 2019 08:08PM |
Registered: 6 years ago Posts: 7 |