-
-
Notifications
You must be signed in to change notification settings - Fork 650
Add function to invert IQ signal register #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add function to change register (REG_INVERTIQ) to support communication node and gateway
Add invertIQ
Add invertIQ
Update REG_INVERTIQ bits like reference https://github.com/intel-iot-devkit/upm/blob/master/src/sx1276/sx1276.cxx
The register does not exist in datasheet but use on but used in Semtech code. Reference : https://github.com/intel-iot-devkit/upm/blob/master/src/sx1276/sx1276.cxx
Clear files to pull request
Can you document the function in |
Add function in API.md
I forgot to add on |
Great! An example would also be awesome, not sure how to best demonstrate this though. Maybe have two devices what roles as the "gateway"? Open to any ideas but think there should be something in the examples folder for this. |
Exemple how to use InvertIQ function to create a simple Gateway/Node logic.
src/LoRa.h
Outdated
@@ -66,7 +66,8 @@ class LoRaClass : public Stream { | |||
void setSyncWord(int sw); | |||
void enableCrc(); | |||
void disableCrc(); | |||
|
|||
void invertIQ(boolean invert); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making this:
enableInvertIQ()
anddisableInvertIQ()
to make it like the CRC API's above?
another option is invertIQ()
and noInvertIQ()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, make sense InvertIQ be like CRC API's function.
Change invertIQ(boolean invert) to enableInvertIQ() and disableInvertIQ()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricaun thanks for updating. It's close to merging, just had a few minor comments.
const int irqPin = 2; // change for your board; must be a hardware interrupt pin | ||
|
||
void setup() { | ||
Serial.begin(115200); // initialize serial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have the default baud at 9600 like the other examples, as it's the default baud rate of the Arduino IDE.
const int irqPin = 2; // change for your board; must be a hardware interrupt pin | ||
|
||
void setup() { | ||
Serial.begin(115200); // initialize serial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment as above.
src/LoRa.h
Outdated
void setOCP(uint8_t mA); // Over Current Protection control | ||
|
||
// deprecated | ||
void crc() { enableCrc(); } | ||
void noCrc() { disableCrc(); } | ||
void invertIQ() { enableInvertIQ(); } | ||
void noInvertIQ() { disableInvertIQ(); } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we remove invertIQ()
and noInvertIQ()
instead of adding deprecated methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sir is it possible to communicate RN2483 with sx1276 we tried but data not receiving in rn2483 but sx1276 receives data from rn2483 is it because of serial and spi communication
Change Serial baud to 9600. Remove invertIQ and noInvertIQ
@ricaun thanks! |
InvertIQ allows differentiating sender and receiver message.
Usually, Gateways read messages with InvertIQ off and send messages with InvertIQ on, Nodes read messages with InvertIQ on and send messages with InvertIQ off.
This way a Gateway only reads messages from Nodes and never reads messages from other Gateway, and Node never reads messages from other Node.