Skip to content

Unable to set WinSize and WinOffset on v1.10.0 #96

@jsmif

Description

@jsmif

I'm wondering if there's some sanity checking or alteration of CONNECT_IND LLData values somewhere in the firmware that I'm missing? (I did at least look, but it seemed to me that the firmware is just using the LLData as-is.)

I made the following change to sniffle_hw.py's initiate_conn()

         # WinSize, WinOffset, Interval, Latency, Timeout
-        llData.append(3)
-        llData.extend(pack("<H", randint(5, 15)))
-        llData.extend(pack("<H", interval))
-        llData.extend(pack("<H", latency))
-        llData.extend(pack("<H", 50))
+#        llData.append(3)
+#        llData.extend(pack("<H", randint(5, 15)))
+#        llData.extend(pack("<H", interval))
+#        llData.extend(pack("<H", latency))
+#        llData.extend(pack("<H", 50))
+        llData.append(1) # WinSize
+        llData.extend(pack("<H", 0)) # WinOffset
+        llData.extend(pack("<H", 6)) # Interval
+        llData.extend(pack("<H", 0)) # Latency
+        llData.extend(pack("<H", 20)) # Timeout
+        print("setvalues")
+        print(llData)

However, it doesn't seem like it's honoring the new requested WinSize or WinOffset values, as this is what I see when I sniff the request:

image

The values other than WinSize and WinOffset are changing fine, so I'm pulling out my hair trying to figure out what's going on here. When I print out the values, they seem to be appropriate little-endian values across the board:

setvalues
[130, 89, 211, 143, 18, 255, 227, 1, 0, 0, 6, 0, 0, 0, 20, 0]

But what's so weird is that the WinSize isn't even the "3" value that it was in the original code, so I don't know where either WinSize or WinOffset are coming from unless there's some firmware-level fiddling with the data that I missed. I also reverted back to using tagged version 1.10.0 just in case I was getting any sort of weird desynchronization of python vs. fw behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions