Trouble connecting phone to arduino using droidScript - arduino-uno

I am trying to connect my sony xperia sp running on android 7.1 ( Lineage OS ) to my arduino uno using an OTG cable and the droidScript app. It worked perfectly the first time, it asked permission to open droidScript : I clicked on "OK" and checked "Use by default for this USB device".
But now I can't get it to work. When I reconnect my phone to the Uno nothing happen on my phone, droidScrip does not seem to recognize the device either and now when I try to connect my phone to my computer it does not work either ( but it's charging ).
I have tested all my cables and connected the arduino the same way using a different phone several times and it worked ( but didn't allow "Use by default for this USB device" as I suspect it comes from here ). Manually enable MTP through dev options does not work.
How can I remove that "Use by default for this USB device" option, and get the asking permission box back when I connect to my Uno ?

Try unistalling DroidScript and any other apps that might have talked to that USB device and then re-install DroidScript but don't start it up.
Plugin the OTG cable to the device (make sure you get it the right way round so that the OTG cable goes into the phone end) and then you should see the popup box for permissions.

Related

Using USB device on PC in Android Studio Emulator

I am developing an app that A dongle (USB) device must connect to Android OS supported device(mobile phones, tablets...) via OTG (On-The-Go) cable. The problem starts here. I need to do debug while the dongle is connected to the Mobile phone. Unfortunately, such situation makes connecting mobile phone to PC and debugging method impossible. ( Mobile phone has 1 socket but I need 2, one for connecting the dongle to mobile phone and other for connecting mobile phone to pc for debugging)
Is there a way such that the Android Studio Emulator can access to USB device on the PC?
EDIT I have found an alternative way like connecting the mobile phone to PC via Bluetooth which is explained here.
EDIT 2: A better and clear way : Installing Genymotion and Virtual Box.
Another option (I use daily) is
adb connect phone_ip
The phone should be connected to wifi (the host also).
Lots of sources for that on the net (here is one)
mordy.

USB Bluetooth dongle stop working

Windows 7 32bit, Dell laptop.
I find my USB Bluetooth dongle stop working, I used it very rare. When I connected USB dongle, it show 'Unknown device' message, and driver not installed. In taskbar show notifications 'USB device not recognized'.
In Device Manager this USB Bluetooth dongle shown as "Unknown device". I tried right click on icon, 'Uninstall Driver Software', then Action > "Scan for hardware changes", it refreshes and show message driver installed successfully in windows taskbar. But, in Device Manager, this USB dongle still yellow "Unknown Device". When right click in icon, device status is "Windows has stopped this device because it has reported problems. (Code 43)' I tried to ininstall every item under "Universal Serial Bus controllers" menu in Device Manager, then rebooted PC, but this not help. I uninstalled all Bluetooth devices from Device Manager, include Bluetooth Radios and Network adapters:
But this not help, too. From MSDN Bluetooth FAQ I read that Windows 7 include in-box support for Bluetooth.
How to install built-in the system Bluetooth drivers in Windows 7 and enable Bluetooth? (I need only transfer files, not audio capabilities).
I find the problem: USB Bluetooth Adapter dongle is faulty. So this is hardware issue.

Android Wear can't connect my device via bluetooth

I enabled debugging over bluetooth on my Moto 360
and enabled Android Wear app on my Nexus4.
Status displays target : disconnected
Forwarding the port from my computer shows the status host will be changed to connected, but the target status remains disconnected.
I toggled debug via the bluetooth switch which had no effect.
My phone is a Nexus 4. Is there a problem with my phone or the Moto 360?
I eventually managed to get it working. The issue seems to be related to having paired your device with an emulator first. Take a look at this post to see how I fixed it: http://melix.github.io/blog/2014/10/android-moto360.html
open the applications settings, search for the Android Wear application, then force stop it
clear its data and cache
Search for Google Play Services
Click on Manage space. Delete all data.
reboot your phone
reset your Moto 360
Pair watch with phone
Following the instructions from android.com https://developer.android.com/training/wearables/apps/bt-debugging.html to setup debugging and it should work now.
Done.
I tried it on a Sony z1.
It succeeded without any problems.
So, maybe it's not supported perfectly in Nexus 4.
If you have the same problem, I suggest using another device.
I fixed without factory reset with these steps
-Force stop android wear application and clear cache
-Disconnect emulator on android wear app
-Forget emulator on android wear app
-Connect your real device via bluetooth
-Open debugging over bluetooth
Make sure that debugging options are also active in android wear device
Run this commands in command window:
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444

lcd tv stopped working (dvi to hdim)

I have a dual monitor setup,
1: a computer monitor connected via vga
2: a samsung lcd tv conntected via dvi->hdim cable
Until yesterday, this setup was working just fine. Today when I booted windows 7, the bios & windows loading ... screen shows up fine on my lcd tv
however, when windows loads and shows my desktop, my TV goes blank, and I only get the desktop on my computer monitor.
When I go to "screen resolution" and "detect", I only see my computer monitor listed.
As far as I know, no new display drivers were installed, I am using nvadia gt300.
Also, since the bios/welcome screen does show up on my TV, I can root out the tv/cable being faulty.
has anyone encountered something similar before ?
I had exactly the same problem. I de- and reinstalled drivers, I deinstalled the 11/18 Windows Update, I turned my monitor off and on again at least a dozen times as did I unplug and replug the HDMI cable - nothing worked.
Then, in an act of despair, I unplugged my monitor's power cable, replugged it and.... here we go again!
HTH!
Chris

Wifi on Android SDK

I have installed the Android SDK and I noticed that the WiFi button is not enabled in the emulator. I want to know, whether this functionality available on Emulator or not, and why. I have been looking for a convincing answer for a long period.
There is no WiFi chip inside emulator, so the button cannot be pressed.
Emulator already has a network connection routed through your host PC, so WiFi is not really needed.

Resources