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

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.

Related

Android Nearby Connection - Keeping wifi direct connection, reconnection with more than 4 devices

We're building an app for sending image payload between 1 to 4~5 devices using STAR strategy.
and we are keeping the connection as much as possible, and faster is better for sharing images along the devices.
As we tested more than 6 devices, after 4~5 devices connected to host device, link was not upgraded to wifi direct anymore. I guess it is restricted from code level for a performance.
But things happen when first connected device was reconnected. As our expect, when 3 devices connect to host and 1 reconnect device, it should be upgraded to wifi cuz wifi direct slots(?) are enough. But actually not. Somehow, it is treated as 5nd connected device so it cannot be promoted to wifi slot. even if we gave some minutes to be upgrade.
Is there a way to ensure that devices are maintained with Wifi direct?
There's no limitation within Nearby Connections for the number of devices we upgrade to WiFi Direct. Any limitations you're hitting are likely device specific.
I'd recommend looking at the logs (adb logcat NearbyConnections:* NearbyMediums:* *:S) to see if anything jumps out at you. They're quite verbose and relatively easy to follow along. If I'm right, and the problem is lower in the stack, turn on WiFi Verbose Logging and Bluetooth HCI Logs inside developer options (and then reboot), to get more logging at the platform layer.

no dns via ipsec tunnel android 4.4.2 xperiaz C6603 racoon

I've setup a racoon server on my linux router. It was working ok with my xperiaz (C6603) road warrior. However after I applied the latest update to android 4.4.2 (firmware 10.5.A.0.230) it stopped working correctly. I have ping from the phone to each ip (local ip or internet) but when I use FQDN it can't be resolved. I can ping the phone from within my local network too. VPN is IPSec Xauth RSA. Checking with adb DNS server is correctly set:
getprop net.dns1
192.168.6.1
I also tried pushing the same ip as dns2 but no change. I also noticed that after closing the connection to the vpn server net.dns1 remains 192.168.6.1 however the phone is able to correctly resolve addresses. In few minutes it gets changed back to my 3g provider setting.
I tried to redirect all traffic through the tunnel via the advanced vpn setting (Forwarding routes = 0.0.0.0/0) and tried to set DNS statically via the same settings (DNS servers = 192.168.6.1). Even setting the DNS server to my provider's DNS addres didn't work which makes me think the problem is with the android itself.
DNS server is working as far as I can tell:
$ dig #192.168.6.1 dir.bg +short
194.145.63.12
Forwarding is enabled on my router so shouldn't be the problem. I've read about a bug in android but it's in android 2.x and seems to impact wifi connections.
Have you seen similar problems and as I'm not an expert with android and adb, can you tell me what commands are available in adb/shell to trace the problem? Phone is not rooted and it's not possible for the moment to root it.
UPDATE:
the tunnel is working ok when I connect via wifi hotspot. The problem appears to show only via my 3g carrier. Any ideas how to work around this?
After updating to 4.4.4 I still got the same problem. Further testing revealed that the problem is more likely to be in the Android rather than my 3g carrier. Over wifi the VPN worked flawlessly after using wifi tethering from another phone via the same provider it worked ok again so my 3g carrier isn't blocking anything.
Yesterday I finally rooted my phone and installed SDFix to restore full access to my SD card. Now VPN is working ok again even via 3g. I hope someone can confirm/reject that solution as I see no relation between vpn and sd card at all. However I experienced initially the problem with my update to 4.4.2 where Sony started to follow Google's policy about storage access.

Cannot ping/communicate with Android devices on the same network

I have a nexus 7 running CM10.1 . For some reason i cannot reach it from my laptop on the same wifi network. I cannot ping in either direction. In the past i have been only able to ping one way.
Just tried out on my stock htc sensation and havent the same issue. Also the nexus and htc cant reach each other either.
I have had similar problems with other android devices, in the past i was developing an app and i could not establish a socket connection from the android device to my computer. Once i was able to successfully ping the laptop form my device everything worked.
This isn't persisant, in the past i fiddled around they eventually talked but there was no consistant solution at the time, i never got to the root cause.
I have obvsered this on 2 different wifi networks
Not sure what is happening here my understanding of networks isn't this deep.
My first guess (assuming you're using the right IP, no firewall conflicts etc.):
Check the WiFi Sleep Policy in the WiFi-Settings of your device. You should set it to Never and then try to ping it once more.
That's the way you'll find the option on your android device:
Settings -> Wireless & Network Setting -> Wifi Settings -> Press Menu button -> Advanced -> WiFi Sleep Policy

Android Wi-fi AP hotspot - without internet

There are lots of post on SO regarding setting up AP (Hotspot) on android mobile. However, in all these cases, the AP is a conduit to the outside internet world. In my case, I just want a server application running over a mobile setup as an AP. And let all the client android mobiles connect to it, send their data and disconnect if they like. No internet connection is assumed (i.e, no gprs/3g etc).
My observations: If I setup a wifi AP (via settings -> tethering and portable hotspots) when it is also connected to GPRS, then another android phone can successfully connect to this AP and send the data to the application. However, if I disable the GPRS, even though the client shows that it is connected to the AP, it can't seem to send any data. It seems that an external internet connection is a necessity for the AP mode to work.
Is this understanding correct? Or am I setting something wrong?
I know that I am late to the party (more than 3 years late :) but I was searching for a solution to this problem and stumbled upon an easy workaround. I am using a Nexus 4 with Android 5.0.1 and I can easily configure my phone to use it as an Android Wi-fi AP hotspot - without internet. Just go to Settings / Data Usage and disable "Mobile data" option under the Mobile tab. Then enable the WiFi hotspot option as usual.
I was trying to get this working in order to play with a VirtualBox machine from VulnHub.com that asked for a Bridged Connection when I was commuting to work (no Internet, but with my laptop and my mobile phone I was able to make it :)
I think you have used the internet IPs in your code not the local IPs for communications,is'nt it?
I have the same use case and was looking for the same info as you are. I checked that some of the WiFi-only tablets do not even have a HotSpot setting. Even the devices that do have it, if I remove the SIM card, I cannot enable the HotSpot (I get a message asking me to insert a SIM first).
It looks like our use case is not supported by Android. Rather, the HotSpot feature was not designed with our use-case in mind. I mean, why would an end-user want to use an Android phone or tablet in a HotSpot mode if it didn't also provide outside connectivity?

is it ok to connect 2 devices concurrently to connect Bluetooth in Android?

Iam connecting 3G phone for my Android device for internet connection and another Socket(SPP) for CAN signal receiving.Whenever I manually connect to the Bluetooth tethering via 3G phone, i can browse internet perfectly and speed is good.Whenever programmatically connect to the 3G connection, i couldn't browse internet.i checked in shell and observing that in my mobile 'device is connected' message displayed and E symbol appears.No problem for me to connect Socket.But I got problem to use 3G phone.For this iam using APN/DUN mode.I checked both but no use.Is there any performance issue here or anything wrong to connect different devices by using Bluetooth API in android.Why this happends while connecting Mobile programmatically.Please give me guidance.
Regards,
Rajendar
Yes, you can have several open connections at a time.
In fact, I've used my hands-free bluetooth on my phone, as it is connected to my ELM327 SPP device streaming at full speed. I didn't notice any hiccups.
As for losing connectivity when you are connected to multiple devices, it's most likely an issue with the DUN provider you're using.
Also it's worth stating that, on Verizon/3g phones, when you use the phone as a phone, it suspends all 3g data services until the call is terminated.
The way L2CAP defines the LT_ADDR allows connecting devices up to 7. Your connection problems is something else.

Categories

Resources