Skip to content
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

CW mode support? #15

Closed
Miceuz opened this issue Mar 9, 2023 · 6 comments · Fixed by #16
Closed

CW mode support? #15

Miceuz opened this issue Mar 9, 2023 · 6 comments · Fixed by #16
Labels
enhancement New feature or request
Milestone

Comments

@Miceuz
Copy link
Contributor

Miceuz commented Mar 9, 2023

Is there a possibility to enter into continuous wave mode for testing purposes?

@fpistm
Copy link
Member

fpistm commented Mar 13, 2023

Hi @Miceuz

honestly, I don't know. Will try to get answer internally.

@fpistm fpistm closed this as completed Mar 13, 2023
@fpistm fpistm reopened this Mar 13, 2023
@Miceuz
Copy link
Contributor Author

Miceuz commented Mar 15, 2023

@fpistm never mind, I have hacked it:

bool STM32LoRaWAN::continuousWave() {
  MlmeReq_t mlmeReq;
  mlmeReq.Type = MLME_TXCW_1;
  mlmeReq.Req.TxCw.Frequency = 868100000;
  mlmeReq.Req.TxCw.Power = 15;
  mlmeReq.Req.TxCw.Timeout = 65535;
  LoRaMacStatus_t res = LoRaMacMlmeRequest(&mlmeReq);
  if (res != LORAMAC_STATUS_OK)
    return failure("Failed to enable CW mode: %s\r\n", toString(res));

  return true;
}

Would you be interested in adding it to STM32LoRaWAN class in a properly parametrized form? I could create you a PR.

@matthijskooijman
Copy link
Collaborator

@Miceuz How does CW work after you enabled it? Does it just receive packets continuously? E.g. something like class C operation? Or is it a lower level of operation somehow?

@Miceuz
Copy link
Contributor Author

Miceuz commented Mar 15, 2023

@matthijskooijman No, it just outputs a continuous wave - necessary for antenna testing and for compliance testing in a lab.

It's a special use case necessary when you are releasing a product, but not related to a normal use in any way.

@matthijskooijman
Copy link
Collaborator

Ah, it's output, not input. I see.

Sounds like a useful and very well-contained addition, so a pull request would be welcome (with, as you mentioned, proper parameters and of course a bit of documentation in doxygen comments).

Miceuz added a commit to Miceuz/STM32LoRaWAN that referenced this issue Mar 15, 2023
@Miceuz
Copy link
Contributor Author

Miceuz commented Mar 15, 2023

PR #16

Miceuz added a commit to Miceuz/STM32LoRaWAN that referenced this issue Mar 15, 2023
Miceuz added a commit to Miceuz/STM32LoRaWAN that referenced this issue Mar 15, 2023
@fpistm fpistm added the enhancement New feature or request label Mar 23, 2023
@fpistm fpistm added this to the 0.1.1/0.2.0 milestone Mar 23, 2023
@fpistm fpistm linked a pull request May 3, 2023 that will close this issue
@fpistm fpistm closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants