Tcp/udp Sending and receiving
Moderator: Martin
-
- Posts: 1
- Joined: 14 Aug 2017 05:03
Tcp/udp Sending and receiving
Please add these options
Re: Tcp/udp Sending and receiving
Hi. There's a Tasker plug-in that sends\receives tcp packets. Works with automagic too.
Haven't figured out how to use it properly though. Maybe you can give it a try.
https://play.google.com/store/apps/deta ... sendexpect
Haven't figured out how to use it properly though. Maybe you can give it a try.
https://play.google.com/store/apps/deta ... sendexpect
Re: Tcp/udp Sending and receiving
+1 for this feature. For example of TCP send/receive, as stated above, there is plugin Send/Expect
https://play.google.com/store/apps/deta ... sendexpect
This is a paid plugin.
While for UDP sender, there is plugin UDP sender
https://play.google.com/store/apps/deta ... .udpsender
It is free, but it doesn't support receiver, so maybe need to add the listener function to it.
This is different with HTTP request, which probably are the most common protocol we use.
The use case of this is quite niche, mostly in IoT or home automation. I have a wifi smart socket (Orvibo S20), but it doesn't support any automation app. So I craft a UDP packet as the command to turn it on/off. But UDP sender doesn't support receiver, so I don't get the feedback after sending the command. TCP is used if the IoT device use TCP.
The main point of this feature is we are able to craft raw TCP/UDP packet and receive the raw feedback/response. Of coz, it must support variable at the IP, port and packet sent/received. It will be nice to have some example use also, such as : DNS, DHCP, ARP, MQTT, SNMP, NTP, telnet and etc.
https://play.google.com/store/apps/deta ... sendexpect
This is a paid plugin.
While for UDP sender, there is plugin UDP sender
https://play.google.com/store/apps/deta ... .udpsender
It is free, but it doesn't support receiver, so maybe need to add the listener function to it.
This is different with HTTP request, which probably are the most common protocol we use.
The use case of this is quite niche, mostly in IoT or home automation. I have a wifi smart socket (Orvibo S20), but it doesn't support any automation app. So I craft a UDP packet as the command to turn it on/off. But UDP sender doesn't support receiver, so I don't get the feedback after sending the command. TCP is used if the IoT device use TCP.
The main point of this feature is we are able to craft raw TCP/UDP packet and receive the raw feedback/response. Of coz, it must support variable at the IP, port and packet sent/received. It will be nice to have some example use also, such as : DNS, DHCP, ARP, MQTT, SNMP, NTP, telnet and etc.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Tcp/udp Sending and receiving
+1
Was able to send a text using an Autohotkey script to my android device via UDP (kinda coincidence as I've done this for the first time ever, today!)
That way I could return status messages about running business processes to my mobile.
Would love if A4A could push a string via UDP (eg to trigger several other things like my live stream recording VLC scripts on my PC).
A nice sample of a minimalistic UDP app UDP Tool
Was able to send a text using an Autohotkey script to my android device via UDP (kinda coincidence as I've done this for the first time ever, today!)
That way I could return status messages about running business processes to my mobile.
Would love if A4A could push a string via UDP (eg to trigger several other things like my live stream recording VLC scripts on my PC).
A nice sample of a minimalistic UDP app UDP Tool
Re: Tcp/udp Sending and receiving
Can share the link to the example of your Autohotkey UDP server? Just to make sure we are on the same page.BoBo wrote:+1
Was able to send a text using an Autohotkey script to my android device via UDP (kinda coincidence as I've done this for the first time ever, today!)
That way I could return status messages about running business processes to my mobile.
Would love if A4A could push a string via UDP (eg to trigger several other things like my live stream recording VLC scripts on my PC).
A nice sample of a minimalistic UDP app UDP Tool
If you want only to communicate to your PC, you can just use web server. It is easier. (I planned to type the tutorial, but I still have another tutorial for other user in our local forum.)
I have done it via EventGhost, no need UDP, just HTTP. But still can't find ways to have the eventghost to receive the uploaded file from automagic.
For clipboard sharing (between PC and Phone) and uploading file from PC to phone have been done. Only uploading file to PC still in progress.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Tcp/udp Sending and receiving
[Android] MyControl - trigger your (compiled) scripts via your mobile phoneDesmanto wrote:BoBo wrote:Can share the link to the example of your Autohotkey UDP server? Just to make sure we are on the same page.
If you want only to communicate to your PC, you can just use web server. It is easier. (I planned to type the tutorial, but I still have another tutorial for other user in our local forum.)
I have done it via EventGhost, no need UDP, just HTTP. But still can't find ways to have the eventghost to receive the uploaded file from automagic.
For clipboard sharing (between PC and Phone) and uploading file from PC to phone have been done. Only uploading file to PC still in progress.
AHKSock Implementation (TCP for AHK):
Re: Tcp/udp Sending and receiving
Hi all
I would also love to have this UDP sending+listener action.
This would be very useful for IoT scripts.
A very simple example : send a UDP multicast packet for service discovery (i.e. SSDP, mDNS/ZeroConf, ...).
I would also love to have this UDP sending+listener action.
This would be very useful for IoT scripts.
A very simple example : send a UDP multicast packet for service discovery (i.e. SSDP, mDNS/ZeroConf, ...).
Re: Tcp/udp Sending and receiving
+1
I would love to have UDP send feature.
I would love to have UDP send feature.
-
- Posts: 69
- Joined: 14 Feb 2019 15:04
Re: Tcp/udp Sending and receiving
Hi guys,
My first post, so I first would like to express my gratitude for this project and app, it's simply phenomenal and made my life way easier.
I'm using it to automate my house, phone and generally my life.
I would love to see this feature. I'm using the send/expect tasker plugin to manipulate some Yeelight led strips, but because the plugin is using tasker variables to return the results.. well, i dont have any in Automagic.
Thanks again
My first post, so I first would like to express my gratitude for this project and app, it's simply phenomenal and made my life way easier.
I'm using it to automate my house, phone and generally my life.
I would love to see this feature. I'm using the send/expect tasker plugin to manipulate some Yeelight led strips, but because the plugin is using tasker variables to return the results.. well, i dont have any in Automagic.
Thanks again
Re: Tcp/udp Sending and receiving
I have been testing this since yesterday using netcat binary. Manual is here : https://linux.die.net/man/1/nc
It is provided by busybox nc command, so non root user should be able to install busybox non root version to get the tool. I still struggle with the ssdp discovery service, because nc drop the packet when the response doesn't come from the same IP address. It was stated to use tcpdump to get the discovery info. But if you know the IP address already of the yeelight, you can use the similar as mine.
Use {cmd} in execute root command. (or execute command for non root user).
This command will toggle the yeelight bulb 800 lumen, on or off. Replace the IP with the IP of the bulb. It will be of course much better to have this function built-in.
It is provided by busybox nc command, so non root user should be able to install busybox non root version to get the tool. I still struggle with the ssdp discovery service, because nc drop the packet when the response doesn't come from the same IP address. It was stated to use tcpdump to get the discovery info. But if you know the IP address already of the yeelight, you can use the similar as mine.
Code: Select all
toggle = '{"id":0,"method":"toggle","params":[]}\r\n';
cmd = "( echo -ne '{toggle}'; sleep 0.5 ) | nc -w1 192.168.1.100 55443";
This command will toggle the yeelight bulb 800 lumen, on or off. Replace the IP with the IP of the bulb. It will be of course much better to have this function built-in.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.