dannagle / PacketSender

Network utility for sending / receiving TCP, UDP, SSL, HTTP

Home Page:https://packetsender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UDP messages does not recieve from android app

KavinduZoysa opened this issue · comments

What OS?

  • Windows
  • Mac
  • Linux (Which distro?)

Description of issue

I have created an Android App for UDP communication. To test my App, I have installed PacketSender in ubuntu 16.04. From the PacketSender, I can send messages successfully to Android App via UDP. In the Android App, I am reading the remote host and the remote port and send back a message to PackerSender. But, in the log, I cannot see any response.

What can be the issue?

Some things to look at...

  1. Do the sample UDP packets work? (There is one that does a DNS query and another that does NTP)
  2. You can import if you no longer have the starter set: https://cloud.packetsender.com/dannagle/starterset
  3. Do you have logging turned on?
  4. Do you have the UDP server turned on? (Bottom right, there should be a button that says UDP: portnum)
  5. Do you have it in IPv4 mode? (Bottom far right, click the IP button until it says IPv4, assuming that is what you are using)

Please check my points related to each question.

1/2 -> How do I verify that the packet is working?
3 -> yes
4 -> yes
5 -> yes

Note: I was able to capture the packet in wireshark.
packet1
packet2
packet3

  • Is your Packet Sender UDP server listening on port 2399? You should see "UDP: 2399" in bottom right.
  • Do you have multiple NIC running? That sometimes causes problems in a general bind. You can IP-bind Packet Sender to 192.168.8.146 in Settings if needed and know you do not care about other IPs on your PC.
  • Have you tried a different port? Perhaps there is something wonky happening with 2399. Packet Sender by defaults binds to an open port.

Here is how to import the starter packet set...

  1. Tool --> Cloud Save and Share
  2. Go to the "Import" tab.
  3. Import the URL: https://cloud.packetsender.com/dannagle/starterset
  4. Import Packet Set button

Screenshot:
Screenshot from 2021-02-02 16-34-29

After importing, you can run these pretty reliable UDP tests:

  • DNS dannagle.com
  • DNS example.com
  • NTP query

Click Send and see you get a response in the log.
Screenshot from 2021-02-02 16-42-29

Hope that helps.

  • Is your Packet Sender UDP server listening on port 2399? You should see "UDP: 2399" in bottom right.

I change the port from 2399 to 41070. 41070 is shown in the bottom. Still, the packet is not shown in packetsender.

  • Do you have multiple NIC running? That sometimes causes problems in a general bind. You can IP-bind Packet Sender to 192.168.8.146 in Settings if needed and know you do not care about other IPs on your PC.

No, I am trying in my laptop.

  • Have you tried a different port? Perhaps there is something wonky happening with 2399. Packet Sender by defaults binds to an open port.

Yes, no luck.

Here is how to import the starter packet set...

  1. Tool --> Cloud Save and Share
  2. Go to the "Import" tab.
  3. Import the URL: https://cloud.packetsender.com/dannagle/starterset
  4. Import Packet Set button

Screenshot:
Screenshot from 2021-02-02 16-34-29

After importing, you can run these pretty reliable UDP tests:

  • DNS dannagle.com
  • DNS example.com
  • NTP query

Click Send and see you get a response in the log.
Screenshot from 2021-02-02 16-42-29

I imported the starter packet set and I was able to run it. But it does not help with my scenario.

It does not matter whether the packet is coming from an android app or any other source right?

Correct. Packet Sender does not care whether Android or any other service sent the packet.

  • To be clear, you were able to send the sample UDP packets (DNS dannagle.com, DNS example.com, NTP query), and you got a response back in the log?

If the sample packets work, it could be a firewall problem. The sample packets send to "well known" ports (53 for DNS and 123 for NTP) that are likely allowed by firewall by default. You can try to make an explicit exception to a bind port in your firewall or temporarily disable firewall protection as you troubleshoot.

Correct. Packet Sender does not care whether Android or any other service sent the packet.

  • To be clear, you were able to send the sample UDP packets (DNS dannagle.com, DNS example.com, NTP query), and you got a response back in the log?

Yes, I got the response back in the log.

If the sample packets work, it could be a firewall problem. The sample packets send to "well known" ports (53 for DNS and 123 for NTP) that are likely allowed by firewall by default. You can try to make an explicit exception to a bind port in your firewall or temporarily disable firewall protection as you troubleshoot.

After I disbale the firewall packet sender receives packet from android app. My problem is solved, we can close this issue.

Thank you a lot.

Also, I suggest you to add this issue and solution to public documentation.