SX1276 Class
- ID: sx1276
- Name: SX1276 LoRa/FSK Modem
- Other Names: SX1277 SX1278 SX1279
- Category: wifi
- Manufacturer: semtech
- Connection: spi gpio
- Link: http://www.digikey.com/product-search/en?vendor=0&keywords=SX1276MB1LAS
The SX1276 is a FSK/OOK/LoRa modem capable of both Low Frequency and High Frequency communication.
It requires a 3.3v power supply, do not use 5v.
Frequency Hopping Spread Spectrum (FHSS) is not currently supported.
While not all of the functionality of this device is supported initially, methods and register definitions are provided that should allow an end user to implement whatever features are required.
FSK send/receive example LORA send/receive example
Item Index
Methods
Properties
- modem
- state
- channel
- fskSettings
- fskPacketHandler
- loraSettings
- loraPacketHandler
- MODEM_LORA
- MODEM_FSK
- REVENT_DONE
- REVENT_EXEC
- REVENT_ERROR
- REVENT_TIMEOUT
- COM_RegFifo
- COM_RegOpMode
- FSK_RegBitrateMsb
- LOR_Reserved02
- FSK_RegBitrateLsb
- LOR_Reserved03
- FSK_RegFdevMsb
- LOR_Reserved04
- FSK_RegFdevLsb
- LOR_Reserved05
- COM_RegFrfMsb
- COM_RegFrfMid
- COM_RegFrfLsb
- COM_RegPaConfig
- COM_RegPaRamp
- COM_RegOcp
- COM_RegLna
- FSK_RegRxConfig
- LOR_RegFifoAddrPtr
- FSK_RegRssiConfg
- LOR_RegFifoTxBaseAddr
- FSK_RegRssiCollision
- LOR_RegFifoRxBaseAddr
- FSK_RegRssiThresh
- LOR_RegFifoRxCurrentAddr
- FSK_RegRssiValue
- LOR_RegIrqFlagsMask
- FSK_RegRxBw
- LOR_RegIrqFlags
- FSK_RegAfcBw
- LOR_RegRxNbBytes
- FSK_RegOokPeak
- LOR_RegRxHeaderCntValueMsb
- FSK_RegOokFix
- LOR_RegRxHeaderCntValueLsb
- FSK_RegOokAvg
- LOR_RegRxPacketCntValueMsb
- FSK_Reserved17
- LOR_RegRxPacketCntValueLsb
- FSK_Reserved18
- LOR_RegModemStat
- FSK_Reserved19
- LOR_RegPktSnrValue
- FSK_RegAfcFei
- LOR_RegPktRssiValue
- FSK_RegAfcMsb
- LOR_RegRssiValue
- FSK_RegAfcLsb
- LOR_RegHopChannel
- FSK_RegFeiMsb
- LOR_RegModemConfig1
- FSK_RegFeiLsb
- LOR_RegModemConfig2
- FSK_RegPreambleDetect
- LOR_RegSymbTimeoutLsb
- FSK_RegRxTimeout1
- LOR_RegPreambleMsb
- FSK_RegRxTimeout2
- LOR_RegPreambleLsb
- FSK_RegRxTimeout3
- LOR_RegPayloadLength
- FSK_RegRxDelay
- LOR_RegMaxPayloadLength
- FSK_RegOsc
- LOR_RegHopPeriod
- FSK_RegPreambleMsb
- LOR_RegFifoRxByteAddr
- FSK_RegPreambleLsb
- LOR_RegModemConfig3
- FSK_RegSyncConfig
- LOR_Reserved27
- FSK_RegSyncValue1
- LOR_RegFeiMsb
- FSK_RegSyncValue2
- LOR_RegFeiMid
- FSK_RegSyncValue3
- LOR_RegFeiLsb
- FSK_RegSyncValue4
- LOR_Reserved2b
- FSK_RegSyncValue5
- LOR_RegRssiWideband
- FSK_RegSyncValue6
- LOR_Reserved2d
- FSK_RegSyncValue7
- LOR_Reserved2e
- FSK_RegSyncValue8
- LOR_Reserved2f
- FSK_RegPacketConfig1
- LOR_Reserved30
- FSK_RegPacketConfig2
- LOR_RegDetectOptimize
- FSK_RegPayloadLength
- LOR_Reserved32
- FSK_RegNodeAddr
- LOR_RegInvertIQ
- FSK_RegBroadcastAddr
- LOR_Reserved34
- FSK_RegFifoThresh
- LOR_Reserved35
- FSK_RegSeqConfig1
- LOR_Reserved36
- FSK_RegSeqConfig2
- LOR_RegDetectionThreshold
- FSK_RegTimerResol
- LOR_Reserved38
- FSK_RegTimer1Coeff
- LOR_RegSyncWord
- FSK_RegTimer2Coeff
- LOR_Reserved3a
- FSK_RegImageCal
- LOR_Reserved3b
- LOR_RegInvertIQ2
- FSK_RegTemp
- LOR_Reserved3c
- FSK_RegLowBat
- LOR_Reserved3d
- FSK_RegIrqFlags1
- LOR_Reserved3e
- FSK_RegIrqFlags2
- LOR_Reserved3f
- COM_RegDioMapping1
- COM_RegDioMapping2
- COM_RegVersion
- FSK_Reserved44
- LOR_RegPllHop
- COM_RegTcxo
- COM_RegPaDac
- COM_RegFormerTemp
- FSK_RegBitRateFrac
- LOR_Reserved5d
- COM_RegAgcRef
- COM_RegAgcThresh1
- COM_RegAgcThresh2
- COM_RegAgcThresh3
- COM_RegPll
- OPMODE_Mode0
- OPMODE_Mode1
- OPMODE_Mode2
- _OPMODE_Mode_MASK
- _OPMODE_Mode_SHIFT
- OPMODE_LowFrequencyModeOn
- OPMODE_FSK_ModulationType0
- OPMODE_FSK_ModulationType1
- _OPMODE_FSK_ModulationType_MASK
- _OPMODE_FSK_ModulationType_SHIFT
- OPMODE_LOR_Reserved0x20
- OPMODE_LOR_AccessSharedReg
- OPMODE_LongRangeMode
- MODE_Sleep
- MODE_Standby
- MODE_FSTX
- MODE_TxMode
- MODE_FSRX
- MODE_FSK_RxMode
- MODE_LOR_RxContinuous
- MODE_FSK_Reserved6
- MODE_LOR_RxSingle
- MODE_FSK_Reserved7
- MODE_LOR_CAD
- MODULATION_FSK
- MODULATION_OOK
- PACONFIG_OutputPower0
- PACONFIG_OutputPower1
- PACONFIG_OutputPower2
- PACONFIG_OutputPower3
- _PACONFIG_OutputPower_MASK
- _PACONFIG_OutputPower_SHIFT
- PACONFIG_MaxPower0
- PACONFIG_MaxPower1
- PACONFIG_MaxPower2
- _PACONFIG_MaxPower_MASK
- _PACONFIG_MaxPower_SHIFT
- PACONFIG_PaSelect
- PARAMP_PaRamp0
- PARAMP_PaRamp1
- PARAMP_PaRamp2
- PARAMP_PaRamp3
- _PARAMP_PaRamp_MASK
- _PARAMP_PaRamp_SHIFT
- PARAMP_FSK_ModulationShaping0
- PARAMP_FSK_ModulationShaping1
- _PARAMP_FSK_ModulationShaping_MASK
- _PARAMP_FSK_ModulationShaping_SHIFT
- PARAMP_3_4MS
- PARAMP_2MS
- PARAMP_1MS
- PARAMP_500US
- PARAMP_250US
- PARAMP_125US
- PARAMP_100US
- PARAMP_62US
- PARAMP_50US
- PARAMP_40US
- PARAMP_31US
- PARAMP_25US
- PARAMP_20US
- PARAMP_15US
- PARAMP_12US
- PARAMP_10US
- MODSHAPING_NOSHAPING
- MODSHAPING_FSK_GaussianFilterBT1
- MODSHAPING_FSK_GaussianFilterBT05
- MODSHAPING_FSK_GaussianFilterBT03
- MODSHAPING_OOK_FCutoffBitRate
- MODSHAPING_OOK_FCutoffBitRate2
- OCP_OcpTrim0
- OCP_OcpTrim1
- OCP_OcpTrim2
- OCP_OcpTrim3
- _OCP_OcpTrim_MASK
- _OCP_OcpTrim_SHIFT
- OCP_OcpOn
- LNA_LnaBoostHf0
- LNA_LnaBoostHf1
- _LNA_LnaBoostHf_MASK
- _LNA_LnaBoostHf_SHIFT
- LNA_LnaBoostLf0
- LNA_LnaBoostLf1
- _LNA_LnaBoostLf_MASK
- _LNA_LnaBoostLf_SHIFT
- LNA_LnaGain0
- LNA_LnaGain1
- LNA_LnaGain2
- _LNA_LnaGain_MASK
- _LNA_LnaGain_SHIFT
- LNABOOSTHF_Default
- LNABOOSTHF_BoostOn
- LNABOOSTLF_Default
- LNAGAIN_G1
- LNAGAIN_G2
- LNAGAIN_G3
- LNAGAIN_G4
- LNAGAIN_G5
- LNAGAIN_G6
- RXCONFIG_RxTrigger0
- RXCONFIG_RxTrigger1
- RXCONFIG_RxTrigger2
- _RXCONFIG_RxTrigger_MASK
- _RXCONFIG_RxTrigger_SHIFT
- RXCONFIG_AgcAutoOn
- RXCONFIG_AfcAutoOn
- RXCONFIG_RestartRxWithPllLock
- RXCONFIG_RestartRxWithoutPllLock
- RXCONFIG_RestartRxOnCollision
- RSSICONFIG_RssiSmoothing0
- RSSICONFIG_RssiSmoothing1
- RSSICONFIG_RssiSmoothing2
- _RSSICONFIG_RssiSmoothing_MASK
- _RSSICONFIG_RssiSmoothing_SHIFT
- RSSICONFIG_RssiOffset0
- RSSICONFIG_RssiOffset1
- RSSICONFIG_RssiOffset2
- RSSICONFIG_RssiOffset3
- RSSICONFIG_RssiOffset4
- _RSSICONFIG_RssiOffset_MASK
- _RSSICONFIG_RssiOffset_SHIFT
- RSSISMOOTHING_2
- RSSISMOOTHING_4
- RSSISMOOTHING_8
- RSSISMOOTHING_16
- RSSISMOOTHING_32
- RSSISMOOTHING_64
- RSSISMOOTHING_128
- RSSISMOOTHING_256
- LOR_IRQFLAG_CadDetected
- LOR_IRQFLAG_FhssChangeChannel
- LOR_IRQFLAG_CadDone
- LOR_IRQFLAG_TxDone
- LOR_IRQFLAG_ValidHeader
- LOR_IRQFLAG_PayloadCrcError
- LOR_IRQFLAG_RxDone
- LOR_IRQFLAG_RxTimeout
- RXBW_RxBwExp0
- RXBW_RxBwExp1
- RXBW_RxBwExp2
- _RXBW_RxBwExp_MASK
- _RXBW_RxBwExp_SHIFT
- RXBW_RxBwMant0
- RXBW_RxBwMant1
- _RXBW_RxBwMant_MASK
- _RXBW_RxBwMant_SHIFT
- RXBWMANT_0
- RXBWMANT_1
- RXBWMANT_2
- RXBWEXP_1
- RXBWEXP_2
- RXBWEXP_3
- RXBWEXP_4
- RXBWEXP_5
- RXBWEXP_6
- RXBWEXP_7
- OOKPEAK_OokPeakThreshStep0
- OOKPEAK_OokPeakThreshStep1
- OOKPEAK_OokPeakThreshStep2
- _OOKPEAK_OokPeakThreshStep_MASK
- _OOKPEAK_OokPeakThreshStep_SHIFT
- OOKPEAK_OokThreshType0
- OOKPEAK_OokThreshType1
- _OOKPEAK_OokThreshType_MASK
- _OOKPEAK_OokThreshType_SHIFT
- OOKPEAK_BitSyncOn
- OOKPEAKTHRESHSTEP_05dB
- OOKPEAKTHRESHSTEP_1dB
- OOKPEAKTHRESHSTEP_15dB
- OOKPEAKTHRESHSTEP_2dB
- OOKPEAKTHRESHSTEP_3dB
- OOKPEAKTHRESHSTEP_4dB
- OOKPEAKTHRESHSTEP_5dB
- OOKPEAKTHRESHSTEP_6dB
- OOKTHRESHTYPE_FIXED
- OOKTHRESHTYPE_PEAK
- OOKTHRESHTYPE_AVERAGE
- OOKAVG_OokAvgThreshFilt0
- OOKAVG_OokAvgThreshFilt1
- _OOKAVG_OokAvgThreshFilt_MASK
- _OOKAVG_OokAvgThreshFilt_SHIFT
- OOKAVG_OokAvgOffset0
- OOKAVG_OokAvgOffset1
- _OOKAVG_OokAvgOffset_MASK
- _OOKAVG_OokAvgOffset_SHIFT
- OOKAVG_OokPeakThreshDec0
- OOKAVG_OokPeakThreshDec1
- OOKAVG_OokPeakThreshDec2
- _OOKAVG_OokPeakThreshDec_MASK
- _OOKAVG_OokPeakThreshDec_SHIFT
- OOKAVGTHRESHFILT_32
- OOKAVGTHRESHFILT_8
- OOKAVGTHRESHFILT_4
- OOKAVGTHRESHFILT_2
- OOKAVGOFFSET_0
- OOKAVGOFFSET_2
- OOKAVGOFFSET_4
- OOKAVGOFFSET_6
- OOKPEAKTHRESHDEC_1_1
- OOKPEAKTHRESHDEC_1_2
- OOKPEAKTHRESHDEC_1_4
- OOKPEAKTHRESHDEC_1_8
- OOKPEAKTHRESHDEC_2_1
- OOKPEAKTHRESHDEC_4_1
- OOKPEAKTHRESHDEC_8_1
- OOKPEAKTHRESHDEC_16_1
- MODEMSTAT_SignalDetected
- MODEMSTAT_SignalSynchronized
- MODEMSTAT_RxOngoing
- MODEMSTAT_HeaderInfoValid
- MODEMSTAT_ModemClear
- MODEMSTAT_RxCodingRate0
- MODEMSTAT_RxCodingRate1
- MODEMSTAT_RxCodingRate2
- _MODEMSTAT_RxCodingRate_MASK
- _MODEMSTAT_RxCodingRate_SHIFT
- AFCFEI_AfcAutoClearOn
- AFCFEI_AfcClear
- AFCFEI_AgcStart
- HOPCHANNEL_FhssPresentChannel0
- HOPCHANNEL_FhssPresentChannel1
- HOPCHANNEL_FhssPresentChannel2
- HOPCHANNEL_FhssPresentChannel3
- HOPCHANNEL_FhssPresentChannel4
- HOPCHANNEL_FhssPresentChannel5
- _HOPCHANNEL_FhssPresentChannel_MASK
- _HOPCHANNEL_FhssPresentChannel_SHIFT
- HOPCHANNEL_CrcOnPayload
- HOPCHANNEL_PllTimeout
- MODEMCONFIG1_ImplicitHeaderModeOn
- MODEMCONFIG1_CodingRate0
- MODEMCONFIG1_CodingRate1
- MODEMCONFIG1_CodingRate2
- _MODEMCONFIG1_CodingRate_MASK
- _MODEMCONFIG1_CodingRate_SHIFT
- MODEMCONFIG1_Bw0
- MODEMCONFIG1_Bw1
- MODEMCONFIG1_Bw2
- MODEMCONFIG1_Bw3
- _MODEMCONFIG1_Bw_MASK
- _MODEMCONFIG1_Bw_SHIFT
- CODINGRATE_4_5
- CODINGRATE_4_6
- CODINGRATE_4_7
- CODINGRATE_4_8
- BW_7_8
- BW_10_4
- BW_15_6
- BW_20_8
- BW_31_25
- BW_41_7
- BW_62_5
- BW_125
- BW_250
- BW_500
- MODEMCONFIG2_SymbTimeoutMsb0
- MODEMCONFIG2_SymbTimeoutMsb1
- _MODEMCONFIG2_SymbTimeoutMsb_MASK
- _MODEMCONFIG2_SymbTimeoutMsb_SHIFT
- MODEMCONFIG2_RxPayloadCrcOn
- MODEMCONFIG2_TxContinuousMode
- MODEMCONFIG2_SpreadingFactor0
- MODEMCONFIG2_SpreadingFactor1
- MODEMCONFIG2_SpreadingFactor2
- MODEMCONFIG2_SpreadingFactor3
- _MODEMCONFIG2_SpreadingFactor_MASK
- _MODEMCONFIG2_SpreadingFactor_SHIFT
- SPREADINGFACTOR_64
- SPREADINGFACTOR_128
- SPREADINGFACTOR_256
- SPREADINGFACTOR_512
- SPREADINGFACTOR_1024
- SPREADINGFACTOR_2048
- SPREADINGFACTOR_4096
- PREABLEDETECT_PreambleDetectorTol0
- PREABLEDETECT_PreambleDetectorTol1
- PREABLEDETECT_PreambleDetectorTol2
- PREABLEDETECT_PreambleDetectorTol3
- PREABLEDETECT_PreambleDetectorTol4
- _PREABLEDETECT_PreambleDetectorTol4_MASK
- _PREABLEDETECT_PreambleDetectorTol4_SHIFT
- PREABLEDETECT_PreambleDetectorSize0
- PREABLEDETECT_PreambleDetectorSize1
- _PREABLEDETECT_PreambleDetectorSize_MASK
- _PREABLEDETECT_PreambleDetectorSize_SHIFT
- PREABLEDETECT_PreambleDetectorOn
- PREAMBLEDETECTORSIZE_1
- PREAMBLEDETECTORSIZE_2
- PREAMBLEDETECTORSIZE_3
- OSC_ClkOut0
- OSC_ClkOut1
- OSC_ClkOut2
- _OSC_ClkOut_MASK
- _OSC_ClkOut_SHIFT
- OSC_RcCalStart
- CLKOUT_1
- CLKOUT_2
- CLKOUT_4
- CLKOUT_8
- CLKOUT_16
- CLKOUT_32
- CLKOUT_RC
- CLKOUT_OFF
- MODEMCONFIG3_AgcAutoOn
- MODEMCONFIG3_LowDataRateOptimize
- SYNCCONFIG_SyncSize0
- SYNCCONFIG_SyncSize1
- SYNCCONFIG_SyncSize2
- _SYNCCONFIG_SyncSize_MASK
- _SYNCCONFIG_SyncSize_SHIFT
- SYNCCONFIG_SyncOn
- SYNCCONFIG_PreamblePolarity
- SYNCCONFIG_AutoRestartMode0
- SYNCCONFIG_AutoRestartMode1
- _SYNCCONFIG_AutoRestartMode_MASK
- _SYNCCONFIG_AutoRestartMode_SHIFT
- AUTORESTARTMODE_OFF
- AUTORESTARTMODE_ON_NOPLL
- AUTORESTARTMODE_ON_PLL
- FEIMSB_FreqError0
- FEIMSB_FreqError1
- FEIMSB_FreqError2
- FEIMSB_FreqError3
- _FEIMSB_FreqError_MASK
- _FEIMSB_FreqError_SHIFT
- PACKETCONFIG1_CrcWhiteningType
- PACKETCONFIG1_AddressFiltering0
- PACKETCONFIG1_AddressFiltering1
- _PACKETCONFIG1_AddressFiltering_MASK
- _PACKETCONFIG1_AddressFiltering_SHIFT
- PACKETCONFIG1_CrcAutoClearOff
- PACKETCONFIG1_CrcOn
- PACKETCONFIG1_DcFree0
- PACKETCONFIG1_DcFree1
- _PACKETCONFIG1_DcFree_MASK
- _PACKETCONFIG1_DcFree_SHIFT
- PACKETCONFIG1_PacketFormat
- ADDRESSFILTERING_NONE
- ADDRESSFILTERING_NODE
- ADDRESSFILTERING_NODE_BROADCAST
- DCFREE_NONE
- DCFREE_MANCHESTER
- DCFREE_WHITENING
- PACKETCONFIG2_PayloadLengthMsb0
- PACKETCONFIG2_PayloadLengthMsb1
- PACKETCONFIG2_PayloadLengthMsb2
- _PACKETCONFIG2_PayloadLengthMsb_MASK
- _PACKETCONFIG2_PayloadLengthMsb_SHIFT
- PACKETCONFIG2_BeaconOn
- PACKETCONFIG2_IoHomeOn
- PACKETCONFIG2_DataMode
- DETECTOPTIMIZE_DetectionOptimize0
- DETECTOPTIMIZE_DetectionOptimize1
- DETECTOPTIMIZE_DetectionOptimize2
- _DETECTOPTIMIZE_DetectionOptimize_MASK
- _DETECTOPTIMIZE_DetectionOptimize_SHIFT
- DETECTIONOPTIMIZE_SF7_SF12
- DETECTIONOPTIMIZE_SF6
- INVERTIQ_InvertIQTxOff
- INVERTIQ_InvertIQRx
- FIFOTHRESH_FifoThreshold0
- FIFOTHRESH_FifoThreshold1
- FIFOTHRESH_FifoThreshold2
- FIFOTHRESH_FifoThreshold3
- FIFOTHRESH_FifoThreshold4
- FIFOTHRESH_FifoThreshold5
- _FIFOTHRESH_FifoThreshold_MASK
- _FIFOTHRESH_FifoThreshold_SHIFT
- FIFOTHRESH_TxStartCondition
- SEQCONFIG1_FromTransit
- SEQCONFIG1_FromIdle
- SEQCONFIG1_LowPowerSelection
- SEQCONFIG1_FromStart0
- SEQCONFIG1_FromStart1
- _SEQCONFIG1_FromStart_MASK
- _SEQCONFIG1_FromStart_SHIFT
- SEQCONFIG1_IdleMode
- SEQCONFIG1_SequencerStop
- SEQCONFIG1_SequencerStart
- FROMSTART_ToLowPowerSelection
- FROMSTART_ToReceiveState
- FROMSTART_ToTransmitState
- FROMSTART_ToTransmitStateOnFifoLevel
- SEQCONFIG2_FromPacketReceived0
- SEQCONFIG2_FromPacketReceived1
- SEQCONFIG2_FromPacketReceived2
- _SEQCONFIG2_FromPacketReceived_MASK
- _SEQCONFIG2_FromPacketReceived_SHIFT
- SEQCONFIG2_FromRxTimeout0
- SEQCONFIG2_FromRxTimeout1
- _SEQCONFIG2_FromRxTimeout_MASK
- _SEQCONFIG2_FromRxTimeout_SHIFT
- SEQCONFIG2_FromReceive0
- SEQCONFIG2_FromReceive1
- SEQCONFIG2_FromReceive2
- _SEQCONFIG2_FromReceive_MASK
- _SEQCONFIG2_FromReceive_SHIFT
- FROMPACKETRECEIVED_ToSequencerOff
- FROMPACKETRECEIVED_ToTransmitStateOnFifoEmpty
- FROMPACKETRECEIVED_ToLowPowerSelection
- FROMPACKETRECEIVED_ToReceiveViaFS
- FROMPACKETRECEIVED_ToReceive
- FROMRXTIMEOUT_ToReceiveViaReceiveStart
- FROMRXTIMEOUT_ToTransmitState
- FROMRXTIMEOUT_ToLowPowerSelection
- FROMRXTIMEOUT_ToSequencerOffState
- FROMRECEIVE_ToPcketReceived
- FROMRECEIVE_ToLowPowerSelection
- FROMRECEIVE_ToPacketReceived
- FROMRECEIVE_ToSequencerOffOnRSSI
- FROMRECEIVE_ToSequencerOffOnSync
- FROMRECEIVE_ToSequencerOffOnPreambleDetect
- TIMERRESOL_Timer2Resolution0
- TIMERRESOL_Timer2Resolution1
- _TIMERRESOL_Timer2Resolution_MASK
- _TIMERRESOL_Timer2Resolution_SHIFT
- TIMERRESOL_Timer1Resolution0
- TIMERRESOL_Timer1Resolution1
- _TIMERRESOL_Timer1Resolution_MASK
- _TIMERRESOL_Timer1Resolution_SHIFT
- TIMERRESOLUTION_DISABLED
- TIMERRESOLUTION_64us
- TIMERRESOLUTION_4_1ms
- TIMERRESOLUTION_262ms
- IMAGECAL_TempMonitorOff
- IMAGECAL_TempThreshold0
- IMAGECAL_TempThreshold1
- _IMAGECAL_TempThreshold_MASK
- _IMAGECAL_TempThreshold_SHIFT
- IMAGECAL_TenpChange
- IMAGECAL_ImageCalRunning
- IMAGECAL_ImageCalStart
- IMAGECAL_AutoImageCalOn
- TEMPTHRESHOLD_5C
- TEMPTHRESHOLD_10C
- TEMPTHRESHOLD_15C
- TEMPTHRESHOLD_20C
- LOWBAT_LowBatTrim0
- LOWBAT_LowBatTrim1
- LOWBAT_LowBatTrim2
- _LOWBAT_LowBatTrim_MASK
- _LOWBAT_LowBatTrim_SHIFT
- LOWBAT_LowBatOn
- LOWBATTRIM_1_695
- LOWBATTRIM_1_764
- LOWBATTRIM_1_835
- LOWBATTRIM_1_905
- LOWBATTRIM_1_976
- LOWBATTRIM_2_045
- LOWBATTRIM_2_116
- LOWBATTRIM_2_185
- IRQFLAGS1_SyncAddressMatch
- IRQFLAGS1_PreambleDetect
- IRQFLAGS1_Timeout
- IRQFLAGS1_Rssi
- IRQFLAGS1_PllLock
- IRQFLAGS1_TxReady
- IRQFLAGS1_RxReady
- IRQFLAGS1_ModeReady
- IRQFLAGS2_LowBat
- IRQFLAGS2_CrcOk
- IRQFLAGS2_PayloadReady
- IRQFLAGS2_PacketSent
- IRQFLAGS2_FifoOverrun
- IRQFLAGS2_FifoLevel
- IRQFLAGS2_FifoEmpty
- IRQFLAGS2_FifoFull
- DOIMAPPING1_Dio3Mapping0
- DOIMAPPING1_Dio3Mapping1
- DOIMAPPING1_Dio3Mapping_MASK
- DOIMAPPING1_Dio3Mapping_SHIFT
- DOIMAPPING1_Dio2Mapping0
- DOIMAPPING1_Dio2Mapping1
- DOIMAPPING1_Dio2Mapping_MASK
- DOIMAPPING1_Dio2Mapping_SHIFT
- DOIMAPPING1_Dio1Mapping0
- DOIMAPPING1_Dio1Mapping1
- DOIMAPPING1_Dio1Mapping_MASK
- DOIMAPPING1_Dio1Mapping_SHIFT
- DOIMAPPING1_Dio0Mapping0
- DOIMAPPING1_Dio0Mapping1
- DOIMAPPING1_Dio0Mapping_MASK
- DOIMAPPING1_Dio0Mapping_SHIFT
- DOIMAPPING2_MapPreambleDetect
- DOIMAPPING2_Dio5Mapping0
- DOIMAPPING2_Dio5Mapping1
- DOIMAPPING2_Dio5Mapping_MASK
- DOIMAPPING2_Dio5Mapping_SHIFT
- DOIMAPPING2_Dio4Mapping0
- DOIMAPPING2_Dio4Mapping1
- DOIMAPPING2_Dio4Mapping_MASK
- DOIMAPPING2_Dio4Mapping_SHIFT
- DIOMAPPING_00
- DIOMAPPING_01
- DIOMAPPING_10
- DIOMAPPING_11
- PLLHOP_FastHopOn
- TCXO_TcxoOn
- PADAC_PaDac0
- PADAC_PaDac1
- PADAC_PaDac2
- _PADAC_PaDac_MASK
- _PADAC_PaDac_SHIFT
- PADAC_DEFAULT
- PADAC_BOOST
- BITRATEFRAC_BitRateFrac0
- BITRATEFRAC_BitRateFrac1
- BITRATEFRAC_BitRateFrac2
- BITRATEFRAC_BitRateFrac3
- _BITRATEFRAC_BitRateFrac_MASK
- _BITRATEFRAC_BitRateFrac_SHIFT
- AGCREF_AgcReferenceLevel0
- AGCREF_AgcReferenceLevel1
- AGCREF_AgcReferenceLevel2
- AGCREF_AgcReferenceLevel3
- AGCREF_AgcReferenceLevel4
- AGCREF_AgcReferenceLevel5
- _AGCREF_AgcReferenceLevel_MASK
- _AGCREF_AgcReferenceLevel_SHIFT
- AGCTHRESH1_AcgStep10
- AGCTHRESH1_AcgStep11
- AGCTHRESH1_AcgStep12
- AGCTHRESH1_AcgStep13
- _AGCTHRESH1_AcgStep1_MASK
- _AGCTHRESH1_AcgStep1_SHIFT
- AGCTHRESH2_AcgStep30
- AGCTHRESH2_AcgStep31
- AGCTHRESH2_AcgStep32
- AGCTHRESH2_AcgStep33
- _AGCTHRESH2_AcgStep3_MASK
- _AGCTHRESH2_AcgStep3_SHIFT
- AGCTHRESH2_AcgStep20
- AGCTHRESH2_AcgStep21
- AGCTHRESH2_AcgStep22
- AGCTHRESH2_AcgStep23
- _AGCTHRESH2_AcgStep2_MASK
- _AGCTHRESH2_AcgStep2_SHIFT
- LOR_DetectionThreshold_SF7_SF12
- LOR_DetectionThreshold_SF6
- AGCTHRESH3_AcgStep50
- AGCTHRESH3_AcgStep51
- AGCTHRESH3_AcgStep52
- AGCTHRESH3_AcgStep53
- _AGCTHRESH3_AcgStep5_MASK
- _AGCTHRESH3_AcgStep5_SHIFT
- AGCTHRESH3_AcgStep40
- AGCTHRESH3_AcgStep41
- AGCTHRESH3_AcgStep42
- AGCTHRESH3_AcgStep43
- _AGCTHRESH3_AcgStep4_MASK
- _AGCTHRESH3_AcgStep4_SHIFT
Methods
SX1276
-
chipRev
-
bus
-
cs
-
resetPin
-
dio0
-
dio1
-
dio2
-
dio3
-
dio4
-
dio5
SX1276 constructor
Since this is a shield, you will not have much choice as to what pins are used.
Parameters:
-
chipRev
Numberchip revision, default is 0x12
-
bus
Numberspi bus to use
-
cs
NumberGPIO pin to use as SPI Chip Select
-
resetPin
NumberGPIO pin to use as reset (A0=GPIO14)
-
dio0
NumberGPIO pin to use as reset DIO0 intr
-
dio1
NumberGPIO pin to use as reset DIO1 intr
-
dio2
NumberGPIO pin to use as reset DIO2 intr
-
dio3
NumberGPIO pin to use as reset DIO3 intr
-
dio4
NumberGPIO pin to use as reset DIO4 intr
-
dio5
NumberGPIO pin to use as reset DIO5 intr
Returns:
readReg
-
reg
read a register
Parameters:
-
reg
Numberthe register to read
Returns:
the value of the register
writeReg
-
reg
-
val
write to a register
Parameters:
-
reg
Numberthe register to write to
-
val
Numberthe value to write
Returns:
true if successful, false otherwise
getChipVersion
()
Number
return the chip revision
Returns:
the chip revision (usually 0x12)
reset
()
reset the modem
readFifo
-
buffer
-
len
read the FIFO into a buffer
Parameters:
-
buffer
Uint8_t *The buffer to read data into
-
len
NumberThe length of the buffer
writeFifo
-
buffer
-
len
write a buffer into the FIFO
Parameters:
-
buffer
Uint8_t *The buffer containing the data to write
-
len
NumberThe length of the buffer
setChannel
-
freq
Set the frequency to transmit and receive on
Parameters:
-
freq
NumberThe frequency to set
setOpMode
-
opMode
Set the operating mode
Parameters:
-
opMode
MODE_TOne of the MODE_T values
setModem
-
modem
Set the modem to access. This can be either the LORA or KSK/OOK modem.
Parameters:
-
modem
RADIO_MODEM_TOne of the MODEM_T values
setSleep
()
Place the SX1276 into sleep mode
setStandby
()
Place the SX1276 into standby mode
getRSSI
-
modem
Return the current Received Signal Strength Indicator for the given modem
Parameters:
-
modem
RADIO_MODEM_TOne of the MODEM_T values
Returns:
isChannelFree
-
modem
-
freq
-
rssiThresh
Check to see if a given channel is free by comparing the RSSI to the supplied threshold.
Parameters:
-
modem
RADIO_MODEM_TOne of the MODEM_T values
-
freq
NumberThe channel to check
-
rssiThresh
NumberThe RSSI threshold, over which the channel os considerd in use.
Returns:
sendStr
-
buffer
-
timeout
Send the supplied string. This writes the string into the FIFO and places the modem in transmit mode (via setTx()). This is a wrapper around send() .
Parameters:
-
buffer
StringThe buffer to send
-
timeout
NumberThe timeout in milliseconds
Returns:
one of the RADIO_EVENT_T values
send
-
buffer
-
size
-
timeout
Send the supplied buffer. The writes the buffer into the FIFO and places the modem in transmit mode (via setTx()).
Parameters:
-
buffer
Uint8_t *The buffer to send
-
size
NumberThe size of the buffer
-
timeout
NumberThe timeout in milliseconds
Returns:
one of the RADIO_EVENT_T values
setRxConfig
-
modem
-
bandwidth
-
datarate
-
coderate
-
bandwidthAfc
-
preambleLen
-
symbTimeout
-
fixLen
-
payloadLen
-
crcOn
-
freqHopOn
-
hopPeriod
-
iqInverted
-
rxContinuous
Set the receive configuration for a modem. It is important that both the receive and transmit configurations match in order for communication to work between two radios.
Parameters:
-
modem
RADIO_MODEM_TOne of the MODEM_T values
-
bandwidth
NumberThe bandwidth to use. Valid values are FSK : >= 2600 and <= 250000 Hz LoRa: [125 kHz, 250 kHz, 500 kHz]
-
datarate
NumberSets the Datarate FSK : 600..300000 bits/s LoRa: [6: 64, 7: 128, 8: 256, 9: 512, 10: 1024, 11: 2048, 12: 4096 chips]
-
coderate
NumberSets the coding rate (LoRa only) FSK : N/A ( set to 0 ) LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
-
bandwidthAfc
NumberSets the AFC Bandwidth (FSK only) FSK : >= 2600 and <= 250000 Hz LoRa: N/A ( set to 0 )
-
preambleLen
NumberSets the Preamble length FSK : Number of bytes LoRa: Length in symbols (the hardware adds 4 more symbols)
-
symbTimeout
NumberSets the RxSingle timeout value (LoRa only) FSK : N/A ( set to 0 ) LoRa: timeout in symbols
-
fixLen
BooleanFixed length packets [false: variable, true: fixed]
-
payloadLen
NumberSets payload length when fixed length is used
-
crcOn
BooleanEnables/Disables the CRC [false: OFF, true: ON]
-
freqHopOn
BooleanEnables disables the intra-packet frequency hopping FSK : N/A ( set to 0 ) LoRa: [false: OFF, true: ON]
-
hopPeriod
NumberNumber of symbols bewteen each hop FSK : N/A ( set to 0 ) LoRa: Number of symbols
-
iqInverted
BooleanInverts IQ signals (LoRa only) FSK : N/A ( set to 0 ) LoRa: [false: not inverted, true: inverted]
-
rxContinuous
BooleanSets the reception in continuous mode [false: single mode, true: continuous mode]
setTxConfig
-
modem
-
power
-
fdev
-
bandwidth
-
datarate
-
coderate
-
preambleLen
-
fixLen
-
crcOn
-
freqHopOn
-
hopPeriod
-
iqInverted
Set the transmit configuration for a modem. It is important that both the receive and transmit configurations match in order for communication to work between two radios.
Parameters:
-
modem
RADIO_MODEM_TOne of the MODEM_T values
-
power
NumberSets the output power [dBm]
-
fdev
NumberSets the frequency deviation (FSK only) FSK : [Hz] LoRa: 0
-
bandwidth
NumberSets the bandwidth (LoRa only) FSK : 0 LoRa: [125 kHz, 250 kHz, or 500 kHz]
-
datarate
NumberSets the Datarate FSK : 600..300000 bits/s LoRa: [6: 64, 7: 128, 8: 256, 9: 512, 10: 1024, 11: 2048, 12: 4096 chips]
-
coderate
NumberSets the coding rate (LoRa only) FSK : N/A ( set to 0 ) LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
-
preambleLen
NumberSets the preamble length FSK : Number of bytes LoRa: Length in symbols (the hardware adds 4 more symbols)
-
fixLen
BooleanFixed length packets [false: variable, true: fixed]
-
crcOn
BooleanEnables disables the CRC [false: OFF, true: ON]
-
freqHopOn
BooleanEnables disables the intra-packet frequency hopping FSK : N/A ( set to 0 ) LoRa: [false: OFF, true: ON]
-
hopPeriod
NumberNumber of symbols bewteen each hop FSK : N/A ( set to 0 ) LoRa: Number of symbols
-
iqInverted
BooleanInverts IQ signals (LoRa only) FSK : N/A ( set to 0 ) LoRa: [false: not inverted, true: inverted]
setRx
-
timeout
Start a receive operation. The method will return when completed, either successfully, or in error (crc, or other issue). If completed successfully, the returned buffer can be read via getRxBuffer() or getRxBufferStr() . In addition, values for RSSI and SNR (Lora only) can be retrieved.
Parameters:
-
timeout
NumberThe timeout in milliseconds
Returns:
one of the RADIO_EVENT_T values
getRxBufferStr
()
String
Upon a successful receive, this method can be used to retrieve the received packet.
Returns:
The received buffer in a std::string
getRxBuffer
()
Uint8_t *
Upon a successful receive, this method can be used to retrieve the received packet.
Returns:
a pointer to the received buffer. You can use getRxLen() to determine the number of valid bytes present.
getRxRSSI
()
Number
Upon a successful receive, this method can be used to retrieve the received packet's Received Signal Strength Indicator (RSSI) value.
Returns:
RSSI value
getRxSNR
()
Number
Upon a successful receive, this method can be used to retrieve the received packet's Signal to Noise (SNR) value.
Returns:
SNR value
getRxLen
()
Number
Upon a successful receive, this method can be used to retrieve the number of bytes received.
Returns:
the number of bytes received