Page 1 of 2
Force use of WiFi interface for HTTP Request
Posted: 06 Jun 2018 12:57
by Wibbly
Context of request:
http://automagic4android.com/forum/view ... 453#p21453
Is forcing use of a specific interface possible as an action option?
Re: Force use of WiFi interface for HTTP Request
Posted: 07 Jun 2018 19:33
by Martin
I'm not yet sure if this is possible for action HTTP Request. It seems that it would be possible to temporarily force Automagic to use the WiFi interface for all network requests on Android 6+ but not for a single HTTP Request so it could have side effects when other actions would try to access the internet at the same time the HTTP Request is executed.
I'll investigate if there's a better way that does not globally affect all network requests by Automagic.
Regards,
Martin
Re: Force use of WiFi interface for HTTP Request
Posted: 08 Jun 2018 07:23
by Wibbly
Even a separate action to enable/disable all network requests to use the WiFi interface would be a
lot better than trying to rely on Control UI to toggle the network data setting
Re: Force use of WiFi interface for HTTP Request
Posted: 08 Jun 2018 19:00
by Martin
I could provide a new action to force the use of a particular network interface for network access in Automagic. I've never used this API of Android before so I have no experience if it actually works but let me try to add the action so we can test it.
Regards,
Martin
Re: Force use of WiFi interface for HTTP Request
Posted: 20 Jun 2018 09:10
by jordancaver123
HTTP is a text-based protocol, in detail to be more correct it is an ASCII based protocol. This means that all the communication is attractive much readable, no decoding, no translation or decryption. Look at an HTTP trace and you'll be attractive much able to read it, separate out all the GET requests and responses and it's not that solid to follow also. Of course, this is slightly upsetting in this world where we are told to encrypt and secure our identities, the method of transport which delivers most personal information operates almost totally in clear text.
Thanks & Regards,
Jordan Caver
Web Development Toronto
Web Development Company
Re: Force use of WiFi interface for HTTP Request
Posted: 20 Jun 2018 10:06
by Wibbly
jordancaver123 wrote:HTTP is a text-based protocol, in detail to be more correct it is an ASCII based protocol. This means that all the communication is attractive much readable, no decoding, no translation or decryption. Look at an HTTP trace and you'll be attractive much able to read it, separate out all the GET requests and responses and it's not that solid to follow also. Of course, this is slightly upsetting in this world where we are told to encrypt and secure our identities, the method of transport which delivers most personal information operates almost totally in clear text.
Correct, and this is bit off topic, but in my case it's non-personal data that's being sent by Automagic that's being used to control a relay and it's being sent over an encrypted WiFi connection to the end device (internet not involved)
Re: Force use of WiFi interface for HTTP Request
Posted: 20 Jun 2018 10:45
by Desmanto
I just remember that you can use curl with specific interface. Download the binary for android, extract the binary to /sdcard/Automagic. I don't know if latest android (Oreo 8.1) support to execute command from /sdcard (AFAI try, always fail if without root).
Use the execute command
Code: Select all
curl --interface wlan0 http://192.168.1.100/youriotdeviceaddress.htm
Re: Force use of WiFi interface for HTTP Request
Posted: 02 Jul 2018 10:38
by Wibbly
Martin wrote:I could provide a new action to force the use of a particular network interface for network access in Automagic. I've never used this API of Android before so I have no experience if it actually works but let me try to add the action so we can test it.
Regards,
Martin
Was this a no-go, or pending another release of EAP version 1.36.0-dev?
Re: Force use of WiFi interface for HTTP Request
Posted: 02 Jul 2018 17:56
by Desmanto
We don't know yet. Martin probably has his own schedule on implementing various features. It always takes more time at the first addition, as many things need to be taken care. Planning, checking for possible crash, future update, and so many things. Unless it is a critical bug which need immediate attention (such as the last one on Start Activity, EAP 1.36.0). So many planning at first addition is also to reduce the possibility of the critical bug in the future.
I will just wait and use workaround first if possible. Many of my previous requests were added, but not in the order I request it. Some maybe easier (especially if it is just extension of current feature), some may take longer time, as it is new feature.
Re: Force use of WiFi interface for HTTP Request
Posted: 05 Jul 2018 19:07
by Martin
The option to specify the type of network to use in action
HTTP Request is available in the EAP version:
added option in trigger HTTP Request to listen for requests on the WiFi interface only
I've not added an action to change the default network type for all network accesses for Automagic since this could have unexpected side effects.
Regards,
Martin