| @@ -117,8 +117,23 @@ main(void) | |||||
| usb_printf("rssi: %#hx\r\n", Radio.Rssi(MODEM_LORA)); | usb_printf("rssi: %#hx\r\n", Radio.Rssi(MODEM_LORA)); | ||||
| Radio.SetRxConfig(MODEM_LORA, 0/*bandwidth*/, 7/*datarate*/, 1/*coderate*/, 0/*afc*/, 8/*preamblen*/, 5/*symTimeout*/, 0/*fixLen*/, 0/*payloadlen*/, 1/*crcOn*/, 0/*freqHop*/, 0/*hopPeriod*/, false/*iqInverted*/, true/*rxcont*/); | |||||
| Radio.SetTxConfig(MODEM_LORA, 11/*power*/, 0/*fdev*/, 0/*bandwidth*/, 7/*datarate*/, 1/*coderate*/, 8/*preamblen*/, 0/*fixLen*/, 1/*crcOn*/, 0/*freqHop*/, 0/*hopPeriod*/, false/*iqInverted*/, 1000/*timeout*/); | |||||
| /* RX/TX parameters */ | |||||
| const uint8_t modem = MODEM_LORA; | |||||
| const uint8_t bandwidth = 0 /* 128 kHz */; | |||||
| const uint8_t datarate = 7 /* 128 chips */; | |||||
| const uint8_t coderate = 1 /* 4/5 */; | |||||
| const uint8_t preambleLen = 4 /* symbols */; | |||||
| const uint8_t fixLen = 0 /* variable */; | |||||
| const uint8_t crcOn = 1 /* on */; | |||||
| const uint8_t freqHopOn = 0 /* off */; | |||||
| const bool iqInverted = false /* not inverted */; | |||||
| Radio.SetRxConfig(modem, bandwidth, datarate, coderate, 0/*afc*/, | |||||
| preambleLen, 5/*symTimeout*/, fixLen, 0/*payloadlen*/, crcOn, | |||||
| freqHopOn, 0/*hopPeriod*/, iqInverted, true/*rxcont*/); | |||||
| Radio.SetTxConfig(modem, 11/*power*/, 0/*fdev*/, bandwidth, datarate, | |||||
| coderate, preambleLen, fixLen, crcOn, freqHopOn, 0/*hopPeriod*/, | |||||
| iqInverted, 1000/*timeout*/); | |||||
| uint8_t sendmsg[] = "testing lora123"; | uint8_t sendmsg[] = "testing lora123"; | ||||