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)
Related
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?
I am trying to get the Bluetooth to work in Raspberry Pi 3.
I am using buildroot with:
BlueZ 5.45 ( changed the package to get the latest)
Not using systemd, but I run bluetoothd because
the bluez script is for systemd.
In buildroot I enabled the bt firmware.
I can see the hci_uart.ko file and the Bluetooth firmware hcd file
I removed the console=ttyAMA0,115200 from cmdline.txt
I added rfkill for busybox but I only see the wifi interface, no Bluetooth interface.
running:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
output showed:
bcm43xx_init
Initialization timed out
tried 115200, the same.
Notes:
When using BlueZ 3 I am getting invalid id
I read that it is somehow related to BlueZ version so I did take the latest
All the above was taken after deep search.
So what I am missing here?
How can I get the Bluetooth to start running in my Raspberry Pi 3
with buildroot as image creator?
Thank you all!
The main problem is that buildroot adds the pi3-miniuart-bt overlay
in config.txt.
To remove it we need to remove if from the post-image.sh script as parameter to the above script.
In raspberry pi 3 the ttyAMA0 was assigned to bluetooth and the pi3-miniuart-bt restored it back to be serial com port, which disconnects the bluetooth again.
To summarize the steps in buildroot.
Add the bluetooth firmware.
Add bluez 5 utils.
Change the package from bluez 5.44 to 5.45
Add the above sleep. (delete the .stamp_build in bluez to build it again)
remove the /dev/ttyAMA0 from cmdline.txt
After building, check on the target (pi3)
the BCM4343 hcd firmware
hci_uart.ko should be there
hci_uart is not running in case of busybox init (only in systemd)
so just modprobe hci_uart. run lsmod to see that it is running.
To start the service and load the firmware, use hciattach:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
Start the bluetoothd daemon:
/usr/libexec/bluetooth/bluetoothd &
Power up the bluetooth hardware using bluetoothctl (power on and agent on).
Now you should see it using hcitool dev.
Again, if you don't remove the overlay you will get timeout.
That it. the hci device should be seen now.
you can see it using:
rfkill list ( install it from busybox-menuconfig)
hciconfig -a
The above steps does not get the console to work properly on the Pi 3 but this is a different story.
As described in the commit adding the firmware, you unfortunately need to patch bluez5_utils to get the firmware to work:
https://git.buildroot.net/buildroot/commit/?id=1f94f1aaab2e786542a83327358570a828d68f45
I recently installed yosys on Ubuntu 15.1 (32-bit Arm-7 machine) and I compiled my first small project for a Lattice ice40hx8k dev board. However, the programming stage fails with:
iceprog counter.bin
Can't find iCE FTDI USB device (vedor_id 0x0403, device_id 0x6010).
ABORT.
It appears to be a permission problem, because if I run the programming stage as root, it works fine.
I created this udef file as part of the installation process:
cat /etc/udev/rules.d/53-lattice-ftdi.rules
ACTION=="add", ATTR{idVendor}
and also this file:
cat /etc/udev/rules.d/50-lattice-ftdi.rules
# FTDI USB-Serial
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", GROUP="users", MODE="0666"
Can someone help me fix this non-root user programming permission problem?
Thanks :)
Your /etc/udev/rules.d/53-lattice-ftdi.rules file seems to be truncated for some reason. The contents of this file should be:
ACTION=="add", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE:="666"
After fixing that file, and disconnecting and reconnecting the device, you should be able to program the FPGA as normal user without sudo.
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 bought a laptop and installed Linux on it and the trackpad is now not working but it was on Windows. There is no linux driver for it and I thought this could be a good project to write one.
I have read and implemented tutorials on device drivers for simple things (turning on an led on a pandaboard) but I have no idea where to start here. Related questions pointed to commands like modprobe -r psmouse and it seems the trackpad is not seen at all.
Any idea ? the laptop is : Asus R409C.
A temporary fix is to boot with "psmouse.proto=bare" on the kernel cmdline.
$ sudoedit /etc/default/grub
Change GRUB_CMDLINE_LINUX_DEFAULT to add psmouse.proto=bare at the end, and save your modifications.
Then:
$ sudo update-grub
And finally reboot.
i think linux input subsystem can be used to write driver for touchpad. Exact details need to be considered. But most of the input devices can be integrated using input subsystem.