From 52de269bf40e86f496d680b0c99d56af7c865a7d Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 9 Dec 2023 13:37:02 +0000 Subject: [PATCH] mobile-linux-push-notifications: fix broken links, and publish --- .../index.md | 5 +++-- .../mod_sane_ntfy.lua | 0 .../rtl8723cs-wowlan.py | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename content/blog/{DRAFT-2023-11-06-mobile-linux-push-notifications => 2023-12-09-mobile-linux-push-notifications}/index.md (95%) rename content/blog/{DRAFT-2023-11-06-mobile-linux-push-notifications => 2023-12-09-mobile-linux-push-notifications}/mod_sane_ntfy.lua (100%) rename content/blog/{DRAFT-2023-11-06-mobile-linux-push-notifications => 2023-12-09-mobile-linux-push-notifications}/rtl8723cs-wowlan.py (100%) diff --git a/content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/index.md b/content/blog/2023-12-09-mobile-linux-push-notifications/index.md similarity index 95% rename from content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/index.md rename to content/blog/2023-12-09-mobile-linux-push-notifications/index.md index f19678f..c4f9272 100644 --- a/content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/index.md +++ b/content/blog/2023-12-09-mobile-linux-push-notifications/index.md @@ -1,6 +1,7 @@ +++ title = "Wake-on-LAN and Push Notifications in Mobile Linux" description = "how to suspend the application cores without missing VoIP calls or messages" +date = 2023-12-09 +++ @@ -42,7 +43,7 @@ for example, [IPv4][ipv4-header] [TCP][tcp-header] packets specify their destina do this before the `rtcwake` call, then try `ssh`ing into your phone while it's asleep: with any luck it should wake! -figuring out the byte pattern which achieves what you want is painful, so i've got a script for that [here](wowlan-script). equivalent to the above is `rtl8723cs-wowlan tcp --dest-port 22`. if you have a chat application which is talking over https, you might try `rtl8723cs-wowlan tcp --source-port 443` and see that the phone wakes every time you get a message. but then you'll get spurious wakes if you leave a web browser open, etc. you could use `lsof -i4` to locate the local port(s) your IM app is using and wake more specifically on those. but you'll still hit limits with this approach, especially if you're using a chatty protocol like Matrix, or if you idle in a bunch of channels configured to notify you only on @mention. +figuring out the byte pattern which achieves what you want is painful, so i've got a script for that [here][wowlan-script] ([mirrored][wowlan-script-mirror]). equivalent to the above is `rtl8723cs-wowlan tcp --dest-port 22`. if you have a chat application which is talking over https, you might try `rtl8723cs-wowlan tcp --source-port 443` and see that the phone wakes every time you get a message. but then you'll get spurious wakes if you leave a web browser open, etc. you could use `lsof -i4` to locate the local port(s) your IM app is using and wake more specifically on those. but you'll still hit limits with this approach, especially if you're using a chatty protocol like Matrix, or if you idle in a bunch of channels configured to notify you only on @mention. enter... notification servers! @@ -221,7 +222,7 @@ anyway, put your phone to sleep, have someone send you a message that Synapse wo Prosody has [mod_cloud_notify][mod_cloud_notify] and [XEP-0357][XEP-0357], but at the time of writing, client support is wanting. easier is to hack it in server-side. -Prosody has a Lua-based module system, so we can just author our own `mod_ntfy_push` (available [here](mod_ntfy_push) or [here](mod_ntfy_push_mirror)), drop it in the modules directory, and then import it: +Prosody has a Lua-based module system, so we can just author our own `mod_ntfy_push` (available [here][mod_ntfy_push] or [here][mod_ntfy_push_mirror]), drop it in the modules directory, and then import it: ```nix services.prosody.extraPluginsPath = [ ./folder/containing/mod_ntfy_push ]; diff --git a/content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/mod_sane_ntfy.lua b/content/blog/2023-12-09-mobile-linux-push-notifications/mod_sane_ntfy.lua similarity index 100% rename from content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/mod_sane_ntfy.lua rename to content/blog/2023-12-09-mobile-linux-push-notifications/mod_sane_ntfy.lua diff --git a/content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/rtl8723cs-wowlan.py b/content/blog/2023-12-09-mobile-linux-push-notifications/rtl8723cs-wowlan.py similarity index 100% rename from content/blog/DRAFT-2023-11-06-mobile-linux-push-notifications/rtl8723cs-wowlan.py rename to content/blog/2023-12-09-mobile-linux-push-notifications/rtl8723cs-wowlan.py