Comments (4)
These registers description aren't disclosed by Semtech. Some of them are test registers which may damage the chip if their values are changed.
The current example sets the radio to always output 20 dBm regardless of the TX_OUTPUT_POWER value.
If you would like to test at another output power you may set the chip in FSK mode which is easier to setup in continuous wave mode and the results will be equivalent.
To do so you must set the radio in transmission mode using the FSK modem with a frequency deviation of 0 KHz.
Please find below an example: (I didn't test it but I think it should work)
#include <string.h>
#include "board.h"
#include "radio.h"
#define RF_FREQUENCY 868000000 // Hz
#define TX_OUTPUT_POWER 14 // 14 dBm
#define FSK_FDEV 0 // Hz
#define FSK_DATARATE 50e3 // bps
#define FSK_BANDWIDTH 50e3 // Hz
#define FSK_AFC_BANDWIDTH 83.333e3 // Hz
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
#define FSK_FIX_LENGTH_PAYLOAD_ON true
int main( void )
{
// Target board initialisation
BoardInitMcu( );
BoardInitPeriph( );
// Radio initialization
Radio.Init( NULL );
Radio.SetChannel( RF_FREQUENCY );
Radio.SetTxConfig( MODEM_FSK, TX_OUTPUT_POWER, FSK_FDEV, 0,
FSK_DATARATE, 0,
FSK_PREAMBLE_LENGTH, FSK_FIX_LENGTH_PAYLOAD_ON,
true, 0, 0, 0, 3000000 );
TimerInit( &Led4Timer, OnLed4TimerEvent );
TimerSetValue( &Led4Timer, 90000 );
TimerInit( &Led2Timer, OnLed2TimerEvent );
TimerSetValue( &Led2Timer, 90000 );
TimerInit( &Led3Timer, OnLed3TimerEvent );
TimerSetValue( &Led3Timer, 90000 );
// Switch LED 1 ON
GpioWrite( &Led4, 0 );
TimerStart( &Led4Timer );
// Sets the radio in Tx mode
Radio.Send( NULL, 0 );
// Blink LEDs just to show some activity
while( 1 )
{
if( Led4TimerEvent == true )
{
Led4TimerEvent = false;
// Switch LED 4 OFF
GpioWrite( &Led4, 4 );
// Switch LED 2 ON
GpioWrite( &Led2, 0 );
TimerStart( &Led2Timer );
}
if( Led2TimerEvent == true )
{
Led2TimerEvent = false;
// Switch LED 2 OFF
GpioWrite( &Led2, 1 );
// Switch LED 3 ON
GpioWrite( &Led3, 0 );
TimerStart( &Led3Timer );
}
if( Led3TimerEvent == true )
{
Led3TimerEvent = false;
// Switch LED 3 OFF
GpioWrite( &Led3, 1 );
// Switch LED 1 ON
GpioWrite( &Led4, 0 );
TimerStart( &Led4Timer );
}
}
}
from loramac-node.
Thank you very much. It works perfectly.
I don't know if here is the right place but I have another question:
Is a way to configure SX1272 in order to transmit a PN9 sequence?
Br
from loramac-node.
The best place to ask this kind of questions is to ask them on the LoRa Community Semtech portal.
The SX1272 and SX1276 have no hardware PN9 sequence generator.
The drivers furnished in this repository don't enable the sending of PN9 sequence.
There would be a possibility which consists on using the Radio "Continuous Mode" chapter 4.2.13 of SX1272 datasheet and let a microcontroller generate the PN9 sequence and stream it to the DIO2/DATA and DIO1/DCLK radio pins.
from loramac-node.
Ok. Thank you very much for your answers.
Br
from loramac-node.
Related Issues (20)
- How to get the frequency on OnRxData
- TX Timeout hardcoded HOT 1
- DL not received in Class C AS923-1 + Freq 923.600
- Pre-certification should always failed due to duty-cycle limitation HOT 2
- Stack writes to NVM while radio is transmitting
- TimerInit called multiple times on the same TimerEvent_t struct HOT 1
- Race condition in RtcGetCalendarValue on NucleoL476 board
- LORAMAC_TX_CONFIG tested, but never set.
- GpioMcuRemoveInterrupt sets GPIO pull-up/pull-down registers to random uninitialized memory
- Secure-Element Preprocessor definition ifndef wrapping HOT 1
- AES function rename due to multiple definitions linking error
- LmHandlerInit causing some current leakage till the first tx HOT 3
- The correct value of MinRxSymbols? HOT 1
- does any body port this project for stm32f103?
- Does the Firmware Management (Port 203) is supported by LoRaMac-Node ? HOT 2
- Errata 2.3 current implementation may impact TX configuration
- MacBook M1 chip complies fail! arm-none-eabi-gcc: error: unrecognized command-line option '-arch'; did you mean '-march='?
- Support for MSPM0 Microcontroller
- stm32系列的Unique Devices IDs register错误
- Radio.Sleep() may leave antenna switch powered HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loramac-node.