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

Testing Heltec Wireless Stick Lite and TTN-OTAA #16

Closed
mitjad123 opened this issue Jul 19, 2021 · 1 comment
Closed

Testing Heltec Wireless Stick Lite and TTN-OTAA #16

mitjad123 opened this issue Jul 19, 2021 · 1 comment

Comments

@mitjad123
Copy link

Hi,

I am not an expert in LoRa, but I did some Arduino, RFM95, TTN Gateway, sensors testing, etc.
I bought Heltec Wirelefs Stick lite and I am testing it, trying to connect to TTN via OTAA.

The stick works OK (Chip ID and WiFiScan examples are tested and OK)

I tried Heltect script in Arduino IDE to test LoRaWan - https://github.com/HelTecAutomation/ESP32_LoRaWAN/blob/master/examples/OTAA/OTAA.ino and it works OK, sending data to TTN - Live data (using my payload formater):

16:32:51 Forward uplink data message Payload sensor 0 value 10 00010203 FPort 2 SNR 4 RSSI -105 Bandwidth 125000 ...

I also tested in Arduion IDE the TTN-OTAA example from LMIC library (https://github.com/mcci-catena/arduino-lmic/blob/master/examples/ttn-otaa/ttn-otaa.ino) and it works OK.

Live data (using my payload formater): 17:09:49 Forward uplink data message Payload sensor 8311 value 127748 FPort 1 SNR 9.5 RSSI -86 Bandwidth 125000

When I test LMIC-node script on my Win 10, VisualStudiCode 1.58.2, Platform IO IDE 2.3.2, Lcation Europe, MCCI LoRaWAN LMIC library by IBM 4.0.0 installed, with \Documents\PlatformIO\Projects\HWFLlora.pio\libdeps\heltec_wireless_stick_lite\MCCI LoRaWAN LMIC library\project_config\lmic_project_config.h:

// project-specific definitions
#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au915 1
//#define CFG_as923 1
// #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */
//#define CFG_kr920 1
//#define CFG_in866 1
#define CFG_sx1276_radio 1
//#define LMIC_USE_INTERRUPTS

I get:

LMIC-node
Device-id: wireless-sticklt
LMIC library: MCCI
Activation: OTAA
Interval: 300 seconds
000000002826: Event: EV_JOINING
000000003650: Event: EV_TXSTART

000000005873: doWork job started
000000407523: Event: EV_JOIN_TXCOMPLETE
000000462601: Event: EV_TXSTART
000000842883: Event: EV_JOIN_TXCOMPLETE
000000965706: Event: EV_TXSTART
000001367386: Event: EV_JOIN_TXCOMPLETE
...

I change everything needed in \keyfiles\lorawan-keys.h adding \boards\bsf_heltec_wireless_stick_lite.h

My platformIO.ini:

[env:heltec_wireless_stick_lite]
platform = espressif32
board = heltec_wireless_stick_lite
framework = arduino
lib_deps =
mcci-catena/MCCI LoRaWAN LMIC library@^4.0.0
lnlp/EasyLed@^1.1.0
upload_speed = 921600
build_flags =
-D BSFILE=\"../boards/bsf_heltec_wireless_stick_lite.h\"
-D MONITOR_SPEED=9600
-D LMIC_PRINTF_TO=Serial
-D USE_SERIAL
-D USE_LED

No Activity is detected on my Mikrotik Router as well. It might be that the frequencies are not set right?

Can someone help me detecting, what am I doing wrong?

Thank you
Mitja

@lnlp
Copy link
Owner

lnlp commented Jul 19, 2021

You already created issue #15 for this. Don't create a new issue for the same topic (you could have asked to reopen issue #15).
I will close this issue and reopen #15 so we can continue there.

I am not an expert in LoRa,

Therefore it is important to exactly follow the well documented steps described in LMIC-node's README.md.

Nowhere does it say that you must make custom modifications to platformio.ini and remove essential parts that are required for proper operation. But that is exactly what you did (twice) which explains why you did not get it working.

I already gave you advice in #15 to use the original platformio.ini included with LMIC-node:

Apparently you have edited the platformio.ini file included with LMIC-node and have removed essential parts e.g. the [common] and other sections. There is no need to remove anything from platformio.ini. Use the original platformio.ini and the problem should be solved.

But you did not follow that advice. Instead you made even more custom changes to platformio.ini which explains why it is still not working.

Just follow my advice previously given and don't make any custom modifications to platformio.ini. Just follow the steps documented in README.md.

If after following (exactly) the steps described in README.md you succeed in getting it working please let me know so I can close issue #15. If you follow the documented steps but then still do not get it working then please continue in #15.

@lnlp lnlp closed this as completed Jul 19, 2021
Repository owner locked and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants