Android - Connecting Android Phone and Gain Span Module - android

I am connectiong a Gain Span wifi module to an android phone and I need the android phone connected as the Group Owner. Currently I am starting the group negotiations from the device that has the Gain Span module connected.
This works with devices such as the Nexus 5, Samsung Galaxy s2 and Samsung Galaxy s4. But when trying this with a Nexus 6p it fail all of the time. I currently thing that the issue I am having is the group owner intent on the Nexus 6p is set by default wierdly low and I need to change it before the GainSpan module initiates the group formation.
Problem is I can't seem to find a way of doing this so I still don't know for sure this is my issue.
Edit (13/10/2016):
Now thinking that the issue isn't with the GO intent. I am currently initiating the group negotiations from the gain span module using the commands:
at+p2ppd=mac,0
at+p2pgrpform=mac,listenChan,0,,1,0,0
I would prever to initiate this from the phone side as currently I have to hard code the name of the device to ensure the correct phone is connected to. This means I need to respond to a 'p2p-prov-disc-req' response from the GainSpan side, but I am unsure of how to do this. The programmers user guide says that the correct reponse is the command 'at+p2pprovok' but still im unsure of what else needs to be done.
Also I realise that the question has changed now but still open solution to the original problem. Also I have realiszed the s2 connects every time and it takes allot of attempts to get the s4 to connect and the nexus 6p doesn' connect.
Edit (14/10/2016):
Ok solved the 6p issue, it was because the 6p was connected to a via wifi to my office network. Problem is the other phones where connected to the same network and worked. Any Ideas why only the 6p would behave this way.

Per the documentation, the higher the number, the higher the odds that you will be the group owner, however this might not be 100% sure. Has the group information been persisted on the phone? Check the WiFi Direct settings on the phone and see if the group has been saved. If so, delete it and try to connect again, specifying the highest number possible.
You can edit the values of your Wifip2pConfig object. Including the groupOwnerIntent

Right ive managed to get it working on the 6p, problem is I had to disconnect it from the office wifi for it to connect. The 6p must do something wierd when being connected to network as the Galaxy s2(which worked always) was connected to the same network and so was the Galaxy s4(which worked some of the time).
So I have solved the problem but it would be more convienient if I could connect to both the internet(WiFi) and the GainSpan Module(WiFiDirect). Any Ideas why this only caused an issue on the 6p.

Related

Ping doesn't work on Samsung Devices

I wanna use a library from GitHub named "Android Network Tools", but actually I have a complex issue when using that. I tested the ping of this library on different type of devices and Android versions, and it worked correctly and was perfect, but when I tested it on my Samsung Galaxy S8 with android 8 I saw pinging external IP(like google.com) didn't work! at the first, I thought it happens in Android 8 and tried to solve it, but I launched it in Android 8 with the emulator that was ok! after that, I decided to test it on my friend's Samsung J7, you can guess that what happened, it didn't work again!
Right now, I'm really really confused because of I don't know why it happens just on Samsung devices, do you have any idea?
The problem is not with your code , the problem is occurring because of Device manufacturers They change the Os according to there need which causes issue with ping , see
Why does ping works on some devices and not others?
Finally, I found the problem, this was about control running apps in the background! when that feature be enabled some methods and ping doesn't work correctly in real-time.
power saving mode
Yes this is correct. With any power saving mode active, on at least some Android o/s versions, ping will not function. I'm guessing icmp echo reply packets are dropped. A sniffer app would confirm this. It is possible icmp echo (outbound) packets aren't even generated. Crazy in my view. Most ping utilities are very lightweight and I would have thought consume minimal power. I'm running a Samsung J5 / Android v.7.0. Ping started working once I disabled power saving mode

adb wont detect my Samsung Galaxy note 5. I've tried everything

I recently broke the screen of my locked phone and would like to unlock and recover data by using adb, but it's not detecting my broken Samsung Note 5 or even my replacement Samsung Edge 7.
I've tried:
kill-server/start-server
downloading newest usb drivers
enabling developer mode on both phones (I already had developer mode enabled before I broke my Note 5).
using original usb cord given inside the box.
I don't know what else to do.
The problem might be with your computer.Try to use a different computer with adb installed to see what happens.If the problem persists,uninstall your Android SDK and re-install it.
On my Note 5, adb needs the phone's USB connection set to 'USB Data' not just 'charge' (default) before it will recognize it. Once it sees that permission, abd devices will show the phone as 'unauthorized', I then must allow access for debugging on the phone before it will allow access by tapping 'OK' on the popup dialog on the phone.
You could try booting into recovery mode but I don't think Samsung Galaxy allows access vie adb when in recovery. It may depend on the age of the phone.
So it sounds like the phone may be in 'charge only' mode when USB is connected. Your best bet may be repairing the phone.
I am a user of both android studio and Samsung Galaxy Note 5. I solved my issues just the same as you by generating APK files and transfer it to my note 5.
I just found that the reason is unknown resource settings which means my phone only trust google play and block other app. Have a good day.

Nexus 5 not showing on connected devices

Up until recently I had no problems debugging with my Nexus 5 connected via USB cable to my PC (Windows 10).
Suddenly I cant see my device in the "Connected Devices" list. can anyone help?
Can't see nexus 5
Driver is OK
And I can edit my files through the explorer.
Help?
try to use original nexus cable when connect from device to computer , i have this case and solve it when use this cable
Today I noticed the same behavior on my LG Nexus 5 with Android M.
I also remember two icons that are in status bar when you were connected through USB. One for charging and one for debugging. None of these is showing anymore.
My only guess is that some hardware is damaged. Probably the USB connection port. Yesterday I remember that my cable was causing unstable connection and the 2 icons I mentioned were appearing/disappearing repeatedly in one second(flickering). It looks like it was bad connected due to broken cable until finally it burned some internals.
I've seen other people complaining for the same reason. Nobody has discovered or posted any reasonable answer yet.
After years of programming apps and using n5 for debugging, this is for sure not driver (I'm on Mac OS X), adb, or other typical problem.
The only thing is left to try is restoring to factory.
UPDATE:
Before posting this answer I tried everything, changed a lot of cables, even tried booting into safe mode. And just after posting this answer here, I tried one more time to reconnect all cables from my MacBook and the charging icon appeared again!
My new guess is: there might be some bug probably related to battery.
When started noticing the problem first my phone battery was about 11%. Now that it works again it's on 50%+.
And I say it's a bug because I know for sure that I ran a lot of apps from Android Studio with phone being below 50%.

mk808b plus Android TV dongle not present as device in device manager, can't use for development

I recently bought an android tv box (dongle) model mk808b plus which some of you might be familiar with. What I want to do is use it for development, I want to program on it using adb, Android Studio.
The problem I am facing and its not the first of its kind, I get this with all the media boxes that I tried, they dont work as adb devices at all, I dont get any device in my device manager when I connect them on the usb (not even an unknown one). I tried reflashing the android, I put cyanogen mod on it, but to no avail, it still happens. Another thing is, if I put my device in Recovery Mode it does detect an unknown device in my control panel, but never after I boot up my android os.
Now before you say I didnt enable Developer Options Usb Debugging or I didnt put my device as MTP device, I did. I checked these and the cables im using are fine.
I dont have any problem with my Nexus 5 or S5 for the matter, just when I try these android boxes that come up with these tv like custom roms.
If you guys have any idea, I'll be happy to read, I did not find anything related to this on the internet.
PS: Why not use my Nexus 5 or S5? because the app im developing is for these boxes, so testing some of the features such as hdmi connectivity etc etc is very useful to me.
Thank you,
Andi
Unfortunately I couldn't do anything, maybe it's because of the custom ROM on it, but I did find an alternative, I'm using adb on tcp ip, it seems to work after I rooted my device, still no usb adb interface.

Android Wifi Direct inter-workability between ICS and JellyBean

I was testing WiFi Direct on my Android Devices. I have a Galaxy Note running 4.0.4, and a Nexus 7 running 4.2.1. I followed exactly from the official API on WiFiDirect.
After the devices found each other, if I try to make them "connect", I'll be able to see an invitation of WifiDirect connection, but after I "accept" this invitation, the status of this device changed to "invited", while on the other device (which sent the invitation initially) got no response. Thus a wifi-direct connection can never be made among the two device.
I then tried the official Wifi-Direct Demo program... but it doesn't seems to work also.
After I rooted my Galaxy Note and upgraded it to 4.1.2, this problem disappeared.
But I wonder if anyone encounter same problem as I did? And if so how did you solved it?
Thanks a lot.
To find the exact reason you have to look at the log report of wpa_supplicant(this can be seen from the log report using android debug bridge(adb) available in adt bundle with eclipse # http://developer.android.com/sdk/index.html ).
I have faced a similiar problem while trying to connect androd 4.0 tablet with ubuntu laptop.The problem was with the dhcp server which was supposed to assign an IP address after the Group negotiation is successful but it wasn't respondig may be due to difference in the versions or some other reason.This wasn't a bug with wifi direct.
I fixed it by assigning a static IP address to the p2p_wlan0 interface on both the devices.

Categories

Resources