Data size no match with Raspberry Pi pico

Home Forums The libraries hosted on the site EByte LoRa e220 UART devices LLCC68 Data size no match with Raspberry Pi pico

Tagged: ,

Viewing 4 reply threads
  • Author
    Posts
    • #29069
      woto
      Participant

        Hello Renzo,

        Here is my code:

        from machine import UART

        from LoraWanE220.lora_e220 import LoRaE220, print_configuration
        from LoraWanE220.lora_e220_operation_constant import ResponseStatusCode

        uart1 = UART(1)

        lora = LoRaE220(‘900T22D’, uart1, aux_pin=2, m0_pin=10, m1_pin=11)

        code = lora.begin()
        print(“Initialisation: {}”, ResponseStatusCode.get_description(code))

        code, configuration = lora.get_configuration()

        print(“Retrieve configuration: {}”, ResponseStatusCode.get_description(code))

        print_configuration(configuration)

         

      • #29070
        woto
        Participant

          It works.

          But now I want to transmit at 868MHz instead of 873MHz. Where can I set this?

          Best regards,

          Woto

        • #29071
          woto
          Participant

            The answer from program is:
            Initialization: {} Success
            Retrieve configuration: {} Success
            —————————————-
            HEAD : 0xc1 0x0 0x8

            AddH : 0x0
            AddL : 0x0

            Chan : 23 -> 873

            SpeedParityBit : 0b0 -> 8N1 (Default)
            SpeedUARTDatte : 0b11 -> 9600bps (default)
            SpeedAirDataRate : 0b10 -> 2.4kbps (default)

            OptionSubPacketSett: 0b0 -> 200bytes (default)
            OptionTranPower : 0b0 -> 22dBm (Default)
            OptionRSSIAmbientNo: 0b0 -> Disabled (default)

            TransModeWORPeriod : 0b11 -> 2000ms (default)
            TransModeEnableLBT : 0b0 -> Disabled (default)
            TransModeEnableRSSI: 0b0 -> Disabled (default)
            TransModeFixedTrans: 0b0 -> Transparent transmission (default)
            —————————————-

            Here you can see, the Chan-Value is 23, but i have changed it to 18 in line 165 of lora_e220.py.

          • #29072
            woto
            Participant

              I have now implemented the setting of the set_channel property in the library:

              
              def set_channel(self, CHAN = 23):
              self.CHAN = CHAN
              

              In the programme I then added two lines of code after lora.getconfiguration:

              
              code, configuration = lora.get_configuration()
              configuration.set_channel(18)
              code, configuration = lora.set_configuration(configuration)
              

              Now it works.

              best regards
              Woto

            • #29077
              Renzo Mischianti
              Keymaster

                Hi woto,
                you don’t need to change the library.
                You can find how to use the library for e32 (similar to E220) in this article.
                EByte LoRa E32 & MicroPython: a detailed look at configuration – 3
                I create a specified tutorial for E220 soon.

                code, configuration = lora.get_configuration()
                configuration.CHAN = 18
                code, configuration = lora.set_configuration(configuration)

                Bye Renzo

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.
            Exit mobile version