Using the Pi Zero W, Jessie Lite and python3, whenever I try to write to /dev/ttyAMA0 python hangs indefinitely (longer than the set timeout). When I stop it with Ctrl-C this is the message I get:
Code: Select all
File "/usr/local/lib/python3.4/dist-packages/serial/serialposix.py", line 553, in write
abort, ready, _ = select.select([self.pipe_abort_write_r], [self.fd], [], None)
This happens both in the python shell and when running it as a script, and I have disabled the serial console in raspi-config. This is the code I'm using, although I've tried many:
Code: Select all
import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=3.0)
port.write(b'A')
Could this be a hardware issue? The pi fell on the ground once when I took it out of the box, but I don't want to buy a new one before making sure it isn't a software issue.