Giter VIP home page Giter VIP logo

armapi's People

Contributors

antoine163 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

armapi's Issues

ARMAPI on Arduino Micro

When working with the armapi library on Arduino Micro, it seems that everything is working fine using the following init command (using the Uplink example and changing Serial to Serial1):
if (myArm.Init(&Serial1) != ARM_ERR_NONE)

But later when using the send API, Sigfox doesn't seem to receive any message:
myArm.Send(msg, sizeof(msg));

Is there a way to get the status of the send command?

[Request] RESET pins (misunderstanding)

We have just tested the ACW shield and we had some issue concerning the AT command switch.

In the User Guide it is said that the Reset pins is on the GPIO4.

image

On the RPI 3 the pin on the PI associated with the reset pin of the board is the GPIO7 (physical 7 / BCM 4)

wiringpi_readall

If you can update that information for RPI 3 user, it would be great !

No sleep function ?

I've been browsing through the documentation and source code, and I've been unable to find any function that would allow me to put the LoRa module to sleep when not in use for a long period of time, to save energy. Is this function implemented, or will it be implemented ?

Pas de message envoyé via la méthode send

Bonjour,

J'utilise une carte Lora arm n8 lw (kit de dev objenious), mais je n'arrive pas à envoyer des messages. J'ai essayé le programme de demo de température sur le site d'objenious.
Aucune erreur ne m'est remonté dans le code (methode init et updateconfig), le réseau objenious est bien rejoint (logs sur la plateforme indiquant de nombreux joinrequest/accept) mais quand je tente d'envoyer un message (methode send), la méthode renvoie bien le nombre de bytes transmis mais aucune donnée ne semble être envoyée en lora.

J'ai configuré la led sur la carte lora pour clignoter quand il y a une activité radio et la led de la carte arduino clignote quand elle envoie des données (toutes les 20 secondes). La led de l'arduino (airboard) clignote bien toutes les 20s mais jamais celle de la carte lora (alors que les données sont supposées être envoyées en même temps).

Ci-joint mon bout de code de test

test-temp.txt

Ou aurais-je fais une erreur ?

Merci d'avance.

Activation OTAA défectueuse ?

Y-a-t-il des fonctionnalités LoRaWAN qui ne sont pas supportées par le module N8-LW ?

J'essaye d'activer le mode OTAA, mais lorsque j'active le mode avec

myArm.LwEnableOtaa(true);
myArm.UpdateConfig();

Lorsque j'interroge le module ensuite avec myArm.LwIsEnableOtaa(), la valeur retournée reste à 0.

En mode personnalisé, la transmission de données se passe correctement.

Le module est :
Rev:15.1124.1700 S/N:XXXXXXXXXXXXXXXX LoRaWan:V1.0 868MHz:14dBm

ARM_ERR_ARM_GO_AT sur Arduino uno R3

Bonjour,

Les exemples fournis sur /armapi retourne l'erreur suivante :
ARM_ERR_ARM_GO_AT: 'ARM commend Error, can't switch to AT commend.'

J'utilise un Arduino Uno et un module xbee Lora Atim. La communication avec le module xbee est réalisé via un port série virtuel généré par <SoftwareSerial.h>, pour conserver le moniteur sur le port série initial.

Avez-vous une solution pour débloquer cette situation ?

Je vous remercie par avance,
Cordialement,
Sébastien

ARM_ERR_ARM_GO_AT on RPI 1

Hello,
in order to test the device i do the following
1- I built arminfo
2- i disabled the gpio 4 with echo command as you explained in another issue
3- i run via SSH sudo ./arminfo i get the following error.
ARM Init failed!
ARM_ERR_ARM_GO_AT: 'ARM command Error, can't switch to AT command.'
I changed cmdline.txt for this
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
then i type
echo 4 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio4/direction
echo 1 > /sys/class/gpio/gpio4/value
Now sometimes it succeed but most of the time it failed with various error
ARM Init failed!
ARM_ERR_ARM_GET_REG: 'ARM command Error, from get register.'
or
ARM Init failed!
ARM_ERR_PORT_WRITE_READ: 'Port Error, at the port reading/writing.'
or
ARM Init failed!
ARM_ERR_ARM_GO_AT: 'ARM command Error, can't switch to AT command.'

Can you help ?
regards
Michel

ARM_ERR_WOR_ENABLE when sending a msg with LoraWan

Hi there,

I use ATIM chip to communicate with a LoRa network.
To do this, I use a RPi 3 on Jessie with a board containing the chip.

When I run arminfo prog, I can see the board being well initialized and I can retrieve all arm info (serial numbers...)

When I try to send a message to LoRa, I got the following error: ARM_ERR_WOR_ENABLE

Here the main.c I used:

`// Include API
#include <arm.h>
#include <stdio.h>

// Instance of ARM class
arm_t myArm;
// The message to send
uint8_t msg[] = "Hello World";

int main()
{
armError_t err;
printf("Initializing\n");
// Initialize of API and check the error code.
if (armInit(&myArm, "/dev/ttyAMA0") != ARM_ERR_NONE)
return 1;

printf("Initialized\n");

// If we want to use the LoraWan network
printf("Choosing LoraWan\n");    
err = armSetMode(&myArm, ARM_MODE_LORAWAN);
if (err != ARM_ERR_NONE)
	printf("Error\n");

printf("LoRa initialized\n");

// After sending the message, we need to send the configuration to the radio modem
printf("Updating config\n");
err = armUpdateConfig(&myArm);
if (err != ARM_ERR_NONE)
	printf("Error\n");
printf("Config updated\n");

// Sending message
printf("Sending message\n");
err = armSend(&myArm, msg, sizeof(msg)-1);
if (err != ARM_ERR_NONE)
	printf("ERROR\n");
printf("Message sent\n");


if (err == ARM_ERR_NO_SUPPORTED)
	printf("NOT SUPPORTED");
if (err == ARM_ERR_PORT_OPEN)
	printf("PORT OPEN");
if (err == ARM_ERR_PORT_CONFIG)
	printf("PORT CONFIG");
if (err == ARM_ERR_PORT_READ)
	printf("PORT READ");
if (err == ARM_ERR_PORT_WRITE)
	printf("PORT WRITE");
if (err == ARM_ERR_PORT_WRITE_READ)
	printf("PORT_WRITE_READ");
if (err == ARM_ERR_PORT_CLOSE)
	printf("PORT_CLOSE");
if (err == ARM_ERR_PARAM_OUT_OF_RANGE)
	printf("PARAM_OUT_OF_RANGE");
if (err == ARM_ERR_PARAM_INCOMPATIBLE)
	printf("PARAM_INCOMPATIBLE");
if (err == ARM_ERR_ADDRESSING_NOT_ENABLE)
	printf("ADDRESSING NOT ENABLE");
if (err == ARM_ERR_WOR_ENABLE)
	printf("WOR_ENABLE");
if (err == ARM_ERR_ARM_GO_AT)
	printf("ARM_GO_AT");
if (err == ARM_ERR_ARM_BACK_AT)
	printf("ARM_BACK_AT");

return 0;

}`

Do I miss something?
Could you please provide sample code to communicate with LoRa networks?

Best,

Error with STM32L0

Hi,

I cannot build ... but this is the error :

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'sigfox'
compiling main.cpp...
.\lib shield\armport_stm32.c(72): error: #513: a value of type "void *" cannot be assigned to an entity of type "USART_TypeDef *"
huartArm1.Instance = *ptrPort;
main.cpp: 0 warnings, 3 errors
line 136: Error: #167: argument of type "UART_HandleTypeDef **" is incompatible with parameter of type "UART_HandleTypeDef *"
HAL_UART_DeInit(&huart);
.\lib shield\armport_stm32.c(154): error: #167: argument of type "void *" is incompatible with parameter of type "std::uint8_t *"
HAL_StatusTypeDef status = HAL_UART_Receive(huart, buf, 1, timeout);
compiling armport_stm32.c...
lib shield\armport_stm32.c(136): warning: #167-D: argument of type "UART_HandleTypeDef **" is incompatible with parameter of type "UART_HandleTypeDef *"
HAL_UART_DeInit(&huart);
lib shield\armport_stm32.c: 1 warning, 0 errors
".\BUILD\sigfox.axf" - 2 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01

is this lib compatible with esp32 ?

Hello,

I'm a bit confused because I want to run this lib with an esp32 and i'm not sure it's compatible because when i add

  if (myArm.Init(&Serial) != ARM_ERR_NONE)
		ESP_LOGI(TAG, "sigfox ok");

in my setup, i breaks the serial as i get only NULNUL.....

ARM_ERR_ARM_GET_REG sur Arduino UNO R3

Bonjour,

L'exemple fourni sigfox_uplink sur /armapi me renvoie une erreur d'initialisation LED13 à HIGH.
En affichant l'erreur renvoyée, j'ai un ARM_ERR_ARM_GET_REG.

J'utilise un Arduino Uno et un shield ACW_DUINO Sigfox (Pico).

Auriez vous une idée ?
Est ce que je peux cabler directement la shield pour envoyer les commandes AT ?

Merci d'avance.
Cordialement,
Olivier

sigfox downlink message not working

I have recently updated the firmware of my ARM N8 LP module to the last version, and I can send correctly uplink/downlink messages to the Sigfox backend using standard AT commands, such as:

Uplink message:
AT$SF=112233445566778899AABBCC,0

Downlink message:
AT$SF=112233445566778899AABBCC,1

However when using the armapi arduino libraries I am having two different issues. I am using an Arduino Zero board that has an Atmel ARM Cortex M0+ microcontroller, where the serial connection is called Serial1, and the native USB connection SerialUSB.

My Arduino sketch works using uplink messages, but I have two issues:

  1. When I try to send a message in the setup code section, to pull the date/time from the sigfox backend, this first downlink message does not work. I think it could have something to do with the fact that there is a 3 seconds boot time in the ARM N8 module.
  2. The downlink message never works using the Arduino library. It is always received as an uplink message, even though I configure the module to send a Downlink message.

This code is coming from your original sigfox downlink example:

#include <arm.h>
#define LED 13

//Instance of  the class Arm
Arm myArm;
//The message to send at sigfox
uint8_t msg[] = "Hello Sigfox";
//Buffer for data sigfox downlink
uint8_t data[8] = {0};

void setup()
{
  SerialUSB.begin(115200);              // Native USB 
  while(!SerialUSB) {}                  // Wait until USB cable is connected
  delay(500);

  /*Serial1.begin(19200, SERIAL_8N1);              
  delay(5000);*/

    //Init Arm and set LED to on if error
  SerialUSB.print("Serial1->myARM.init: ");
    SerialUSB.println(myArm.Init(&Serial1));

    //Set Sigfox mode in uplink.
    SerialUSB.print("Set Mode:");
  SerialUSB.println(myArm.SetMode(ARM_MODE_SFX));
  SerialUSB.print("Downlink Mode Enabled: ");
    SerialUSB.println(myArm.SfxEnableDownlink(true));
  SerialUSB.print("Update Config Mode: ");
  SerialUSB.println(myArm.UpdateConfig());

  delay(5000); 
} // End of SETUP()

void loop()   {
    unsigned int i;

  // Print SIGFOX config
//  int id=0;
//  myArm.Info(0, 0, &id, 0, 0);
//  SerialUSB.print("ID= ");
//  SerialUSB.println(id, HEX);

    //Send the message to sigfox
    SerialUSB.print("Sigfox Send result: ");
    SerialUSB.println(myArm.Send(&msg, sizeof(msg)-1));

  //Wait (60s of timeout) and receive the data from sigfox
  myArm.Receive(data, sizeof(data), 60000);

    //Wait 10min
    for(i=0; i<10; i++) {
        delay(60000);
    SerialUSB.println(i);
    }
  SerialUSB.println("\n");
} // End of LOOP()

And this is the result answers through the USB port:

Serial1->myARM.init: 0
Set Mode:0
Downlink Mode Enabled: 0
Update Config Mode: 0
Sigfox Send result: 12
0
1
2
3
4
5
6
7
8
9

Sigfox Send result: 12
0

In the backend I see the follwoing messages:

  1. The first message is empty, I receive 1 byte =00, the following messages are correct: 48656c6c6f20536967666f78
  2. The messages are always uplink. Noone is sent in downlink mode.

Can you please help me?

ARM_ERR_ARM_GO_AT in arminfo (RPi 3 w/Jessie)

Hi there,

The example arminfo init fails due to an ARM_ERR_ARM_GO_AT error.

Serial port configured to /dev/ttyAMA0 (this is the only one available) and reported as necessary to make.

Do you have some hints ?

Thanks a lot.

Incomplete Documentation for LoraWan

// French below

Hello,

I am trying to use your module to establish a connection using Lora. However, your documentation is very cryptic to me. How are you supposed to set all the keys ? Using armLwIds ?

Yours sincerely,
Fofeu

// French now

Bonjour,

J'essaye d'établir une connection entre votre module et une Gateway Lora. Cependant, j'ai du mal à comprendre votre documentation. Comment est-on sensé utiliser les clefs ? En utilisant armLwIds ?

Cordialement,
Fofeu

impossible condition in arm.cpp

Hi,
there is an impossible condition line 1672 of the file arm.cpp

//Check if out of range if((nbFrame > 15) && (nbFrame < -15)) return ARM_ERR_PARAM_OUT_OF_RANGE;

nbFrame cannot be higher than 15 and lower than -15 at the same time.
I suppose it should be this instead:

//Check if out of range if((nbFrame > 15) || (nbFrame < -15)) return ARM_ERR_PARAM_OUT_OF_RANGE;

Thank you anyway for this API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.