-
Notifications
You must be signed in to change notification settings - Fork 212
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
Add driver for SX126x modems #949
Conversation
Hi! I'm currently tinkering around with the Heltec Wireless Stick lite v3 and stumbled across your PR. Somehow i cannot get it to work - neither in platformio nor in Arduino. I set the defines in
I tried the ttn-otaa.ino example of this library in the Arduino IDE, set the Board to The "best" results i got with this configuration: The device boots, and i get the serial-output Do you have any ideas on this? Would be great to get it running. |
Hi Eike, Thanks for getting in touch. I won't be able to look at this in depth this week but should be able to give it some time next week. However a couple of comments to get you started:
I'll get onto this in a week or so but if you can get some debug logs in the interim that would give me a head start! Tristan |
Setting Debug Level 2 does not give that much information either.
This is the output; at 20:59:20 i rebooted the wifi stick via reset button, then the The Gateway I'm testing with is mine and works for another TTN-application. However, when trying to use the sx1262 implementation, nothing happens and i don't see any Join-request, confirmation or even a payload-message. I then tried to use the AU915 frequency, hoping to see some message about a failed join but got this:
again, when userswitch was pressed at 21:32:58. In contrast to the EU868 procedure the 5-second-gap when holding the userswitch is gone (as you see at the timestamps) |
Thanks for that. The behaviour with the What baud rate are you using for serial output? Can I suggest trying with 115200? As for a running commentary on what may be happening with those debug messages, after the line:
if everything was working correctly we would expect to see a debug message from the IRQ to identify if the transmission was completed, such as:
If we're not seeing the IRQ handler triggering it points to the transmission for the join request not being sent. Is the antenna connected to the board? |
I would be ashamed, but did i may simply did the pin-wiring wrong? Checked it many times and see nothing wrong:
and my platformio.ini looks like this:
Do you may have a minimum working example that i could test, just to ensure not a stupidity of mine is the cause of the problem?
had it on 9600, but changing it to 115200 made no difference. |
Your pinmap looks fine, as does the platform.ini file. However I have been assigning the pinmap differently - I have been calling a function in the HAL. The minimal example I used for initial testing is almost identical to the ttn-otaa.ino example but with the following changes:
I suspect this difference may result in a couple of horrible little virtual functions I wrote not being called properly. I should probably add this example to the repo if it turns out to work for you! |
Yes! That worked! The Board instantly joins and sends it's message, everything arrives correctly at the gateway and ttn-application. Thus the IRQ-Messages are shown, too. Let's call it eu868 confirmed ;) I'll try to have a look at why this workaround is needed and if can rid of it. |
Great news! I'm glad it's working for you. |
@baranator I also have a Heltec Wireless Stick that I would like to use with LoRaWAN. Do you have a project that I can copy as a starting point? |
This is basically the |
Thanks Eike!
…On Fri, 17 May 2024, 2:17 am Eike, ***@***.***> wrote:
@baranator <https://github.com/baranator> I also have a Heltec Wireless
Stick that I would like to use with LoRaWAN. Do you have a project that I
can copy as a starting point?
This is basically the ttn-otaa-Example of the unmodified mcci-catena
library with the modifications suggested by @TristanWebber
<https://github.com/TristanWebber> in this Thread and his modified fork
added to the platformio.ini :
https://github.com/baranator/sx1262minimal
—
Reply to this email directly, view it on GitHub
<#949 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY6BUJ7MYASTJAVL7TZGNH3ZCTLZRAVCNFSM6AAAAAA3JKYDOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGY3DIMRYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for this, I have successfully got it working on a T-Beam S3 (AU915). See TristanWebber#1 |
Thanks for the feedback. I'll have a look at it next week. Do you mind
sharing a link to that board?
…On Sat, 25 May 2024, 4:34 pm Oliver Seiler, ***@***.***> wrote:
Thanks for this, I have successfully got it working on a T-Beam S3 (AU915).
One thing I noticed it that the library configures the DIO[1-3], but not
the busy pin returned by queryBusyPin(). Might be helpful to add that,
and/or document it.
—
Reply to this email directly, view it on GitHub
<#949 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY6BUJ75FOL3XB7OO4TDBT3ZEAWGTAVCNFSM6AAAAAA3JKYDOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZQHEYTCNBSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Busy pin initialisation and T-Beam S3 Core/Supreme pinmap
Look like this is still in progress. Let me know when you're ready for a review / merge cycle. |
@terrillmoore it's ready when you are. Yesterday's push was a bug fix and otherwise I haven't actively changed the driver for quite a while. |
Great! I’ll try to get to this over the next week.
Best regards,
…--Terry
|
I can confirm, this new radio driver works on a SX1262 with TTN (with LoRaWAN 1.0.3) and EU868. Tested on a T-Beam Supreme S3 board today. It did immediately join and transmit. Tested using my paxcounter project, see this branch. |
ping - is a merge still planned? |
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.
We should consider adding info in the README:
- contributor for the SX126x support
- info on configuring for SX126x (ideally)
However, this can be done as a separate step.
Thanks for the contribution. I will merge this to head, and you can do any updates as separate PRs.
@@ -31,7 +31,7 @@ | |||
#define LMIC_DR_LEGACY 0 | |||
|
|||
#include "lmic.h" | |||
|
|||
#if (CFG_sx1272_radio || CFG_sx1276_radio) |
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.
please use defined(
on both parts, for consistency with files above.
Or, to minimize typing, we could introduce derived variables ..._sx127x_radio
and ..._sx126x_radio
, that are always defined, and either zero or non-zero. But I think that can be done later. (The ...
should be something other than CFG
because CFG
is used for user configuration #defines
. There are examples elsewhere.) However, I think it's better to just go for consistency and do a cleanup pass separately. You've waited long enough.
Thanks Terry!
I will do those updates in the next week or two.
…On Wed, 2 Oct 2024 at 09:29, Terry Moore ***@***.***> wrote:
Merged #949 <#949> into
master.
—
Reply to this email directly, view it on GitHub
<#949 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY6BUJ6WPPHDBQ7N64KXZ63ZZMV7LAVCNFSM6AAAAAA3JKYDOGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGQ4DANRTGA4TQNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@@ -184,6 +191,13 @@ static void hal_spi_init () { | |||
SPI.begin(); | |||
} | |||
|
|||
#if (defined(CFG_sx1261_radio) || defined(CFG_sx1262_radio)) | |||
bit_t is_busy() { |
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.
is_busy()
should not be a global -- or should be hal_is_radio_busy()
if it needs to be global for the driver.
Adds driver for SX126x modems.
#if
to select the correct filePhysical tests - Adding notes here because it's been tested in a relatively narrow set of possible configurations: