How do I recieve the whole datas from a lora device?

Posted on
  • I used a lora for sending datas constantly, and I recieved datas in espruion.

    I recieve data like this:

    lora.on('data', function (data) {
      console.log(data);
    });
    

    but I can't get the whole datas, just one character。
    I send 'abcccc',
    but console.log always print a,b,c,c,c,c one by one.
    How do I get the whole data?

  • Thr 2020.02.20

    'I recieved datas in espruion'

    Did you mean 'Espruino?'


    Hi @user109783,

    Ref L1 lora.on As there isn't a 'lora' object listed within the Espruino Reference,

    http://www.espruino.com/Reference#lora
    http://www.espruino.com/SX127x#line=27,2­8,36

    it is too difficult to comprehend what is going on here.



    Lets start with the basics:

    Post the result of process.env so we are able to better understand the environment.

    'I send 'abcccc''

    Please post the sending code.

    'I used a lora for sending'

    Which device? (lora) and Espruino

    Which tutorial is being worked from? Please post link.

    This will assist us to respond more timely:

    Writing an effective forum post

  • Hi,

    How do I get the whole data?

    • well how do you define whole data?
    • can you define a char as end marker like .?

    If yes, then just concat until char == '.'

    Edit: check http://www.espruino.com/USART sample Serial1.on('data', function (data) {}

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How do I recieve the whole datas from a lora device?

Posted by Avatar for user109783 @user109783

Actions