|
@@ -11,12 +11,21 @@ with cc1101.CC1101() as transceiver:
|
|
transceiver.set_base_frequency_hertz(433.5e6)
|
|
transceiver.set_base_frequency_hertz(433.5e6)
|
|
transceiver.set_symbol_rate_baud(600)
|
|
transceiver.set_symbol_rate_baud(600)
|
|
# transceiver.set_sync_mode(cc1101.SyncMode.NO_PREAMBLE_AND_SYNC_WORD)
|
|
# transceiver.set_sync_mode(cc1101.SyncMode.NO_PREAMBLE_AND_SYNC_WORD)
|
|
|
|
+ # transceiver.set_sync_word(b"\x12\x34")
|
|
# transceiver.disable_checksum()
|
|
# transceiver.disable_checksum()
|
|
print(transceiver)
|
|
print(transceiver)
|
|
print("state", transceiver.get_marc_state().name)
|
|
print("state", transceiver.get_marc_state().name)
|
|
print("base frequency", transceiver.get_base_frequency_hertz(), "Hz")
|
|
print("base frequency", transceiver.get_base_frequency_hertz(), "Hz")
|
|
print("symbol rate", transceiver.get_symbol_rate_baud(), "Baud")
|
|
print("symbol rate", transceiver.get_symbol_rate_baud(), "Baud")
|
|
print("modulation format", transceiver.get_modulation_format().name)
|
|
print("modulation format", transceiver.get_modulation_format().name)
|
|
|
|
+ sync_mode = transceiver.get_sync_mode()
|
|
|
|
+ print("sync mode", sync_mode)
|
|
|
|
+ print(
|
|
|
|
+ "sync word",
|
|
|
|
+ transceiver.get_sync_word()
|
|
|
|
+ if sync_mode != cc1101.SyncMode.NO_PREAMBLE_AND_SYNC_WORD
|
|
|
|
+ else "disabled",
|
|
|
|
+ )
|
|
print("starting transmission")
|
|
print("starting transmission")
|
|
transceiver.transmit(b"\xff\xaa\x00 message")
|
|
transceiver.transmit(b"\xff\xaa\x00 message")
|
|
time.sleep(1.0)
|
|
time.sleep(1.0)
|