REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    REXduino - Communication failure between Raspberry PI and Arduino_MEGA

    General
    3
    16
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      reitinge @mtomek
      last edited by

      @mtomek This system log output looks exactly like the one from the previous topic. Are you sure this is a different problem?

      M 1 Reply Last reply Reply Quote 0
      • M
        mtomek @reitinge
        last edited by

        @reitinge Hi,
        it isn´t related to the previous problem. This was solved by deploying the latest version of FB Arduino_MEGA2560hex and the latest library.
        But, during panel repairs, I accidentally found out that I have a broken USB cable between the RaspberryPI and ArduinoMEGA. This error did not recur after replacing the cable. So I will hope that this was the problem.
        Michal

        M 1 Reply Last reply Reply Quote 0
        • M
          mtomek @mtomek
          last edited by

          @mtomek Hi,
          after three weeks, without a communication problem, the communication error came again. The communication error came exactly after the "peak" of the 1-wire Tsolar measurement (see graph below). The "comm_status" of FB Arduino_MEGA2560hex changes from 0 to 1 (0: Arduino not responding, waiting for timeout to try again, 1: Serial port open, trying to initialize communication).
          I still get 1-wire measurement errors in System Log ...

          This communication error has not yet occurred. Could it be related to that "peak" of measurement?

          Thanks.
          Best regards
          Michal

          5ad1ca89-8a61-4bbb-8cb0-313f9d7f55f1-obrazek.png
          b48b8bf9-40b8-44bf-a45c-db4fcb62d45b-obrazek.png
          30ab81d8-11cb-44fe-8b9b-44514c4e803f-obrazek.png
          9abdfc26-0dbd-44f2-a107-c1adff2f1d44-obrazek.png

          R 1 Reply Last reply Reply Quote 0
          • R
            reitinge @mtomek
            last edited by

            @mtomek Dear Michal,
            this 52 51 error (1-Wire bad crc) is usually associated with data corruption during transmission. That's why the peak appeared on the chart. The data is not relevant at this time. Does this error occur often?

            Cheers,
            Jan

            M 1 Reply Last reply Reply Quote 0
            • M
              mtomek @reitinge
              last edited by

              @reitinge Hi,
              error 52 51 occurs continuously, see below. I only record "peak" in the graph occasionally, because I archive the data every minute, see the graph below.
              Michal
              239910bc-5fc4-4098-9bc3-d3d5024d93cb-obrazek.png
              1b63a5c7-ba20-48ac-8641-9b1127343b3a-obrazek.png

              R 1 Reply Last reply Reply Quote 0
              • R
                reitinge @mtomek
                last edited by

                @mtomek
                Hi Michal, we've been thinking about your problem and come to the conclusion that the 1-Wire bus may still be overloaded. After all, you have a lot of those temperature sensors there. Please try to increase the task period from 1 s to 1.5 s or disconnect a few sensors. If both errors and peaks disappear, there is a problem with 1-Wire.

                Best regards,
                Jan

                M 1 Reply Last reply Reply Quote 0
                • M
                  mtomek @reitinge
                  last edited by

                  @reitinge Hi,
                  I have currently 6x 1-wire sensors connected. Each sensor is connected separately to Arduino pins 26 to 31. I increased the task period from 1s to 2s. I did that on September 22nd. Today came a new communication error, see the picture below. The serial line dropped out for a moment. Communication resumed immediately. New fault codes have appeared in the system log.
                  What could have caused it?
                  Thanks.
                  Michal
                  833b4550-1b7f-4bb0-a3ae-83ac403202e5-obrazek.png

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    reitinge @mtomek
                    last edited by

                    @mtomek Hi Michal,
                    according to REXduino_slave.ino, the errors mean:

                    49 52 - Error command - wrong pin number
                    51 49 - Serial bus buffer is full
                    49 50 - Error command - unknown command

                    Unfortunately, I can't say remotely what happened. Have this errors been repeated? Has there been an error 52 51 since the last time?

                    Cheers,
                    Jan

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      mtomek @reitinge
                      last edited by

                      @reitinge Hi Jan,
                      I continuously monitor the system log. None of the errors (49 52, 51 49, 49 50 or 52 51) that I solved last time have come. Errors still occur 52 51. I replaced one of the 1-wire sensors that oscillated the most, so there are fewer errors, about 10 errors a day (see below).
                      It would not be bad if the system log could list the REXLANG error even with the pin where the errors occur. This would make it easier to find out which sensor has the most errors.
                      Best regards
                      Michal
                      7b2ad537-760c-498f-a139-58d26c364dea-obrazek.png

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        reitinge @mtomek
                        last edited by

                        @mtomek Hi Michal,
                        I think you can track the PIN number where error occurs when you configure the system log, as described in the last point of the Troubleshooting section described here: https://github.com/jaroslavs/REXduino/blob/master/REXduino_User_Guide.pdf.

                        Cheers,
                        Jan

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          mtomek @reitinge
                          last edited by

                          @reitinge Hi Jan,
                          it's been a long time since I had communication problems between Raspbery PI and ArduinoiMega - REXduino. See previous communication problems. I did not make any significant changes in SW.

                          In the last 2 days, there have been 2 communication failures:
                          36c80311-138e-4c7f-8d20-9a71811abb75-obrazek.png
                          This indicates an error related to the checksum of the 1-wire measurement as explained to me in the previous answer. This could be explained by ordering some 1-wire measurement.

                          But what I don't understand is that there are a lot of warnings:
                          0f6f5aaa-7cd5-4829-92a3-d813cadf639f-obrazek.png

                          What does the warning "REXduino slave warning, code: 1 1" mean please?

                          Is there a description of all error codes and warnings somewhere?

                          Thanks a lot.
                          Michal

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mtomek @mtomek
                            last edited by

                            @mtomek Hello gentlemen,
                            can someone please respond to my last question pleas?
                            Thanks a lot!
                            Michal

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              Jan Reitinger @mtomek
                              last edited by

                              @mtomek Hello,
                              I'm really sorry—I somehow overlooked the fact that you were posting in this old thread. The "Warning 1 1" indicates that the buffer for serial communication between the Master and Slave devices is full:

                              #define WARNING_SERIAL 1
                              #define WARNING_SERIAL_BUFFER_FULL 1
                              

                              Have you added any new data communication or changed the communication speed recently? I’d also like to point out that REXduino is a third-party project, and we don’t have direct control over it. I found the explanation for the warning directly in the source code here:
                              https://github.com/jaroslavs/REXduino/blob/master/REXduino_slave/REXduino_slave.ino

                              Cheers,
                              Jan

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post

                              This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

                              There is also an outdated REXYGEN community forum.

                              Powered by NodeBB.