Electronics > Microcontrollers

How to send UDP/TCP packet to ESP32 using win10 command line

(1/4) > >>

Psi:
I have an ESP32 wifi module setup to control some relays at my work but i need to be able to send it a message over wifi from the local LAN to tell it which relay to turn on/off.

For reasons i don't want to go into I can't download, install or create any app on the work machine to send a network packet to the esp32.
So what i'm after is any tool included with default win10 installs that can send a UDP/TCP packet to a given IP address (or MAC).

I though of using ping and changing the TTL byte to carry my data however ping is ICMP and it's not easy to get at the ICMP layer on ESP32 without putting it into promiscuous mode which is complicated. (unless someone knows an easy way to detect ICMP packets on esp32 ?)

Can anyone think of a command line win10 tool that i can use to send a TCP/UDP packet with a parameter i can abuse to carry my data?
It really doesn't matter what the packet is, as long as its on TCP or UDP on a particular port then i can grab the packet on ESP32 no problem.

Before you ask, yes i have permission to add the esp32 to the wifi network.

Yansi:
Type telnet in the command line.

That way you can make a bidirectional TCP connection.


After all, you can use WireShark to mess with a network.

Psi:
Can you script telnet to send a packet in a batch file though?

I wonder if a powershell script might be the best way to do this.

Yansi:
Best way is to write your own application. Handling simple ethernet communication is not that complicated. After all, you can program ESP32, why not the PC?

cv007:
http://www.powershellmagazine.com/2014/10/03/building-netcat-with-powershell/

I have not used powershell much, but that is where the power is (hence 'power'shell, I guess).

Probably time to learn powershell, and forget the last 20 years of batch file knowledge :)

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod