• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
GUI-O Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login

Text Input On BLE, problems with more than 14 characters

Scheduled Pinned Locked Moved
Report Bugs
2
8
621
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.
  • T
    tgpa123
    last edited by 26 Feb 2024, 16:44

    Bluetooth Low Energy Device: When you try to send more than 14 characters from a text input to the remote device, the remote device does not appear to get any message. GUI-O app continues to get updates from the device, but can no longer send any updates back to the device. After 20 or 30 seconds, GUI-O comes up with "Low energy device error" and disconnects. 14 and under and behaves normally.

    Using Ethernet connection to the Design Tool doesn't seem to have any issues.

    I initially thought it was something with my device firmware, but testing the same function using the "Serial Bluetooth Terminal" app for Android, and can successfully set more than 14 characters. I tried to check the log files for GUI-O but the out_messages.log is always empty.

    Thanks!

    K 1 Reply Last reply 26 Feb 2024, 16:59 Reply Quote 0
    • K
      kl3m3n @tgpa123
      last edited by 26 Feb 2024, 16:59

      @tgpa123 Hi.

      Can you give me the total length of the payload? What is the text input UID?

      Thanks,
      Klemen

      T 1 Reply Last reply 26 Feb 2024, 17:05 Reply Quote 0
      • T
        tgpa123 @kl3m3n
        last edited by tgpa123 26 Feb 2024, 17:05

        @kl3m3n

        My UID are generated automatically in the firmware, in the case it is "14" (coincidence I know). In the BLE Terminal app I can use:

        @14 12345678901234/r/n and get success (14 characters from text input)

        If I use:

        @14 123456789012345/r/n I still get success from terminal app, but this will fail from GUI-O.

        The output log is always blank, so I can't see what exactly GUI-O is sending in this case, but I did a lot of testing with firmware, and the device doesn't seem to get any message at all from GUI-O (when over 14 chars). I can comment out any processing and just spit out the UID (on the device) on every message and get nothing when over 14chars. 14 and under and works as expected. With Terminal app, functions as expected regardless of characters.

        I could be missing something else, but at this point it appears to me to be a possible bug with specifically BLE on GUI-O?

        K 1 Reply Last reply 26 Feb 2024, 17:24 Reply Quote 0
        • K
          kl3m3n @tgpa123
          last edited by kl3m3n 26 Feb 2024, 17:24

          @tgpa123 Hi.

          I think know what is going on. It is probably related to Android default MTU size for characteristic (23 bytes, 3 bytes are used, so only 20 bytes available)...

          I will fix this by setting larger MTU size or chunking the data. Will have to analyze to implement best option.

          Thanks for the information.

          Regards,
          Klemen

          T 1 Reply Last reply 26 Feb 2024, 17:35 Reply Quote 0
          • T
            tgpa123 @kl3m3n
            last edited by 26 Feb 2024, 17:35

            @kl3m3n

            No problem,

            Thank you for you great work!

            K 1 Reply Last reply 26 Feb 2024, 17:59 Reply Quote 0
            • K
              kl3m3n @tgpa123
              last edited by 26 Feb 2024, 17:59

              @tgpa123 Just one more question.

              When using the BLE Terminal app, you are connecting to the same device with the same configuration (as in GUI-O case)?

              Regards,
              Klemen

              T 1 Reply Last reply 26 Feb 2024, 18:14 Reply Quote 0
              • T
                tgpa123 @kl3m3n
                last edited by 26 Feb 2024, 18:14

                @kl3m3n Yes exactly. No changes to device firmware.

                K 1 Reply Last reply 29 Feb 2024, 22:02 Reply Quote 0
                • K
                  kl3m3n @tgpa123
                  last edited by kl3m3n 29 Feb 2024, 22:02

                  @tgpa123 Hi.

                  I tested this on my device with ESP32 and can send longer data than 20 bytes. It seems that the server and client negotiate a larger MTU value in my case.

                  Nevertheless, I can chunk the data so that there is never more than 20 bytes by default. So, for messages greater than 20 bytes, multiple packets will be sent. Of course, the last packet will still be terminated with CRLF.

                  Regards,
                  Klemen

                  1 Reply Last reply Reply Quote 0
                  2 out of 8
                  • First post
                    2/8
                    Last post