Inkplate 6 PLUS peripheral mode Python read commands returning empty

Customer:

Following the GitHub example to control the Inkplate in peripheral mode via Python, I got all the send commands to work.

Now I’m trying to get the read commands to work but cannot find any reference for this.

Inverting the send command, I tried:

def read_command_from_inkplate(self):
    with serial.Serial(self.inkplate, 115200, timeout=1) as ser:
        ret = ser.readline()
        print(ret)

Previously sending the “#J(?)*” command I only get an empty answer “b’'” back.

What am I doing wrong?

Originally submitted via email support on 15 September 2024. Migrated to the forum for community visibility.

Soldered Support:

The example at Inkplate-Peripheral-Mode-Raspberry-Pi-Example/inkplate_peripheral_mode_example.py at main · SolderedElectronics/Inkplate-Peripheral-Mode-Raspberry-Pi-Example · GitHub is what you’re referring to, correct?

Reading back from Inkplate should be part of a peripheral mode example, so you’re asking a perfectly valid question. It appears this was an oversight in the example. This requires testing on real hardware to determine what needs to be done.

Soldered Support:

The example has been updated with reading the data back as well: GitHub - SolderedElectronics/Inkplate-Peripheral-Mode-Raspberry-Pi-Example: Some example code for how to drive Inkplate with a Raspberry Pi using peripheral mode · GitHub

Try that and let me know if it works for you.