I have an embedded device where I'm programming the microcontroller, MAC, and PHY and I want to send UDP packets to my Windows machine through a directly connected ethernet port.
embedded device <-> USB ethernet adapter <-> Windows desktop
I have the following Python server listening for UDP packets on the DA7A port
import socket UDP_IP = '' UDP_PORT = 0xDA7A serversocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) serversocket.bind((UDP_IP, UDP_PORT)) while True: print('hello, I\'m listening') data, addr = serversocket.recvfrom(1514) print('========\n\tConnected by ', addr) if data: print('\tdata bytes: ' + str(len(data))) print('========')
The packets as I receive them in wireshark (and create them in the microcontroller):
0000 00 e0 4c 68 01 2f 22 22 22 22 22 22 08 00 45 00 0010 00 20 80 00 00 00 80 11 00 00 64 64 64 02 64 64 0020 64 01 da 7a da 7a 00 0c 00 00 de ad be ef
But they are never received by the Python server.
I have a static IP set on the desktop as 100.100.100.1 and the firewall is set to accept inputs to DA7A.
I did get the server to receive packets from my laptop in the following config:
Laptop <-> router <-> USB Ethernet <-> Desktop
But only when using DHCP for both the laptop and Desktop. I.e. setting static IPs in Windows made the setup not work (I didn't spend much time on this setup). This makes me think there's some other setup communications I'm not aware of but I can't figure out what they are.
No comments:
Post a Comment