fix typing so that python doesn't cast a 64-bit pointer to a 32-bit int
add proper support for sniffing the serial port