Skip to content

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

Merged
merged 14 commits into from
Aug 19, 2018

Conversation

ricaun
Copy link
Contributor

@ricaun ricaun commented Aug 4, 2018

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.

ricaun and others added 8 commits July 23, 2018 15:49
Add function to change register (REG_INVERTIQ) to support communication node and gateway
Add invertIQ
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
Clear
@morganrallen
Copy link
Collaborator

Can you document the function in API.md?

Add function in API.md
@ricaun
Copy link
Contributor Author

ricaun commented Aug 5, 2018

I forgot to add on API.md, now is done

@morganrallen
Copy link
Collaborator

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);
Copy link
Owner

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() and disableInvertIQ() to make it like the CRC API's above?

another option is invertIQ() and noInvertIQ().

Copy link
Contributor Author

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.

ricaun and others added 2 commits August 6, 2018 22:49
Change invertIQ(boolean invert) to enableInvertIQ() and disableInvertIQ()
Copy link
Owner

@sandeepmistry sandeepmistry left a 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
Copy link
Owner

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
Copy link
Owner

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(); }

Copy link
Owner

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.

Copy link

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

ricaun and others added 2 commits August 12, 2018 23:06
Change Serial baud to 9600.
Remove invertIQ and noInvertIQ
@sandeepmistry sandeepmistry merged commit 07bfead into sandeepmistry:master Aug 19, 2018
@sandeepmistry
Copy link
Owner

@ricaun thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants