E32-433T30D Receiving Struct Problem

Home Forums The libraries hosted on the site EByte LoRa e32 UART devices sx1262/sx1268 E32-433T30D Receiving Struct Problem

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #30696
      bafti
      Participant

        Hi, I’m trying to communicate two e32-433t30d devices. Firstly, I started to communicate easy data. Like counter, I declared a counter and sent it to the other devices. And increase my counter. This example worked fine. I have no problem with my communication. However, the communication became confusing when I tried to send the structure. I can create a struct in the transmitter and fill it with sensor data (BMP280 and MPU9250). After that, I send it, and I can get a success message. But when I started to run my receiver code. I can get a data packet, but the data are wrong. They are some random numbers.

        I used the FTDI USB-TTL Convertor to supply my RF modules with 5V. And I’m using blackpill V2.0 for my transmitter and bluepill for my receiver.

        I added my main file and rf file. I don’t organize my code. I’m sorry about that. If you can help me resolve my problem, it will be wonderful.

        • This topic was modified 1 year, 5 months ago by bafti.
      • #30703
        Renzo Mischianti
        Keymaster

          Hi Baftu,
          I think you set the pointer for the structure, not the structure of single elements.
          You must create a fixed structure with fixed-size elements.
          Bye Renzo

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.
      Exit mobile version