almost-working draft of IR low-level receive/transmit