Transmission Does NOT Work

Viewing 4 reply threads
  • Author
    Posts
    • #12435
      C
      Participant

        The following is for the TX.

        
        #include "Arduino.h"
        #include "LoRa_E32.h"
        
        #include "SoftwareSerial.h"
        
        LoRa_E32 e32ttl(2, 3, 5, 6, 9);
        
        void printParameters(struct Configuration configuration);
        void printModuleInformation(struct ModuleInformation moduleInformation);
        //The setup function is called once at startup of the sketch
        void setup() {
        	Serial.begin(9600);
        	while (!Serial) {
        		; // wait for serial port to connect. Needed for native USB
        	}
        	delay(100);
        
        	e32ttl.begin();
        
        // After set configuration comment set M0 and M1 to low
        // and reboot if you directly set HIGH M0 and M1 to program
        	ResponseStructContainer c;
        	c = e32ttl.getConfiguration();
        	Configuration configuration = *(Configuration*) c.data;
        	configuration.ADDL = 1;
        	configuration.ADDH = 0;
        	configuration.CHAN = 23;
        	configuration.OPTION.fixedTransmission = FT_FIXED_TRANSMISSION;
        
        	configuration.OPTION.transmissionPower = POWER_20; // dBm transmission power
        	configuration.OPTION.wirelessWakeupTime = WAKE_UP_250; // Wait time for wake up
        
        	configuration.SPED.airDataRate = AIR_DATA_RATE_000_03; // Air data rate
        	configuration.SPED.uartBaudRate = UART_BPS_9600;
        
        	printParameters(configuration);
        // ---------------------------
        }
        
        // The loop function is called in an endless loop
        void loop() {
        	delay(2000);
        
        	Serial.println("Send message to 00 03 04");
        	ResponseStatus rs = e32ttl.sendFixedMessage(0, 3, 23, "yuiuyiuyiu");
        	Serial.println(rs.getResponseDescription());
        }
        
        void printParameters(struct Configuration configuration) {
        	Serial.println("----------------------------------------");
        
        	Serial.print(F("HEAD : "));
        	Serial.print(configuration.HEAD, BIN);
        	Serial.print(" ");
        	Serial.print(configuration.HEAD, DEC);
        	Serial.print(" ");
        	Serial.println(configuration.HEAD, HEX);
        	Serial.println(F(" "));
        	Serial.print(F("AddH : "));
        	Serial.println(configuration.ADDH, BIN);
        	Serial.print(F("AddL : "));
        	Serial.println(configuration.ADDL, BIN);
        	Serial.print(F("Chan : "));
        	Serial.print(configuration.CHAN, DEC);
        	Serial.print(" -> ");
        	Serial.println(configuration.getChannelDescription());
        	Serial.println(F(" "));
        	Serial.print(F("SpeedParityBit : "));
        	Serial.print(configuration.SPED.uartParity, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getUARTParityDescription());
        	Serial.print(F("SpeedUARTDatte : "));
        	Serial.print(configuration.SPED.uartBaudRate, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getUARTBaudRate());
        	Serial.print(F("SpeedAirDataRate : "));
        	Serial.print(configuration.SPED.airDataRate, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getAirDataRate());
        
        	Serial.print(F("OptionTrans : "));
        	Serial.print(configuration.OPTION.fixedTransmission, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getFixedTransmissionDescription());
        	Serial.print(F("OptionPullup : "));
        	Serial.print(configuration.OPTION.ioDriveMode, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getIODroveModeDescription());
        	Serial.print(F("OptionWakeup : "));
        	Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());
        	Serial.print(F("OptionFEC : "));
        	Serial.print(configuration.OPTION.fec, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getFECDescription());
        	Serial.print(F("OptionPower : "));
        	Serial.print(configuration.OPTION.transmissionPower, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getTransmissionPowerDescription());
        
        	Serial.println("----------------------------------------");
        
        }
        void printModuleInformation(struct ModuleInformation moduleInformation) {
        	Serial.println("----------------------------------------");
        	Serial.print(F("HEAD BIN: "));
        	Serial.print(moduleInformation.HEAD, BIN);
        	Serial.print(" ");
        	Serial.print(moduleInformation.HEAD, DEC);
        	Serial.print(" ");
        	Serial.println(moduleInformation.HEAD, HEX);
        
        	Serial.print(F("Freq.: "));
        	Serial.println(moduleInformation.frequency, HEX);
        	Serial.print(F("Version : "));
        	Serial.println(moduleInformation.version, HEX);
        	Serial.print(F("Features : "));
        	Serial.println(moduleInformation.features, HEX);
        	Serial.println("----------------------------------------");
        
        }
        
        

        ///

        
        #include "Arduino.h"
        #include "LoRa_E32.h"
        #include "SoftwareSerial.h"
        
        LoRa_E32 e32ttl(2, 3, 5, 6, 7);
        
        void printParameters(struct Configuration configuration);
        void printModuleInformation(struct ModuleInformation moduleInformation);
        //The setup function is called once at startup of the sketch
        void setup() {
        	Serial.begin(9600);
        	while (!Serial) {
        		; // wait for serial port to connect. Needed for native USB
        	}
        	delay(100);
        
        	e32ttl.begin();
        
        // e32ttl.resetModule();
        // After set configuration comment set M0 and M1 to low
        // and reboot if you directly set HIGH M0 and M1 to program
        	ResponseStructContainer c;
        	c = e32ttl.getConfiguration();
        	Configuration configuration = *(Configuration*) c.data;
        	configuration.ADDL = 3;
        	configuration.ADDH = 0;
        	configuration.CHAN = 23;
        	configuration.OPTION.fixedTransmission = FT_FIXED_TRANSMISSION;
        	e32ttl.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
        	printParameters(configuration);
        // ---------------------------
        	Serial.println();
        	Serial.println("Start listening!");
        }
        
        // The loop function is called in an endless loop
        void loop() {
        	if (e32ttl.available() > 1) {
        		ResponseContainer rs = e32ttl.receiveMessage();
        // First of all get the data
        		String message = rs.data;
        
        		Serial.println(rs.status.getResponseDescription());
        		Serial.println(message);
        	}
        	delay(100);
        }
        
        void printParameters(struct Configuration configuration) {
        	Serial.println("----------------------------------------");
        
        	Serial.print(F("HEAD : "));
        	Serial.print(configuration.HEAD, BIN);
        	Serial.print(" ");
        	Serial.print(configuration.HEAD, DEC);
        	Serial.print(" ");
        	Serial.println(configuration.HEAD, HEX);
        	Serial.println(F(" "));
        	Serial.print(F("AddH : "));
        	Serial.println(configuration.ADDH, DEC);
        	Serial.print(F("AddL : "));
        	Serial.println(configuration.ADDL, DEC);
        	Serial.print(F("Chan : "));
        	Serial.print(configuration.CHAN, DEC);
        	Serial.print(" -> ");
        	Serial.println(configuration.getChannelDescription());
        	Serial.println(F(" "));
        	Serial.print(F("SpeedParityBit : "));
        	Serial.print(configuration.SPED.uartParity, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getUARTParityDescription());
        	Serial.print(F("SpeedUARTDatte : "));
        	Serial.print(configuration.SPED.uartBaudRate, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getUARTBaudRate());
        	Serial.print(F("SpeedAirDataRate : "));
        	Serial.print(configuration.SPED.airDataRate, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.SPED.getAirDataRate());
        
        	Serial.print(F("OptionTrans : "));
        	Serial.print(configuration.OPTION.fixedTransmission, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getFixedTransmissionDescription());
        	Serial.print(F("OptionPullup : "));
        	Serial.print(configuration.OPTION.ioDriveMode, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getIODroveModeDescription());
        	Serial.print(F("OptionWakeup : "));
        	Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());
        	Serial.print(F("OptionFEC : "));
        	Serial.print(configuration.OPTION.fec, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getFECDescription());
        	Serial.print(F("OptionPower : "));
        	Serial.print(configuration.OPTION.transmissionPower, BIN);
        	Serial.print(" -> ");
        	Serial.println(configuration.OPTION.getTransmissionPowerDescription());
        
        	Serial.println("----------------------------------------");
        
        }
        void printModuleInformation(struct ModuleInformation moduleInformation) {
        	Serial.println("----------------------------------------");
        	Serial.print(F("HEAD BIN: "));
        	Serial.print(moduleInformation.HEAD, BIN);
        	Serial.print(" ");
        	Serial.print(moduleInformation.HEAD, DEC);
        	Serial.print(" ");
        	Serial.println(moduleInformation.HEAD, HEX);
        
        	Serial.print(F("Freq.: "));
        	Serial.println(moduleInformation.frequency, HEX);
        	Serial.print(F("Version : "));
        	Serial.println(moduleInformation.version, HEX);
        	Serial.print(F("Features : "));
        	Serial.println(moduleInformation.features, HEX);
        	Serial.println("----------------------------------------");
        }
        
        

         

        All things seem to be alright, but it just cannot work.

        Thanks for your reply.

         

      • #12501
        Renzo Mischianti
        Keymaster

          Hi C,
          sorry if i answer only now, but with C name your post go on SPAM and I lost It.

          Your speed air rate was different from sender and receiver. I think you must fix It.

          Bye Renzo

        • #12521
          C
          Participant

            Thanks for your reply.

            Sorry, I have fixed the air rate. The version I uploaded was not the latest.

            All of the parameters are the same now.

            • #12522
              Renzo Mischianti
              Keymaster

                Is everything working now? If you want share your project with us.
                Bye Renzo

              • #12523
                C
                Participant

                  not really

                  All of the messages seem to be fine, but the transmission does not work.
                  I think the problem here may be caused by the hardware, but the message said, “Success.”

                  It’s really confusing.

                • #12528
                  Renzo Mischianti
                  Keymaster

                    Hi C,
                    The success alert you that the sender device send the message, but it don’t kbow if a receiver receive it.

                    Try with trasparent or check M0 M1.

                    Enable debug and retry.
                    Bye Renzo

                • #13266
                  Jorge

                    Hi

                    I’m having the same problem. I’m using two Arduinos with two 868T20Ds, and using wiring and code from the fixed transmission tutorial. Both sender and receiver have the “Success” message and I have both with the exact same parameters, but the message from the sender is never received.

                    The only thing I have changed is the #define for my frequency, and everything seems to be alright, but somewhere something doesn’t work

                    Thanks in advance

                    • #13267
                      Renzo Mischianti
                      Keymaster

                        Hi jorge,
                        first try to get config to check if it’s all ok.
                        If all ok retry in trasparent transmission.
                        Then set configuration with save.
                        And now resend the message.
                        If not work try to change pull_up resistot.
                        Bye Renzo

                    • #13278
                      Jorge

                        Hi, thanks for your reply

                        I have uploaded the getConfiguration code and I got the message “No response from device! (Check wiring)”, but I’ve checked the wiring and also changed the pull_up resistor and the message it’s still there.

                        In my case I doesn’t have a 4.7K resistor so I’m using 2x2K + 2×330 + 4×10 resistors in series instead, but I don’t think there’s the problem; I’ve checked them all and they work fine, and that’s the only change I have made from the wiring in the tutorial

                        • #13279
                          Renzo Mischianti
                          Keymaster

                            Hi,
                            try to remove the resistor, some device have some different setting.
                            If problem continue try to change the e32 and execute the same code per try to reset with the EByte usb board.
                            Bye Renzo

                          • #13368
                            Jorge

                              I’ve fixed the “No response from the device” problem, although it was unplugging the M0 and M1 pins instead of the resistor.

                              Now, in getConfiguration I have “Success”, as well as in setConfiguration, where I’ve successfully uploaded and saved the configuration in both sender and receiver, but after all of that, I return to my original problem: Everything have “Success” state, but the message from the sender is never received by the receiver

                            • #13369
                              Jorge

                                It have turned really confusing.

                                I continued testing and now the configuration in setConfiguration is not saving although it’s set for save it. The getConfiguration now returns success as state, but head is different in configuration and moduleInformation. I have tried it with another pair of modules and got the same results.

                                I think the problem is somewhere around this methods, but I don’t know where is it or nor what I’m doing wrong.

                              • #13370
                                Renzo Mischianti
                                Keymaster

                                  Hi,
                                  I think the better solution is to reset all device with the original software and adaptor.
                                  Sometime when this device not wor tha software is the solution.
                                  Bye Renzo

                                • #13375
                                  Jorge

                                    Hi,

                                    How can I reset the modules ? Probably this is the case when the solution is to reset them, but I don’t know how to do it

                                  • #13377
                                    Renzo Mischianti
                                    Keymaster

                                      Hi,
                                      I use this device
                                      https://s.click.aliexpress.com/e/_A4tZaa
                                      with the specified program for e32
                                      https://www.ebyte.com/en/pdf-down.aspx?id=199
                                      Bye Renzo

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