Complete
over 4 years ago

WERETECH-7625

Future 3.1.1 Release

Started getting a lot of BLE_REQUEST_TOO_LARGE - outgoing makeWebRequest doesn't even pass to server

Hello, recently (after some firmware or Connect app update?) I started getting BLE_REQUEST_TOO_LARGE (code -102) as a response to my makeWebRequest (it's a request from watchface's background service). 

The server doesn't even register this request, which means that it doesn't pass from watch. However, the url (https) is now only about 160 characters, and it has worked without problems for about a year.

Is there anything I can do to even debug this? Is there a known bug (Vivoactive 3) about this?

I tried shortening the request url as much as possible (it is now about 140 bytes), but no improvement, and much longer urls worked for me in the past.

  • I ran them in both - example:

    Watchface: 49696 B used, 44528 B free - this is ok

    Background: 22568 B used, 104424 B free - THIS IS TOTALLY WRONG

    Thank you very much - I didn't think the API would lie. This seems to explain everything - as I was making the url more condensed, I was shortening strings, and freed some RAM, which allowed the request to pass through. And now that I added some code (thinking there is 100 kB to use for data preprocessing) I ran out of bg service RAM, and then a request fails, and gives me the dreaded BLE_REQUEST_TOO_LARGE message (which is masking a true reason that bg service ran out of RAM during request)?

    Damn you garmin, I like your watches, but your SDK is a mess.

  • I think it's app specific (the error) as I'm running WFs/widgets with makeWebRequest calls in the background just fine with the 6.60 fw on the va3

  • Hey. I've got this captured in a ticket. We will try to reproduce this this week and figure out where the issue is. Because it works in the sim I'm guessing that it's a device specific bug, but we will figure it out. It sounds like the bug is actually the getSystemStats() giving you the wrong info.

  • Are you running getSystemStats() in the foreground or background?

    Here's what's in devices.xml for the va3:

                <app_types>
                    <app id="watchface" memory_limit="98304" />
                    <app id="watch-app" memory_limit="131072" />
                    <app id="widget" memory_limit="65536" />
                    <app id="datafield" memory_limit="32768" />
                </app_types>

    With nothing for "background", that means it's 32k. 

  • Aha - thanks, that's new! But why does Sys.getSystemStats() report about 128 kB for bg service then? I thought I have plenty of RAM in bg ...

    I might go close to 28 kB, I'll see if I can make it smaller (I thought I have enought RAM in bg, according to system stats, so I didn't care about saving it ...)