Skip to content

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.

Notifications You must be signed in to change notification settings

leroyle/ASR650x-Arduino

 
 

Repository files navigation

March 25 2021 PlatformIO Update:

It has been discoverd that for use with platformio one can add an entry in the platformio.ini file to cause this repo to be downloaded into the users ~/.platformio/packages directory. Within the samples .platformio.ini file there is now a token, "platform_packages". Uncommenting this token will result in this repo being downloaded into your platformio install packages directory rather than the default Heltec repo.

NOTE: If using this feature, check for any existing ~/.platformio/packages/framework-arduinoasrmicro650x directory and remove it before attemping a project build.

leroyle NOTE: any changes to this fork may or may not end up in the offical Heltec release, consumer beware

The changes from the base code that you find here should be limited to the runtimes. This code base should work for both Arduino and Platformio.

These are not meant to be installable images, rather the idea is to clone a local version of this fork and copy the libraries and cores over the top of an existing installation within the applicable directories in your local installation directory.

These can typically be found at: Arduino: Linux: ls ~/.arduino15/packages/CubeCell/hardware/CubeCell/1.0.0 PlatformioL Linux: ~/.platformio/packages/framework-arduinoasrmicro650x

We will periodically try to pull in any changes that Heltec commits, but no guarantees.

API Changes

Set/Get Datarate

The base code did not initially provide a mechanism for the device application to dynamically change the data rate. Heltec did eventually supply a set API but no get API. This set API is more robust than the Heltec version.

LoRaMacStatus_t LoRaWanClass::setDataRateForNoADR(int8_t dataRate)

int8_t LoRaWanClass::getDataRateForNoADR()  // returns -1 if the call fails

The default data rate is set via a #define in libraries/LoRa/src/LoRaWan_APP.cpp

/*loraWan default Dr for ADR when adr disabled*/
#if defined(REGION_US915) || defined(REGION_US915_HYBRID)
int8_t default_DR = 3;
#else
int8_t default_DR = 5;
#endif

LoRaWan.send()

The Send() API will returns a status that can be checked for sucess/failure. Sends can fail for instance if your data packet size exceeds the maximum size allowed by the current data rate.

LoRaMacStatus_t sendStatus = LoRaWAN.send();
Sample device application

There is a new sample at HeliumExamples/Cube_Helium_NOGPS This sample uses the above API and also demonstrates using a couple of other runtime API calls to set/get ADR enable, power setting and display a custom string on the OLED display.

Runtime Changes from base

Nov 25

  • add return status to setDataRateForNoADR()

Sept 25

  • merge in base fork changes

Sept 24 closed issue, added Helium Cubecell AB02 sample

  • #10 Network specfied Adaptive Data Rate changes were not being honored as expected

Sept 19 Closed issues

  • #8 Latest changes broke ADR resetting of DATA RATE

Sept 18 Closed issues

  • #2 LoRaWAN gives user false illusion of transmit success if payload exceeds max for DR
  • #5 LoRaWan: LoRaMac.c - ValidatePayloadLength( ) fails to catch too large payload if fOptsLen != 0
  • #6 Heltec added a set data rate API, need a get data rate api

Sept 14: Closed issues

  • #4 Radio.SetTxConfig() preamble length param changed from 8 to 14, prevents joins
  • #3 The user should have a way to set the LoRaWAN Data Rate, either dynamically or via app sketch #define
  • #1 LoRaWAN::send() should notify caller of success/failure

End of updates from leroyle

Heltec ASR650x Series Arduino Development Environment

English | 简体中文    Build Status

This project makes ASR650x (ASR6501, ASR6502) series fully Arduino-Compatible. For Heltec CubeCell series.

Based on the ASR650x series of chips, we have done a lot of migration and development, made it perfectly support Arduino®, can run the LoRaWAN-Node protocol stably, and can easily connect lithium batteries and solar panels… This is the CubeCell series.

Cube — Means modular design and easy assembly;

Cell — Is the product positioning, as a unit of the IoT series, working like a cell.

CubeCell series LoRaWAN-Node stack is migration form LoRaMac-node V4.4.0, based on "LoRaWAN specification 1.0.2" and "LoRaWAN Regional Parameters v1.0.2rB".

 

For more details, please refer to CubeCell Documents Page.

 

Instructions

The currently supported ASR650x chip product models are:

MCU Relative boards
ASR6501 CubeCell-Board, CubeCell-Module, CubeCell-Capsule
ASR6502 CubeCell-Board Plus, CubeCell GPS-6502, CubeCell 1/2AA Node, CubeCell-Module Plus, CubeCell-Capsule Solar Sensor

 

Installation Instructions

Make sure you have the latest Arduino IDE installed on your computer. If not installed, please refer to this documents:

 

 

Linux may have serial port can't link problem, please refer to this page:https://playground.arduino.cc/Linux/All/#Permission

 

Issue/Bug report template

Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as for reference.

Also you can talk in our forum: http://community.heltec.cn/

 

Contact us

 

简体中文

本项目由成都惠利特自动化科技有限公司开发。

  • 本项目旨在为ASR650x系列芯片提供Arduino便利的开发环境与例程库,方便用户完成对ASR650x系列芯片的快速部署与开发。

说明

产品型号列表:

MCU Relative boards
ASR6501 CubeCell-Board, CubeCell-Module, CubeCell-Cuapsule
ASR6502 Coming soon

安装指南

首先,确保你的电脑上已经安装了最新的Arduino IDE。如果没有安装,请参考这篇文档:https://docs.heltec.cn/#/zh_CN/user_manual/how_to_install_git_and_arduino

 

问题讨论 & BUG报告

如果串口不能连接,请参考:https://playground.arduino.cc/Linux/All/#Permission

在报告BUG之前,请先做详细的测试,如果问题真的存在,您可以通过以下方式报告或者讨论:

联系我们

About

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 59.6%
  • C++ 34.0%
  • Pawn 4.1%
  • JavaScript 1.1%
  • Assembly 1.0%
  • Processing 0.1%
  • Python 0.1%