How to connect CubeCell to TTN (the things network)

Updated the instructions for using CubeCell, how to use CubeCell’s LoRaWAN example, via AT commands to configure DevEui, AppKey, and finally connect to TTN.:kissing_heart:

https://docs.heltec.cn/#/en/user_manual/how_to_connect_cubecell_to_ttn-the-things-network

1 Like

Hi,

It’s quite unclear how the TTN parameters should be injected in the code from the example.

My board displays:

Copyright @ 2019 Heltec Automation.All rights reserved.
LoRaWan ClassA test start! 

+LORAWAN=1

+OTAA=1
+Class=A
+ADR=1
+IsTxConfirmed=1
+AppPort=2
+DutyCycle=15000
+ConfirmedNbTrials=8
+DevEui=2232330000888802(For OTAA Mode)
+AppEui=0000000000000000(For OTAA Mode)
+AppKey=88888888888888888888888888886601(For OTAA Mode)
+NwkSKey=D72C78758CDCCABF55EE4A778D16EF67(For ABP Mode)
+AppSKey=15B1D0EFA463DFBE3D11181E1EC7DA85(For ABP Mode)
+DevAddr=007E6AE1(For ABP Mode)

joining...

Can you give us some more information ? Specifically where to enter the DevEui, AppEui and AppKey for OTAA.

Thanks.

Just type in any key in you Terminal and the cubecell will wake up.
After that type

AT+DevEui=2232330000******

AT+AppKey=888888888888888888888888********
AT+AppEui=70B3D57ED00*****

With your keys to set them.
The cubecell will Echo an ok.

After that reset the board with

At+reset=1

Thanks! It works.

This can be done from the Arduino serial console (no newline)

The right command at the end is AT+RESET=1 (all caps)

How do I set the sub band when using AU915?

The lmic-library contains a file “lmic_project_config.h”

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

thanks @ernst.schulz , I am aware of that when using LMIC.

But was specifically asking about when using the Cubecell library

Sorry, you do that in the Arduino-IDE.

When you choose the Board “CubeCell” you find a selection menu LORAWAN_REGION!

Yes thanks I have got that far as well.

I have it set on AU915 but this frequency plan has 64 channels.

Gateways setup on TTN using AU915 use the sub-band 2 - or channels 8-15, so at the moment my cubecell is only getting around every 8th message through as it gets lucky and transmits on that sub-band, also takes ages to join.

cheers
Paul