This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

[closed] UDP packets not received

0

I am trying to build a socket to retrieve the ethernet packets from ecu. When i run my code on windows there is no problem and the code runs correctly. But when i run my code on Linux it gets stuck at s.recv(65565) as no udp messages are received by Debian(raspberry pi). I have already set static ip in /etc/network/interfaces as follows: iface eth0 inet static address 160.48.199.91 netmask 255.255.255.0 gateway 160.48.199.1

The code is as below:

 import socket
    import sys
    HOST = "160.48.199.91"
    port = 30490
    s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_UDP)
    s.bind((HOST, 30490))
    while True:
         data = s.recvfrom(65565)
         print(data)

There is no LAN or Router. When i check netstat -s i see that there are 0 UDP and 0 TCP messages received. But when i check in Wireshark on Debian i could see the displayed UDP packets. Does it mean that the UDP packets are reaching the Raspberry Pi but not received by Debian OS ?

I know this is not related to this forum. But any help would be appreciated as i need to solve this problem urgently for my thesis.

asked 11 May '15, 07:27

Praju's gravatar image

Praju
11336
accept rate: 0%

closed 11 May '15, 08:16

grahamb's gravatar image

grahamb ♦
19.8k330206

Sorry, you're much more likely to get help in a Python focused site.

(11 May '15, 08:16) grahamb ♦

The question has been closed for the following reason “Question is off-topic or not relevant” by grahamb 11 May ‘15, 08:16