I got this log
2021-01-15 10:07:41.179 1004-1628/system_process I/WifiService: setWifiEnabled package=com.google.android.gms uid=10119 enable=false
It seems google services turn off my wifi after connection made.
Please help, sorry for my bad english.
Some variants of hotspots require WiFi to be turned off before they can be started. Are you using STAR or POINT_TO_POINT? If so, that may be the reason.
Nearby Connections will also revert WiFi to its original state upon disconnection if Connections happened to enable it during a connection attempt.
Related
my system consists of a bluetooth accessory and an iPhone. Sometimes I see a link loss between the two devices in idle mode. I have only seen it in idle (sniff) mode so far. Sometimes it happens every few minutes, sometimes after an hour or so. I have no clue why. My accessory does a reconnect right after loosing the connection, but that is very bad user experience.
What I did so far:
I read the iPhone accessory guide and was a bit surprised about the advice to set the sniff period to 15 ms. In the example application of my chipset (CSR) I see a period of 800 slots == 500 ms. I configured my application to use minimum of 15 ms. Nevertheless the iPhone indicated a period of 384 slots.
I also checked the supervision timeout. It is set to 8000 slots == 5 seconds. Seems ok.
I also have the impression that it mainly happens if two phones are connected to the accessory. The second phone is an android. The android phone does not have a problem.
Now I run out of ideas what to do. Do you have a idea here?
Thank you,
After a lot of sniffing and debugging I found out the reason on physical layer. The situation was the following: I have a headset (HS), an iPhone (I) and an Android (A).
To reproduce I had to:
Connect HS and iPhone
Connect HS and Android. Important: The Android device had to initiate the connection.
Now the HS is in the situation where both peer devices are in bluetooth master role, the HS is in slave role on both connections.
What now happens is that both master may set the HS into sniff mode with some sniff interval which is conflicting with each other. Due to time slot collisions the connections is then lost.
One possible solution is to detect this situation on the HS and either never go to sniff mode or use a shorter timeout to change from active to sniff mode. In this case, the HS can propose the sniff intervals for both connections and prevent conflicts.
I am trying to find out what is the best way check internet connectivity in tizen. Although there is a connection manager I can think of a scenerio where it would not work. Suppose the device is connected to wifi but wifi is not connected to internet. What is the best best way to resolve this issue? I am thinking of using getaddrinfo? But would not that resolve to IP using cached value. Then should I connect to a known website (e.g. google although some country might block it)?
You can hit an address and check for response for certain time of interval. If there is no response for say 2 min or so then you can show message to user that there is some problem with Internet connection.
We are developing an application where an iPhone should connect to an cc2564 device (Specifically cc2564+msp430f5438), the application should make quick and short connections to send some data. We need reliability in the connection so we need to know if the connection was really successfully or not, and we need a way to connect to the device with assurance.
The iPhone connects correctly to de device most times, it discovers services and works as expected, but sometimes the iphone makes the connection but the callback of discovered services is never called.
We used a sniffer to look at the communication packages and we saw that in those cases the connection package was send but there wasn't any response from the device, the phone tries to retry some version request messages and then stops, as you can see in the image:
The problem seems to be on the device, we are using the SPPLEDemo sample provided by Texas, and the first function that is called when the connection is established is GAP_LE_Evenet_Callback, and when the problem occurs it's never called. We don't know if somewhere inside the GAP API the device receive the connection message.
Is there some way to debug it or to know if the connection message is received by the device when the error occurs?
Is it a problem on the iPhone (unlikely), or is a problem on the device?
You quoted that
..the first function that is called when the connection is established is GAP_LE_Evenet_Callback, and when the problem occurs it's never called..
I'd recommend tweaking (playing) a bit with connection timeouts and Link Supervision Timeouts before consulting the experts who have developed the BLE Device firmware if that is possible for you.
Be assured that whenever a connection is made, the BLE device gets an event (callback) from the BLE stack that the connection has been established.
If that event is not handled the way it should be, then you can conclude that BLE device has some implementation issue.
I need to make a network connection over WWAN (i.e. the mobile network) on an iPhone, even when the device is connected to a Wi-Fi network, however I can't find a way to do this.
I've tried going down to the socket level and iterating through the available interfaces, however when connected to Wi-Fi, the WWAN interface (pdp_ip0) disappears.
The solution needs to be App Store safe.
Enumerate the network interfaces, you will see that when you're connected on both wifi and 3g, there are 2 with different local ip addresses. You might be able to use one vs the other by forcing a bind of your socket on the right interface before sending the data. The kernel which tries to find the best interface to route your packet should be happy with your choice.
Disclaimer: I have not tried this, this is just a suggestion.
Perhaps you can use the Reachability code to determine if Wi-Fi is enabled, firing a UIAlertView to warn the users to quit the app, open the Settings app and switch off wireless manually. Not ideal, definitely.
There is no supported way to to do this. You need to tell the user to turn off the WiFi connection since "It's a non-negotiable operational requirement for the service the app needs to connect to."
In this scenario, the user is not likely to kill you with bad reviews if you are clear about why they have to disable WiFi.
-t
I know that iPhone shuts down its WiFi connection after 30 mins. Is there any way to keep it alive? How about 3G connection? Does it shuts down its 3G connection after 30 mins? Is there any way to keep the 3G connection alive?
Thanks.
Occasionally, even when you're polling something fairly regularly just too keep the connection alive, the iPhone or iPod will feel it's too hot to use the WiFi connection right now. It's probably right, and there's nothing you can do to keep the OS from disconnecting and turning off WiFi, except to pop up a "try again" dialog if you really need a connection for the current operation.
As this posting rates quite high when searching for the WIFI/WLAN iPhone problem - here's the link to the answer: iPhone SDK Internet connection detection