Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compression (#2806) #2819

Merged
merged 3 commits into from
Sep 24, 2023
Merged

Fix compression (#2806) #2819

merged 3 commits into from
Sep 24, 2023

Conversation

GUVWAF
Copy link
Member

@GUVWAF GUVWAF commented Sep 22, 2023

Fixes #2806.

The packet was encoded to protobufs before the decoded part was modified, so in protobufs encoding, still the old payload and portnum was used. Furthermore, while decompressing (which actually didn't happen because the portnum was not TEXT_MESSAGE_COMPRESSED_APP), the payload size wasn't modified.

Not sure if this has ever worked before, since there were no real changes in this part of the code since it was implemented.

@github-actions
Copy link
Contributor

🤖 Pull request artifacts

file commit
pr2819-firmware-2.2.8.4b522cc.zip 4b522cc

thebentern added a commit to meshtastic/artifacts that referenced this pull request Sep 22, 2023
@thebentern thebentern merged commit cdac643 into meshtastic:master Sep 24, 2023
1 of 4 checks passed
@kokroo
Copy link
Contributor

kokroo commented Sep 25, 2023

@GUVWAF Mc-hamster did a great job integrating Unishox 2 but I guess all of us got mislead into thinking that compression is working, especially since Longfast has really short airtime. This bug became apparent only after I used VeryLongSlow.

Big thanks to you and @mc-hamster for working on compression!

I hope you were able to verify that compression actually works now? My long sample message which contained dozens of 'hello's should go across on VeryLongSlow in less than 8 seconds instead of 27 seconds. I'm currently far away from my laptop and civilisation so can't check it out myself unfortunately.

@GUVWAF
Copy link
Member Author

GUVWAF commented Sep 25, 2023

Yes, confirmed on VeryLongSlow:

DEBUG | ??:??:?? 66 [SerialModule] Add packet record (id=0x00453f8b fr=0x00 to=0xff, WantAck=1, HopLim=3 Ch=0x0 Portnum=1)
DEBUG | ??:??:?? 66 [SerialModule] Length - 227, compressed length - 20
DEBUG | ??:??:?? 66 [SerialModule] Original message - Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello H
DEBUG | ??:??:?? 66 [SerialModule] Using compressed message.
DEBUG | ??:??:?? 66 [SerialModule] Expanding short PSK #1
DEBUG | ??:??:?? 66 [SerialModule] Using AES128 key!
DEBUG | ??:??:?? 66 [SerialModule] enqueuing for send (id=0x00453f8b fr=0x39 to=0xff, WantAck=0, HopLim=3 Ch=0x59 encrypted)
DEBUG | ??:??:?? 66 [SerialModule] txGood=2,rxGood=0,rxBad=0
DEBUG | ??:??:?? 66 [RadioIf] Starting low level send (id=0x00453f8b fr=0x39 to=0xff, WantAck=0, HopLim=3 Ch=0x59 encrypted priority=64)
DEBUG | ??:??:?? 66 [RadioIf] (bw=62, sf=12, cr=4/8) packet symLen=65 ms, payloadSize=40, time 6045 ms
DEBUG | ??:??:?? 66 [RadioIf] AirTime - Packet transmitted : 6045ms

thebentern added a commit that referenced this pull request Sep 26, 2023
thebentern added a commit that referenced this pull request Sep 26, 2023
@GUVWAF
Copy link
Member Author

GUVWAF commented Sep 26, 2023

@kokroo FYI this has been reverted since it caused a breaking change with previous firmware versions (#2833). It will be added for the 3.0 release. It can be used though if you only use devices on 2.2.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Compression does not work at all
4 participants