osresearch / airbreak

CPAP jailbreak to allow it to be used as a temporary ventilator
MIT License
257 stars 68 forks source link

Patching firmware of existing ASV #65

Open sadsled1234 opened 6 months ago

sadsled1234 commented 6 months ago

Hi, I have an ASV and I'm trying to jailbreak it so I can set the maxPS value to 5 while keeping the minPS at 3. Would I be able to achieve this by following the standard firmware patching instructions? (By patching the official firmware of my ASV device) Will it still function the same way, but with more freedom to set maxPS?

For more context, the ASV has solved my CA events but I've noticed my heart rate goes up whenever the PS ramps up Thanks :)

smhc commented 5 months ago

Were you ever successful in doing this? I attempted to patch the 305 ASV firmware with the patches from:

https://github.com/Asmageddon/airbreak-plus/blob/master/patch-airsense#L149 https://github.com/Asmageddon/airbreak-plus/blob/master/patch-airsense#L139 https://github.com/Asmageddon/airbreak-plus/blob/master/patch-airsense#L40

(with some minor address fix ups) But had no luck. Do you have 40x ASV firmware to test with?

smhc commented 5 months ago

I managed to patch the 5cm difference limit for asv-37043-SX567-0305.bin firmware (sha256sum 14b5a63f9fc3bb03a1e023c67492e969f7cba007907bbe69719e0114f11fbb9f), even though it didn't seem to allow having a difference less than 5 on first install. After messing with some other firmware it eventually worked ok - I think it required the memory erase that it sometimes does when switching firmware.

base64 xdelta patch follows:

JVhEWjAwNCUAAAAIABgAFwAAAAAAAAAAAAAAAAAAAABhc3YtMzcwNDMtU1g1NjctMDMwNS5iaW5h
c3YtcHMtbm8tbGltaXQtMzB4LmJpbh+LCAAAAAAAAAM74HaHlYHBCEEwMDAwAkkuBk9GNgYWhi8M
wgwngGKYcgxAOQ0UOQYGAHtlTJhOAAAAH4sIAAAAAAAAA2NgaGBmYGDSaLv99Pe/Caf/bWv7Zvsp
WY+7ocGBkYlHoyCxJDlDISWxJFHz52EVr9OXlhzZL+B9carm60A/RkaJxOIyXWNzAxNj3eAIUzNz
XQNjA1O9pMw8Pwmen5d/cs2JsZgVlipxzBRoGgODMCPDB0agXYyfGLfNBTJYGdfOZxQH0SfnMz6P
ZWCwZXz7l7Ed6BxGxq8NTN2MIEZjE1P3NWkQq/eGrDaI3nlDdipY6vxN2Y3LlACW9/WKwQAAAAAA
AIolWERaMDA0JQ==

and an xxd dump of the modified lines that can be applied with xxd -r:

000000f0: c046 03d1 fff7 ddff 0020 10bd fff7 c1ff  .F....... ......
00004fa0: 0701 1100 9001 0000 dc05 0000 3200 0000  ............2...
00004fc0: e803 0000 dc05 0000 3200 0000 0100 3200  ........2.....2.
00007eb0: dc05 0000 3200 0000 0100 3200 0a00 4901  ....2.....2...I.
00007ec0: 0600 0400 f400 1300 c800 0000 dc05 0000  ................
00007ed0: 3200 0000 0100 3200 0a00 4901 0600 0000  2.....2...I.....
00007ee0: f400 2800 c800 0000 dc05 0000 3200 0000  ..(.........2...
00008070: e803 0000 0000 0000 0100 3200 0a00 4901  ..........2...I.
00008100: 0000 0000 0100 3200 0a00 4901 0700 0000  ......2...I.....
00076c00: abfb 00f0 17f8 fff7 baff 00f1 0001 2aa8  ..............*.
00076c30: f5f7 ecbe 201a a0f1 0001 1ca8 f5f7 e6be  .... ...........
00076cc0: 00f0 4afb fff7 b6ff fff7 59ff 00f1 0001  ..J.......Y.....
romanaleksejuk commented 1 month ago

@sadsled1234 Is it possible to contact you directly by some other communication channel? 🙏 Haven't found any ways to contact you in github (checked profile page). I have a Central Apnea also, and have some questions on APAP->ASV. Could you please contact me ( aqzqswxwdece[at]protonmail.com ) if possible or provide any contacts on any social/messaging platforms? i would really appreaciate that 🙏