Android ICS ping Issue after WAKEUP from suspend - android

We are working on a device which is running on android ICS 4.0.4 and 3.0.35 kernel. The issue we are facing is with device power management and network reach-ability. once device comes up from suspend mode it is not able to ping any ip address say 8.8.8.8 immediately. some times it take a minute or 2 minutes or sometime it becomes unreachable telling buffer space not available/ destination unreachable. but if we ping this device ip from outside it is responding and from device side also it starts getting ping reply from 8.8.8.8 what could be the reason for such behavior? and where could be the problem? we are clueless, the connection is through mobile data i.e. pppd. every thing seems OK in android UI it shows connected and maintains ip also, but not able to ping anybody after resuming from suspend. because of this issue device cannot browse immediately. where could be the problem, in Android? or kernel Power management? or PPP? If anybody have faced such issue and found any solution please help.
The use case is allow android device to go into suspend mode, wait until it goes to deep sleep. wake it manually and ping any ip say 8.8.8.8 from device's android terminal.
Expected
Immediate reply for ping request.

Check whether ttyUSB or ttyACM ports are working proper after suspend/resume

The issue was with modem firmware. ttyUSB* points were use to hang, once the host M/C goes to suspend. After device resume it was not responding to any AT commands. So to prove the modem, we have experimented on ubuntu laptop.
Modem was connected to the ubuntu Laptop then allowed Laptop to go to sleep mode, after that when we resumed the laptop and issued AT commands at ttyUSB* there was no response from the modem.
So the point was clear that issue was with the modem not with our Android device. subsequently modem vendor corrected the issue in new firmware after that device retained its reachability even after host device goes to sleep and wakeup modes.

Related

Chrome Remote DevTools Connection Drops after few minutes

I am using chrome://inspect/?#devices to connect with my android device.
After ~20 minutes my device gets disconnected automatically every single time.
After it gets discontinued my device asks for allowing usb device again. And if I run adb devices on my Mac, I am unable to see my device since it got disconnected.
I wanted to know the why this is happening and is there a fix available for this or not.
Aim: I want to connect my android device at least for 3 hours without interruption.
I have tried this with multiple devices, multiple data cable and multiple physical conditions but I don't think the issue is from hardware side. USB Debugging is on and the connection stays for a few minutes without any issue, everything works fine for some minutes(not fixed but it is around 20 minutes).
Adding images of my android device and macbook after the connection gets disconnected:
If you are facing similar issues then here are the things that you can try:
Try different USB cable(s)
Try different USB ports on your machine(for some people using 2.0 port worked out)
Try the same process, with unchecked 'Discover USB Devices' in chrome://inspect (then Chrome will connect through the ADB server, not directly) ==> This solution worked in my scenario.

SSID not visible on Android Things (Raspberry Pi 3B)

I'm trying to connect my Raspberry Pi's to a WiFi network without success. Ethernet connection works flawlessly, but as I attempt to connect to WiFi using ADB as mentioned here, nothing happens. I have also tried to use the Android Things Setup Utility without success as can be seen in the terminal output.
When I try to connect through the menu option while running with a monitor connected, my particular network is not visible, even though my work's corporate networks are visible in the same menu. It should be noted that other devices are able to connect to the WiFi in question, and using any corporate network is not possible the project.
I have also tried
Using a cell phone as hotspot with similar result
Unplugging the ethernet cable when attempting to find networks(through the monitor interface)
Changing between password/open network
Both 2.4G and 5G
Changing SSID from uppercase to lowercase
Manually changing the /data/misc/wifi/wpa_supplicant.conf but cannot find any OS files on the SD card.
Reinstalling OS image.
I'm running Google iot_rpi3 v1.0.3
There seems to be no documentation on this issue, has anyone else encountered this problem?
Did you trie 20MHz bandwidth for 2,4GHz? Some devices can not find wifi network with 40MHz bandwidth or 12 and 13 channel number.
Solved! Solved again!
It appears as if the Wi-Fi list in the GUI only can display at most three network SSID's. This lead to the corporate networks effectively 'jam' access to my Wi-Fi as the list appears to be sorted by signal strength, and my network's RSSI was weaker than the corporate one's.
Edit: It appears as if the device does not retain the connection setup when powered down and moved to a location where other networks are present, thus rendering any other network, with weaker signal than the top 3 present, unusuable.
Edit2: Changing the router's channel from 12 to 6 seemed to do the trick. Something appears to be wonky with Raspberry Pi and channel 12. Could not update the locale either to lose the region lock.

Osc communication between laptop and tablet in same WiFi network

I want to let my laptop and tablet communicate via OSC using OscP5 java library.
Tablet is android device and application is made on android studio.
Laptop is Windows 8.0 and application is running on Processing 2.2.1. Both uses same library OscP5.
WiFi network is very huge and strong in public government office. Both devices are obviously in same WiFi network named - Public WiFi Free. Both devices are using wireless(WiFi)
What I'm doing is very simple.
Send some integer from tablet to laptop through UDP unicast.
When I confirm IP address,
Laptop : 192.168.25.219
Tablet : 192.168.26.83
It's strange that they have different address which are 25 and 26.
I tried to reconnect on both device many times, but they always get same IP.
Problem is not port. I certainly confirmed that port is same(13000).
and laptop is just listening 13000 port and not sending anything.
Tablet is just sending to laptop IP on 13000 port.
I searched a bit and people are saying that if 1st, 2nd,and 3rd part of IP address is not same, OSC doesn't work. Is this the problem? and if so, Why? I'm kind of noob about network so please explain easily..
Problem was firewall...
Anyone who came to this post must confirm whether firewall is blocking your port or not. There are 2 possibility that firewall is blocking your port on router level or your OS level.
The first case, you have to access administrator setting page of your router and enable VPN(Virtual Private Network) pass-through or open port.
The last case(mostly in Windows because firewall is option in OS X), you simply go to settings and disable Home network level firewall, or you can add exception for you port.
I hope someone will not have hard time like me because of firewall.

Sending data to Android device, immediately after connection to USB, results in timeout

I have the following use case:
App is running on phone.
User connects accessory to phone.
Accessory puts phone in accessory mode.
After reconnecting and opening the right USB endpoint, accessory immediately tries to send data to app.
At step 4, I get USB error 7: Transfer error on bulk endpoint: Operation timed out on the accessory. Presumably this happens because the app has not yet opened the InputStream.
What is the correct way to handle this situation?
As you are probably aware, USB is flaky at best so I'd be looking at problems with driver and/or restarting the host machine and phone. This is the only suggestion I have assuming the USB settings are good on device.
This StackOverflow Question has a lot of answers that are things that I'd look at, some are not as obvious like not using a USB3 port.
The solution turned out to be to increase the timeout for USB transfers. I'm using USB4Java, and it has a default timeout of 5 seconds. When the timeout was increased, it turned out that it took 15 seconds for the first transfer to complete. So I set it to 30 seconds.

adb can't find device after failing to connect through WiFi

Essentially, my problem is that I tried connecting my device to adb over Wifi, got to adb connect xxx.xx.xx.xxx but then adb claims that it was unable to connect to xxx.xx.xx.xxx:5555.
Ok, but now I'm having trouble getting it back to listening over USB. adb usb tells me that there isn't a device attached and adb devices gives me an empty list.
I've tried killing the adb server and then restarting it, toggling the device's debugging mode and toggling the device's USB storage transfer but nothing seems to be working. This question seems very similar to my problem but I have no idea what the guy is doing in the solution.
I'm guessing the problem is that adb is still trying to listen through Wifi but since I can't connect to it over Wifi it can never go back to listening to it over USB. Idk...
For wifi, you may be able to get it to work if you first use the browser on the device to visit a webpage or something and so effectively wake up the wifi radio and its connection to the access point. You may need to keep doing this every once in a while.
(Maybe you should listen to internet radio while you work?)
Of course your access point will have to permit peer-to-peer traffic on the local subnet. In many cases that may be the norm, but I believe an access point can be configured not to support that, and some may default to such settings. There can also be issues between wired and wireless subnets sourced from the same box.
Finally, restarting the device might get it back into USB mode.

Categories

Resources