Why am I seeing no conversations between my desktop and my handheld apps with Wireshark? - networking

I've got a Windows app that runs on my desktop and connects to a Windows CE app on a handheld device. The handheld fetches data using the Windows app as its conduit (it downloads tables and then converts them into another format, but that's probably neither here nor there as far as this question goes).
Because of the bizarre anomaly we experience where in certain rare instances the handheld app hangs (if the filesize is a very specific number - see Why would a fetch operation crash when the amount of data is divisible by 1023 or 1024?), I want to see just exactly what is being passed between the two devices.
I've gotten the IP Address for both machines/devices using "ipconfig" at the command line. Running Wireshark while they communicate (activity is taking place) and then poring over the capture afterwards, I see several occasions where the desktop machine's IP Address is involved (both as the Destination and the Source) but never do I see the handheld device's IP Address...Why not?
A lot of the "talking" that the desktop machine is engaged in seems to be with wireshark, too.
So the two devices/apps obviously are communicating, but it's as if Wireshark is blind to it...???

If the desktop and handheld are communicating over a Wi-Fi network, and you're running Wireshark on the desktop machine, that should work, if you capture on the Wi-Fi network (leave promiscuous and monitor mode turned off in this case).
If you're running Wireshark on some third machine, you will have to capture in either promiscuous or monitor mode on the third machine, and monitor mode won't work on Windows. If the network is protected (WEP, WPA, WPA2, etc.), you will need to configure Wireshark to decrypt packets on the network.
If the desktop and handheld are communicating over a mobile phone network, you might be able to run Wireshark on the desktop and capture the traffic (but probably not on Windows), but you won't be able to run it on a third machine.

Related

Possible to make Wifi and 3G dongle network working together?

Hello.
I have recently been trying to mount a home automation station on a raspberry.
I need to communicate with the station via SMS. To do this, I order a 3G dongle (UMTS / GSM / 3G / 4G etc ...) operating on the country's network (verified frequencies). I connect to the network via wifi. But when connecting the 3G dongle, here I am blocked on access to Wifi.
My first question is therefore: is this normal?
And my second is: is it possible to make both work in parallel?
Thx all
It depends on the exact use case or requirement and type of device in hand.
In general, the device will choose/use the wireless connection with better connectivity strength as per its design/specification and also it depends on the support at device.
In case you have the option of WiFi Hotspot tethering enabled, it is possible that most of the devices nowadays allow you to use 3G for the internet communication and at the same time, it allows WiFi hotspot sharing with the help of WiFi from your device.
Also, few devices have support for file sharing between device to device whereby they provide support for wifi direct and wifi sharing while 3G connectivity with internet is still fine. Few devices from Samsung, support an application called "Download Booster" that allows your device to download files using WiFi connection and a mobile data connection simultaneously.
Few devices from Apple starting iOS 7 introduced Multipath TCP enables users to have their streaming music to never get interrupted while on high mobility or in trains and other vehicles with changing connectivity whereby no manual switch from between WiFi and Cellular is required in which case, the device shall stay connected over both cellular and WiFi simultaneously and whenever the WiFi connection fails, the cellular connection shall continue with streaming operation without any interruption.
There is also a app called 'Speedify' in android that uses channel bonding technology to combine multiple Internet connections together for increased throughput & redundancy and thereby it can merge WiFi and Cellular connection simultaneously. Here, a Speedify client software is used to establish a connection to a Speed Server in cloud that acts as a middleman between you and the rest of the internet. The Speedify client software then works together with Speed Server to distribute your internet traffic and deliver the combined speed of all available internet connections.

How can the Android device programatically infer the IP address of the Linux device it's tethered to?

Hi! Asked this question on many forums and nobody could answer me so PLEASE help!
I have Android device connected to Linux device via USB tethering.
On Android device I have front-end(html, js, css) browser app and on Linux device I have back-end(node.js).
There is a socket connection between front-end and back-end with defined IP:PORT.
Androids gateway is Linux device. Linux device is connected to local network.
When Android device is connected to Linux device, Linux device initializes new network interface called usb0 with static IP address.
Sockets are based on that network IP that is same on every instance of front-end+back-end devices.
I have more than 5 instances of same front-end+back-end devices connected to local network.
Is there a way to somehow find the back-end device IP address without setting it static?
My problem starts when starting all devices at the same time. Sometimes Android device in instance 1 connects to Linux device from other instance and I want to prevent that by not connection to usb0 with Android but to eth0 DHCP of Linux device. I can never know which IP address will be on Linux device but front-end app needs a IP:PORT to connect.
PORT is defined so the string for connecting is {IP + ":3000"}
I know I can see all the IP addresses on network with arp or similar but I need to do that automatic in front-end app on app start up.
I want to find first device IP address that android device is connected to. That is always a front-ends pair Linux device.
Or if it is not possible to prevent Android device to be able to connect another instance with IP tables on Linux device.
P.S I know that Android is also Linux but someone who wants to answer will know what I'm talking about.
Here is a solution describing how to listen for tethering state changes:
First you need to be familiar with BroadcastReceiver. You can find a lot of tutorials describing in great detail how this works (try googling how to listen for connectivity changes in Android).
In order to get the Tethering state update, you need to use a hidden filter action of Android (see ConnectivityManager) and in your BroadcastReceiver class:
IntentFilter filter = new IntentFilter("android.net.conn.TETHER_STATE_CHANGED");
then register the filter to your BroadcastReceiver:
myApplicationContext.registerReceiver(this, filter);
In your onReceive(final Context context, final Intent intent) method, the Intent.extras information contains 3 arrays filled with the corresponding tethered network interface:
erroredArray / availableArray / activeArray
It's a little bit tricky but you can get the tethering status information.
In addition, you can do some reflexion on a hidden function of Android code:
Search for getTetherableIfaces() in the Connectivity Manager.
Here is a link: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/net/ConnectivityManager.java#L1604

wireshark is not capturing packets on lan which are sent via mobile phones or tablets

I am using wireshark to capture packets. it only captures packets from other laptops or computers in promiscuous mode, but it does not capture packets from android devices or phones, tablets, etc. can anyone please tell any other software for capturing and analyzing packets sent from mobile phones?
Connect the PC running Wireshark to the same wireless node as the phones/laptops over Wi-Fi, then you should see packets.
Wireshark is exactly what you need but you need to be on the same network without anything like 'wireless isolation' enabled. Normally I setup an ad hoc connection on the machine I am capturing from and connect the device directly to that.

How to check port is up or down with SNMP

I develop a app which discovers a network topology and draw it programmaticly with java and SNMP4j
I send CDP and LLDP requests to devices and analyze result of this. However there are devices which has not support CDP or LLDP(like Access Point) therefor I cannot discover it. I must show it as unkown device.
Thanks to CDP and LLDP I know which device is on which port. To understand unknown device is on which port,
I need a oid to learn up and down ports of the Switch with SNMP or another method.
I use SNMP4J
The table dot1dTpFdbTable (1.3.6.1.2.1.17.4.3) shows which MAC addresses can be reached on which ports.
Two things to watch out for: it is not supported by all devices and it does not only list the connected devices but also everything connected to those devices.

Why can't I view traffic on other devices using WireShark

I'm running WireShark on the latest version of Ubuntu and I can't seem to be able to capture traffic coming from other devices besides my own. I see a TON of SSDP packets but not much of anything else. Also, I notice that a lot of the packets seem to be encrypted because they have mostly characters that don't mean anything in them. I am positive that I have Promiscuous Mode turned on. Can anyone help with this? I just would like to see decrypted traffic on other devices (my Nexus tablet in particular).
Edit: I can see IP addresses of other devices, however I can't see any TCP packets for them. Only SSDP
If this is on a wired network, it might be switched.
If this is on a wireless network, you might have to capture in monitor mode.
In both of those cases, promiscuous mode won't be sufficient.

Resources