I'm trying to connect to a KaiOS device with adb but whenever I run adb devices I get an empty list of devices, however when I run lsusb I get:
Bus 001 Device 017: ID 1782:4001 Spreadtrum Communications Inc. Spreadtrum Phone
I've done all the pre-setup which include:
Adding SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666", GROUP="plugdev" to /etc/udev/rules.d/51-android.rules
Adding 0x1782 to ~/.android/adb_usb.ini
Running sudo udevadm control --reload-rules
But I still get an empty list (I'm on Linux to emphasize). I believe the issue may be that I need a spreadtrum drivers to connect to the device through adb. However I can't seem to find any spreadtrum drivers for Linux, they seem to only be available for Windows?
Related
I am trying to debug via WIFI using a MI Box S device in Ubuntu 20.04/Android studio.
I have been successful doing this in Windows 10 (but would rathe develop in Linux)
I have been successful doing this with other devices (Android phones/tv boxes)
I have followed all the instructions on setting thins up with adb
The problem is that the device is not being seen by the system
lsusb does not list it
I've added the following line to /etc/udev/rules.d/51-android-rules
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
Nothing seems to work.
Is there something I'm missing? a Driver, Some configuration?
Thanks in advance
I have an Android tablet and an old Linux notebook where I developed a program for months, no glitches.
Then I got a new Linux notebook, installed Android Studio, and tried to plug in the Android tablet. The tablet never shows up in the target list; it just says, "Unknown Device." When I select "Troubleshoot device connections," the wizard displays the ID of the tablet, with the cryptic message "Device is currently in the unknown state."
Turning the tablet's "USB debugging" option off and on again does not fix the problem. When I unplug and replug the USB, the tablet chimes, but does not put up a requestor asking if I accept this debugging connection.
Running adb devices returns:
$ adb devices
List of devices attached
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
B007904026445 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]
Any tips?
Unplugging and plugging in the USB just one more time finally gave me the requestor on the tablet asking for permission to be debugged by this notebook. End of crisis.
An actual answer how to get that requestor without USB cable abuse would be nice...
while connecting Android phone to computer Select 'File transfer' option in 'Use USB for ' Dialog. this will solve the issue.Tested.
I ran into this issue when connecting a Pixel 2 XL running Android 11 via USB (with USB debugging on). The solution here worked for me:
Run
sudo adb kill-server
and then
sudo adb start-server
then connect your device turn Debugging on and type
adb devices
again. After doing this, the Pixel 2 showed up in the list of devices in Android Studio.
I came across the same issue. By scanning for devices in troubleshooting connections after installing adb, it showed me directly the request for pairing the device. I have similar set up and One Plus 3
Select Revoke USB debugging authorizations to revoke access to all computers you've previously authorized (Settings > System > Developer Options > Debugging).
See more in this post
https://developer.android.com/studio/run/device
add yourself to the plugdev group: sudo usermod -aG plugdev $LOGNAME
install sudo apt-get install android-sdk-platform-tools-common
log out and log in again for the group changes to take effect
If it's still not working, try to:
disable and enable "USB-Debugging" on your developer settings of your Android phone
If it's still not working a not so great workaround is restarting the adb server. Not so great, because adb should not run as sudo:
cd / && sudo find -name "adb" # ADB_PATH
sudo ADB_PATH/adb kill-server
sudo ADB_PATH/adb start-server
sudo ADB_PATH/adb devices
This can happen if you have Chrome inspect or other similar software hanging
in my case I had this error because I was connecting to a HUB USB.
It also happened to me, when I tried to connect my Android Phone in Android Studio.
On my Phone i got the message "USB debugging connected" but the pop-up Window that asks for "allow USB debugging" never showed up. Also in Android Studio the code wasn't uploadable to my Phone.
I also got "Device is currently in the unknown state" in Troubleshoot Device Connections.
The Problem was: my Settings (Connected Devices > USB Preferences) on my Phone were set to "No data Transfer".
I had to enable "File Transfer"
I recently bought a USB 2.0 Bluetooth Adapter. It claims to have support from Linux kernels of versions 3.4 and higher. I have a BeagleBone Black with Debian GNU/Linux 7 image and kernel 3.8. I am developing on BeagleBone Black by hosting it through USB with ssh.
I have tried both hot plugging and plugging in before boot and failed.
Then, I tried this tutorial. However, I cannot find the connman directory on my BeagleBone Black device. I looked up and assumed I needed to install the connman package, but my BeagleBone Black has no internet access.
I have also tried lsusb -v, as suggested by an answer of a similar question to this, with no luck. The weird thing is, while lsusb itself prints
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -v only prints
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
then hangs. Information regarding bus 002, which I believe the device is connected to, is not printed. I have to restart the ssh connection to get back to work.
How should I approach to get the dongle to work on my BeagleBone Black? If the connman package is sufficient, how do I install it on my BeagleBone Black without internet access. Why does lsusb -v hang?
Any help is appreciated!
UPDATE:
The actual problem turned out to be that my BeagleBone Black is flawed/damaged. I plugged the Bluetooth Adapter into a plain new BeagleBone Black before powering it, and the Bluetooth Adapter is recognized! Not only does lsusb prints out the adapter info, but also lsusb -v does not hang at all. The overall performance of the new board (boot time, compilation time, execution time) is also several times better. I suspect that it was due to the various improper power-off.
In case anyone is just as careless, the BeagleBone Black SHALL be powered off by:
Holding down the power button for about 8 seconds then releasing it.
Using halt or shutdown -h now command in the Userspace.
I have possible 4 solutions for you:
1) download the connman package and save it to a usb flashdrive. Connect the flashdrive to the beaglebone and install the package using the following command: dpkg -i {.deb package}.
2) download the connman package on your desktop computer and ssh into your beaglebone. once you ssh in you could copy the file trough ssh using scp. Note the syntax $ scp your_username#remotehost.edu:foobar.txt /some/local/directory. Then install the connman package using dpkg -i {.deb package}.
3) share your desktop computers internet connection with the beaglebone and ssh into the beaglebone. Download the package directly using apt-get or wget whatever tool you prefer.
4) connect your beaglebone to your router using rj-45 cable. Maybe this is not your preferred solution but it's easy and after port forwarding you will have access to your beaglebone from anywhere.
Hope this helps and note that I never used a bluetooth adapter with a BBB. I'm just giving generic instructions on your general problem.
I want to automate bluetooth operation on my Ubuntu system.
Is there any script or application which I can use to perform basic Bluetooth operations like enable, discover, file transfer and disable.
You can enable your bluetooth stick by running
$ hciconfig hciX up
where hciX is a bluetooth device name (e.g hci0)
To obtain a list of devices, just type
$ hciconfig -a
(http://linux.die.net/man/8/hciconfig)
With the BlueZ package installed, you can discover devices nearby using
$ hcitool inq
(http://linux.die.net/man/1/hcitool)
If you wish to use OBEX transfer (the protocol used while sending a file from a bt device to another), you should install the OpenOBEX package with which you may type
$ obexftp -b 00:11:22:33:44:55 --put /some/file/to.put
to send /some/file/to.put to the device with bt address 00:11:22:33:44:55
(http://linux.die.net/man/1/obexftp)
Finally, if you would like to disable your bluetooth adapter, just call
$ hcitool hciX down
UPDATE
The following packages should be installed on your system in order to have the commands listed above available. Some of them may involve kernel extensions (like additional modules).
BlueZ (http://www.bluez.org/)
OpenOBEX (http://sourceforge.net/projects/openobex/)
Regards
I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)