When I first update to new version of studio I tried to use this new WiFi debug feature and it was working at first time (using QR code or manually typing the code) but now it's stuck with "Connecting to device. This takes up to 2 minutes." message for some time and then I get "There was an error pairing the device" message. Before it would take a couple of seconds to connect. My device is Samsung S10 (12 Android)
EDIT 2: Take a look at the below answers, the actual reason seems to be that the device is assigned a random IP or a MAC via DHCP, if you can disable that via system settings for your specific custom ROM, then it's even better
EDIT: If you see regular disconnections, click on `Pair Device with Pairing Code`, and then pair your device with the following command
adb pair <ip-addr>:<port> <pairing_code>
I was facing the same issue, what I did was switching to the command line way of connecting with the device. You can do so in the following way
Make sure USB Debugging is enabled on the device you intend to connect with
In your device, go to Developer Settings>Wireless Debugging and you will see something like so
Now carefully look at the IP ADDRESS AND PORT section and type the following in the terminal
adb connect <ip-addr>:<port>
And your computer will show under paired devices like the above screenshot
I was able to resolve the issue from within Wi-Fi settings by disabling the Randomized MAC Address feature under Privacy. Using my device's actual MAC address fixes the issue.
I had the same problem but I managed to find the solution.
You have to follow the following steps:
In your smartphone (Go to Settings->Developer options-> Wireless Debugging->Pair device with pairing code).
Copy the ipaddress & port.
For example: 192.168.1.2:42123
and wifi pairing code: 234321.
Open your terminal and go to the following path:
cd %LOCALAPPDATA%/Android/sdk/platform-tools
Paste the following command following this order:
adb pair (ipaddress & port that you saw when you clicked on "Pair device with pairing code")
abd pair 192.168.1.2:42123
Paste the access code to the wifi connection.
Enter pairing code: 41107.
Finally, on the same screen go to the option that says IP address and port and you
will see the same address but with another port (You can find it in this part of your screen), copy it and write the following
command:
adb connect 192.168.1.2:41107
If you see a message like this "connected to 192.168.1.2:41107", you did it you will be able to connect your phone with android studio without any problem.
I fixed it by manually assigning IP addresses for my smartphone and PC at settings of the router. Basically avoiding DHCP.
Restarted the router.
Cleared old pairing.
Started pairing again and now it works fine all the time, and no need to repeat pairing process, just enabling "Wireless debugging" from notification panel and in couple of seconds the device will be available in Android Studio
So next time just enable "Wireless debugging" and it's ready
I don't know why there the issue with dynamic IPs
This worked for me:
Tools --> Troubleshoot Device Connections
Press Next --> Next
Click 'Restart ADB server'
Freshly turn ON Wireless Debugging on device and wait for few seconds.
Note that for me pairing wouldn't work while I was on my VPN. After I paired while off the VPN, I could adb connect ipaddress:port and it worked.
Related
I bought a cheap bluetooth smartwatch that costed like $20.
When I plug it into my computer, I cannot see the device listed. I cannot think of any other way to access the source code.
The reason I am trying to get at the source code is to add a few of my own watch faces and try to create my own features.
Any help?
I guess under "plug in" you meant you've plugged it in the USB charging port. Most probably communications are disabled there by a default and the port is in charging only mode.
Try to pair it with your laptop via Bluetooth first, then try to access your watches as a bluetooth device (there is an option for the file transfer, for example, for windows see here: https://support.microsoft.com/en-us/help/4026874/windows-10-share-files-over-bluetooth).
I am attempting to access my BeagleBone Black but I am having some issues and I'm needing some help.
I messed around with my BBB almost 2 years back and I statically set the IP address for eth0. Unfortunately, I don't recall what I changed it to. If I knew the network, I could probably figure it out but I haven't the slightest clue what it could be.
I am running Windows 10 on my laptop and I have a USB to USB-mini running to the device which provides to it power and a connection.
I have installed the latest drivers, PuTTY, and WireShark. I made sure the drivers were imported, ran WireShark for DHCP requests/ARP broadcasts, LL DNS updates, or SSH port references but I wasn't seeing anything on that particular interface on my laptop (ran as promiscuous and nonpromiscuous).
I read that the default IP address for the beaglebone.local is 192.168.7.2 but I wasn't able to reach it via ICMP, HTTP, or SSL.
I assumed the USB connection provides either an Ethernet-over-USB connection or a serial connection (UART through USB), so, I have both the USB connected and the Ethernet cable connected.
To see if I could just use a serial connection with PuTTY (Serial-to-USB), I opened Device Manager to see which COM port it was using. The odd thing is that COM ports aren't listed in Dev Manager, not even by default when nothing is connected. There also wasn't section for Unknown Devices.
I figured at this point, it wouldn't hurt to download the latest release of Debian for BeagleBone. I wrote the .img to a 32GB MicroSD card and held down the USER/BOOT button while I applied power (as per the instructions).
Still no luck and I'm now out of ideas.
I only have a laptop at my disposal, currently. I don't have immediate access to a monitor, mouse, and keyboard so I wouldn't be able to view what is happening internally. The LED0 is giving me the standard heartbeat flash (2 consecutive flashes followed by a longer off period).
Does anyone have any suggestions?
TIA
I have a windows 8.1 based lap top which supports Bluetooth.
I wrote a java based bluetooth server which gets connections from Android.
The issue is, the device sometimes get invisible(or to say not shown) on android devices.
I've tried with other laptops or Android phones, but sometimes it just doesn't get searched.
I think it's not about my java server program. Even if there's a problem with my program, it should at least be shown on the bluetooth search list of other devices.
I found a very crude solution about this issue.
Always running the 'change pc settings(not the exact name)' app of windows 8.1, and going to 'PC, devices' -> Bluetooth makes it always searchable. If I turn this off(I mean the 'change pc settings' app, not turning off bluetooth), the bluetooth cannot be found by other devices.
Why is this happening? My purpose is, bluetooth server must be turned on automatically after boot, but the reliability of the bluetooth device is failing my intention. However, since my crude solution above is temporarily solving my issue, I do not think it's a hardware issue.
So, my question is :
1) Why is this happening? And how can I mend this?
2) How can I run windows metro app through windows shell? If I can't find any other solution about this, I will have to write a batch script to always run the solution thing above.
Going to Change PC Settings>PC and devices>Bluetooth is initiating a Bluetooth device search. As a side effect, the Bluetooth is also made Discoverable (pairing mode). However, this Discoverable setting is temporary, only while the PC is searching for remote Bluetooth devices.
If you wish to keep Bluetooth Discoverable at all times, you need to check the "Allow Bluetooth devices to find this PC" button box, found in Bluetooth Settings. I found Bluetooth settings by right clicking the Bluetooth system icon. Can also be found in Devices and Printers, by right clicking the Bluetooth adapter icon.
my problem is the connection with a Bluetooth device. I have a Netbook with an integrated bluetooth device. I want to connect my netbook with an OBD-II interface and write a software to read out the stats of my car. To test the connection, I started by adding the OBD device via the bluetooth menu. The manager connects to the interface and it wants me to wait while the configurations are taking place. This state lasts "forever". After 60-Minutes of waiting, I closed the window. However, the device is shown in the list of available devices. Because I'm not able to switch the button to initiate the connection, I thought about using minicom (the OBD-II interface uses SPP for communicating).
As far as I did understand, I need an initiated connection with a bluetooth device and with it a virtual serial port to connect to with minicom. After reading some postings, I found out that the hcitool should be able to create the bluetooth session. With this I was able to connect to the device and the "connected" button turned on. Unfortunately it switches back after 2 secs.
hcitool scan is able to find the device
hcitool cc 00:11:22:33:44:55 is able to connect for the already mentioned 2 secs
hcitool con list the connection if it's called within 2 sec after initiating
I also tried to connect via a Windows PC using putty. Windows connected with the device without a problem and after that, I was able to send requests and get the appropriate answers. So it seems like the interface is working correctly.
I'm using Fedora 17 with gnome3. If you need any output or more information, please let me know.
Thanks in advance
I don't want to use Linux to use the emulator. Is it possible to use an actual device instead?
If possible, please, show me the references you used to answer.
Yes, you can. But instead of using the traditional USB method, you must debug over IP (this means that both your computer and the Google TV must be on the same network)
To start with, we will assume you have a Google TV and a Workstation [your Mac]
On your Google TV, open Settings, and go to Applications -> Development.
Turn Remote debugging on
Click Debugger IP address and enter the IP of your Workstation (if you have DHCP enabled on your router, you will need to look this up)
Find the IP address of your Google TV [it's available in Settings -> Network -> Status]
On your Workstation, run:
adb connect <Google TV IP Address>
If you got everything right, you will now be able to debug on Google TV just like any other device...
Caveats...
If you for some reason want to disconnect later, run: adb disconnect <Google TV IP Address>
If the IP of your Workstation ever changes, you will need to update this on the Google TV [step 3 above]
Source: Google TV developer guide here
http://mobile.tutsplus.com/tutorials/android/android-futures-creating-android-apps-for-google-tv/
Yes it is very much possible to use a device instead, please read the aforementioned link more specifically the section on testing:
Testing Your Application
As there is no emulator yet available with a true Google TV Android
image, we can only test the effects of the higher screen resolution
and using the application with a touch screen.
The easiest way to do this is to create a new AVD using Android 3.1,
API Level 12, use a resolution of 1920×1080 (or 1280×720), and use a
touch screen setting of false. The performance of the emulators may
make this difficult, but at least you can get an idea of what the
screen will look like and how the navigation or your application will
function without touch.
The only option now is having a Goole TV device and setting it up for debugging mode,
Also there is currently a topic in the Google TV issues asking for the Mac OS emulator.
You can star the issue to receive updates about it and also help to request this feature.