CubeCell: How can I receive data on the node?

Hi,

I looked through almost all sources (V0.0.4) but couldn’t find any hints on how to receive data on the node.
Can somebody point me into the right direction?

BR
tuxscreen

Hi can you explain what Sort of data you want to receive? And how you want to use it. Do you mean LoRaWAN data or LoRa data.Do you have a gateway or one near by or you you have two of them to send data between units. Let the group know to see if we can help. Simon

there is now an example for data rcv:

2 Likes

wonderful, this is a huge improvement (it’s not just an example, @Supporter added a hook to allow a function to be implemented/overridden).

Hi Sivaelid,

we use the downlink normally to configure the “transmission frequency” of a node.
Sometimes you want a better resolution in time, while most of the time you only need 1 value per hour.
So - just a couple of bytes (I use one byte) for my beehive weighting sensors
Just some HX711 and temperature…

BR
Marc

Hi Marc (Tuxscreen) The latest update see above by Arron, should meet your download needs though need to be adapted to your sensors. I have yet to use it myself. as so new.

Simon

Hey Simon,

I just ordered the developer board a couple of days ago. I hope to get my code and a little breadboard ready the day the board arrives from china :slight_smile:

I saw the new example code, looks promising and quite easy to adapt to my needs

BR
Marc

I’m not a seasoned programmer. How can I use this in my code?
KR
Andre

need a little help with my code:

//downlink data handle function
void DownLinkDataHandle(McpsIndication_t *mcpsIndication)
{
  Serial.printf("+REV DATA:%s,RXSIZE %d,PORT %d\r\n",mcpsIndication- 
  >RxSlot?"RXWIN2":"RXWIN1",mcpsIndication->BufferSize,mcpsIndication->Port);
  Serial.print("+REV DATA:");
  for(uint8_t i=0;i<mcpsIndication->BufferSize;i++) {
    Serial.printf("%02X",mcpsIndication->Buffer[i]);
  }
  Serial.println();
  for(uint8_t i=0;i<mcpsIndication->BufferSize;i++) {
    if (mcpsIndication->Buffer[i] == 220) { // DC for APP_TX_DUTYCYCLE; 0D BB A0  for 900000 (15min); 
04 93 E0 for 300000 (5min)
      APP_TX_DUTYCYCLE = mcpsIndication->Buffer[i++]<<32|mcpsIndication->Buffer[i++]<<16|mcpsIndication->Buffer[i++]<<8|mcpsIndication->Buffer[i++];
      Serial.print("  new DutyCycle received: ");
      Serial.print(APP_TX_DUTYCYCLE);
      Serial.println("ms");
      SaveDr();
    }
  }

}

I can see my debug print for new DutyCycle received but how can i save it to flash like setting the dutycycle with the at commands?