Suspend/Wake server when in wifi range - General Questions and Answers

I'd like to suspend/wake a server when I disconnect/connect with my home wifi network.
I can suspend it via ssh'ing and running pm-suspend (it runs Ubuntu) and I can wake it by sending a Wake On Lan packet.
Scripting a cron job would be adequate if doing it on the wifi events isn't practical as I'm usually at home at the same times.
(Using a HTC Desire with a recent Oxygen ROM).
Thanks in advance for any suggestions.

Wake on Lan when you connect is pretty straight forward.
Make app with service running, if connected to wifi with certain SSID, send wake on lan.
Suspending the server will have to be done on the server, as the android won't know when it disconnects and normally can't use the network at the point it knows.
You could make a cronjob on the server with a script that counts the time your android is disconnected (not straight away if you are having connection problems) and suspend it after X minutes if you device doesn't reconnect.

Related

VPN connection closes too fast

Hello,
I'm having some questions regarding a VPN connection, namely the fact that it seems to close it down quite fast. I have configured a PPTP VPN on my TyTN.
When I now connect to my mailserver (using Pocket Outlook), it first connects to the VPN (both when I'm using wifi or gprs/umts), and then connects to the mailserver. However, when I then choose to download a mail message, it reconnects to the VPN (which takes quite a lot of time).
Similarly, in Pocket Internet explorer, the VPN is also re-established when moving from one site to another.
Even worse, is that in Skype, the VPN connection is not seen as a wifi connection (so it says it cannot connect). I can circumvent this by first launching Pocket Outlook or Pocket Internet Explorer, which opens the VPN. Skype can then use the connection, but the VPN is closed after 30s (if when in the middle of a conversation!).
None of these problems occur on a laptop connected to this VPN. I'm guessing there is something on the TyTN that causes the VPN to be shut down. I have tried setting up a website that refreshes every 20s to keep the VPN open, but it doesn't prevent it from closing (and it doesn't reopen a closed VPN).
Is there a way of keeping a VPN open ?
(either by a registry hack - some timeout setting, or by some 3rd party software)
Thanks!
Jörg

Android WIFIMANAGER tweak

I have a very unique situation where I need the wifimanager to scan every 10-20 seconds for a new WiFi Access point, and be able to determine by the RSSI value to either stay connected or switch to the stronger Access point.
We have a routed Mesh network, where the AP's all can are DHCP, but they run through tunnels. So during a VOIP call, it would be nice to have the wifimanager be able to scan and handle that handoff. The asterisk server we are using holds the calls as the handoff is taking place, and when using a windows mobile device I have been able to modify an app to make WM6 make the transition in under 5 seconds.
I am in no way an Android programmer, but my client wants to switch to Android, and I need to see what kind of Mountain I am tackling.
The handheld we are using, is strictly wifi b/g no cellular
Thank you in advance for any help you could offer.

WOL and the Captivate

Anyone out there using the Captivate to wake up a computer in a LAN segment using WOL? I tried a couple WOL applications from the market to test WOL while connected via WiFi to my LAN. My laptop connected to the same router is able to send WOL packets and wake up my server successfully, but my Captivate can not. Using Wireshark I can see only ARP requests from my Captivate when I try to send WOL packets to the my server. No magic packets. During the same capture session I also send WOL packets from my laptop and they arrive fine. I read somewhere about an issue with Android 2.1 and Network Masks other than 255.255.255.0 could this be the issue? I thought WOL relied on MAC addresses only... but maybe not.
I use the "Wake on Lan" app and works well.
Solved... removed and re-installed the WOL app and now an option to send the WOL packets as broadcast to the 255.255.255.0 subnet appears under settings. Checking this option solved the problem.

Wireguard VPN to home server and Chat features (RCS) connection issues?

I use Wireguard on Android to tunnel to my home network when I'm remote to use my home network's Pi-Hole adblocking. When connected to the VPN though, RCS chat features fail to connect (it just gets stuck "connecting..."). As soon as I disable the VPN the chat features connect successfully. I've googled this is seen that it's a pretty common problem among Android VPN users, but all of the results seems to be about a year old. Has there been any progress on fixing this issue? Is there anyway to exclude Google's connections from the wireguard tunnel?
Interestingly, when I'm at home on wifi while my phone also indicates I'm (apparently) connected to the wireguard VPN (which is redundant since it's tunneling me to the same network network I'm already connected with wifi), chat features actually connect successfully. I only experience connection issues with I'm on LTE/5G...Although, typing this I realize I'm going to need to test it on another (remote) wifi network.
Thanks
Seems like they fixed this finally (I'm cautiously optimistic anyway). Has anyone else noticed the same?

High jitter with wifi tethering

I've been experiencing this issue for a while with my Samsung Fold4. I suspect the problem is some Android process is set to a low priority because of a power saving setting, but have no hard evidence, so am looking for suggestions on how to further debug.
What I have observed:
Locally on my phone while using its 4G connection:
1. Ping time to 8.8.8.8 is a consistent 18-20 ms.
Locally on my laptop while connected to my phone via wifi tethering:
1. Ping time to my phone is a consistent 8-10 ms.
2. Ping time to 8.8.8.8 (via my phone's 4G) as measured on my laptop is 20-30 ms about 80% of the time, but 20% of the time I get big spikes to 200-600 ms.
3. Ping time when run from my laptop, but measured on my (rooted) phone via tshark on both the tethered wifi device and 4G device is a consistent 18-20 ms.
Locally on my laptop while connected to my phone via USB tethering:
1. Ping time to my phone is a consistent 1 ms.
2. Ping time to 8.8.8.8 is a consistent 19-21 ms.
So it seems there is a random delay introduced by the tethered wifi device.

Categories

Resources