Fix copypasteo in Device.can_transmit and add tests.