I'm working on the Altera cyclone V Soc FPGA Dev Kit.
I'm using the GSRD 14.1 Angstrom provides by rocketboards.com (http://www.rocketboards.org/foswiki/Documentation/GSRD141AngstromGettingStarted)
root#socfpga_cyclone5:~# uname -a
Linux socfpga_cyclone5 3.10.31-ltsi
This kernel don't support usb serial device and I think that I need to add usbserial and maybe usbcore drivers to communicate with a GPS serial module. The kernel includes insmod and modprobe but I can't find specifics driver for my board.
dmesg returns:
usb 1-1: new full-speed USB device number 2 using dwc2
usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: CP2104 USB to UART Bridge Controller
usb 1-1: Manufacturer: Silicon Labs
usb 1-1: SerialNumber: 006FA62E
Is there a solution to add this module ?
If I have to rebuild and customize the kernel, I'm looking for some advise :)
Thanks in advance.
EDIT
The solution was add the serial driver support in menuconfig and update the kernel.
First, plug your serial device into the USB port and check the output of this command :
ls /dev |grep usb
If you see something like "ttyUSB0" or "ttyAMC0", then the driver is already there, either as a statically compile driver or loaded module. I would be really surprised if your issue really is that the driver isn't present; it should be included in just about every distribution.
If nothing comes up, then check to see if the driver is currently loaded (this will tell you if it's actually a problem with your USB-serial device:
lsmod | grep serial
(Note: the module should be called "usb_serial", but I usually grep for a subset of the string I'm actually looking for to catch names that don't quite match what I expect, such as names with or without underscores in them. "grep serial" can match more than "usb_serial", but should include it while still shortening the modprobe output.")
If you see the driver there, then driver is loaded and the problem is with your USB-serial device. Check this text document to see if your device is supported by the driver. It is possible that your device will still work even if it's not listed as supported, because there is support for a generic device in the usb serial module. You'll have to reload the module with this command to take advantage of it:
insmod usbserial vendor=0x#### product=0x####
If the driver isn't loaded, use this command to see if it's available:
modprobe | grep serial
If the driver is there but not currently loaded, you should be able to find it in this directory to use "insmod" on it:
/lib/modules/`uname -r`/kernel/drivers/usb/serial/`
If all of that fails, you may have to recompile with the drivers enabled. Recompile your kernel and make sure you enable USB_SERIAL under the USB menu, and also enable kernel support for TTY, because USB_SERIAL depends on it.
Related
I have an STM32 connected over USB to and OpenWRT Linux device and it appears under /dev/ttyACM0. I have a custom C application that communicates with it. In my C application the device basically is treated like a serial port.
Until now this always worked 100%, I could always read and write, I built a new image for my LIMA module and now suddenly I can no longer write to my STM32 from my C application.
However this works fine and the message is received by the STM: echo -n -e "\x02\x00\x01\x02" > /dev/ttyACM0
When I look in dmesg I do see something funny:
[ 389.334398] usb 1-1.3: new full-speed USB device number 11 using ehci-platform
[ 389.458391] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[ 424.476642] cdc_acm 1-1.3:1.0: failed to set dtr/rts
Do you guys know what might be after going wrong? Could some USB package that updated itself have screwed something up?
I am using http://ed.am/dev/make/arduino-mk to upload code to my arduino products in Ubuntu without using the IDE.
That being said, I have confirmed the makefile and avrdude works well with my Arduino Uno, so that is fine.
However, I needed it to work with the Arduino Micro. So before setting up the .hex files, etc, I inputted:
export BOARD = micro
Which would allow me to get the formatting for the micro, as described by the makefile. When I tried to upload it, I get an interesting situation:
nancy#nancy-VirtualBox:~/Desktop/Arduino/sketchbook$ make upload
stty -F /dev/ttyACM0 speed 1200
57600
sleep 1
/usr/bin/avrdude -DV -p atmega32u4 -P /dev/ttyACM0 -c avr109 -b 57600 -U flash:w:blink.hex:i
At that point it stays on that line for however long and doesn't really do anything. The Arduino itself has the LED 13 continuously blinking but the Rx is not lit up whatsoever. To double check, I checked the dmesg:
usb 1-2: new full-speed USB device number 32 using ohci-pci
usb 1-2: New USB device found, idVendor=2341, idProduct=8037
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: Arduino Micro
usb 1-2: Manufacturer: Arduino LLC
cdc_acm 1-2:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-2:1.0: ttyACM0: USB ACM device
input: Arduino LLC Arduino Micro as /devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.2/input/input36
hid-generic 0003:2341:8037.001F: input,hidraw1: USB HID v1.01 Mouse [Arduino LLC Arduino Micro ] on usb-0000:00:06.0-2/input2
So I at least know it's the right port (Also double checked using ls -l /dev/serial/by-id ). Just in case, I double checked with normal windows, and Windows notifies me the driver is not installed properly. In the Arduino software, when I try to upload the generic blink code to the micro, it does the same thing where it too gets stuck in the Upload...
I updated the driver for the micro and the Arduino software uploads to the Arduino Micro just fine. Just in case I thought it was the actual hardware since I borrowed it from a friend, I tested the issue on a new Arduino Micro and the issue is replicated just in the Linux interface. I'm pretty sure it's not the VirtualBox linux either because the Arduino Uno worked just fine uploading to it.
Does anyone know how I may resolve my uploading issue? I'm thinking it's some sort of driver issue.
Thanks.
edit: tried the arduino Mega (export BOARD = mega2560)
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
So I'm thinking it's a driver and the makefile issue...
That's possibly not the answer you're waiting for, but it seems that the makefile you are using is getting quite old.
I would recommend that you switch the Sudar's Arduino Makefile which is just amazing.
Hope this helps :)
Programming the Mega Board I use the following command, which works fine for me:
avrdude -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:blink.hex:i
I have for a longer time tried to get my Asus Pro Live sensor to work on Linux, currently Fedora, but I have tried ubuntu 12.04 and Ubuntu 13.10 as well. I have installed openni, openni2 and sensor_master on my computer. Everything compiles, but when I try to run NiViewer, all I get is
Could not open "1d27/0600#3/4": Failed to set USB interface!
The 55-primesense-usb.rules file is present in /etc/udev/rules.d/ and when I type lsusb it says:
Bus 003 Device 004: ID 1d27:0600 ASUS
I have googled for it but cannot find anything helpful. Does anyone have a clue where the problem is?
Some of the output from dmesg:
[55363.811218] usb 3-4: new high-speed USB device number 6 using xhci_hcd
[55363.826016] usb 3-4: New USB device found, idVendor=1d27, idProduct=0600
[55363.826018] usb 3-4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[55363.826019] usb 3-4: Product: PrimeSense Device
[55363.826021] usb 3-4: Manufacturer: PrimeSense
[55363.826609] usb 3-4: Not enough bandwidth for new device state.
[55363.826614] usb 3-4: can't set config #1, error -28
[56819.384811] usb 3-3: USB disconnect, device number 5
I have tried both usb 2.0 and 3.0 and it works in windows.
/ Erik
The Asus Pro, like any other webcam, needs to reserve USB bandwidth, and this should be adaptive depending on the actual capture resolution and bandwidth, but that is not always the case: many WebCams, like Logitech C910 "preventively" reserve a chunk of USB capacity large enough to prevent other webcams from using it. The UVC driver, which is pervasively used in Linux knows about this under the feared I get a "No space left on device" (-28) error when trying to stream from more than one camera simultaneously., see UVC driver FAQ. This seems to be your issue. Trying to connect the cameras in your system in different USB port configurations can help.
I am working on SBC 6845(Atmel processor) in linux embedded development. My kernel version is 2.6.30.
This board comes with 2 USB ports(Both with Type A), one can be configured as host and other as USB device.
I have configured these USB modules in kernel. I have burned kernel and file system with necessary modules including USB modules. I have loaded these USB modules through /init.d/rcS file.
When board turns on and I type lsmod on console it shows me these modules loaded.
When I connect board to computer, USB is not detected (device functionality).
When I connect pendrive to board, it is not detected (host functionality).
/init.d/rcS Script
#install USB Gadgate mass_storage
modprobe g_file_storage file=/home/mass_storage/backed_storage_file stall=n
losetup -o 4096 /dev/loop0 /home/mass_storage/backed_storage_file
#install USB ehci-hcd
modprobe ehci-hcd
rcS running log
g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /home/mass_storage/backed_storage_file
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00800000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Atmel EHCI UHP HS
usb usb1: Manufacturer: Linux 2.6.30 ehci_hcd
usb usb1: SerialNumber: atmel-ehci
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
lsmod output
Module Size Used by Not tainted
ehci_hcd 30132 0
g_file_storage 24260 0
Any help is welcome!
Your drivers seem well installed. I don't have a straight answer but I work with software-hardware integration very often. Here is what I would do to get more clues. That kind of processor often have pins that are multipurposes. Sometimes, on an evaluation board, they are not configured the way we want by default. You can look at the documentation but also, you can use an Oscilloscope and probe the D+ and D- of the USB. Are they OK when in IDLE? What happen when you connect a device on your host port? The first few things will be done by the USB controller and involves little even no interaction with the software after the controller is configured. If you see the beginning of a negociation (a bunch of 0s and 1s) then, you know your hardware is configured properly and your basic driver is installed and work properly. The result of this will narrow the scope of the problem.
You are missing upper layer drivers. EHCI is only an interface driver, you need device drivers on top of it. Board<-->PC communication is usually done via serial over USB, so for this you need USB Serial driver. In Kernel config go to Device Drivers -> USB Support -> USB Serial Converter support and select driver according to the chip on your board/cable.
Here's an example dmesg dump seen when board is connected to the Ubuntu laptop:
[ 3469.923779] usb 2-1.2: new full-speed USB device number 5 using
ehci_hcd
[ 3470.019145] cp210x 2-1.2:1.0: cp210x converter detected
[ 3470.091614] usb 2-1.2: reset full-speed USB device number 5 using
ehci_hcd
[ 3470.184995] usb 2-1.2: cp210x converter now attached to ttyUSB0
I believe similar situation is with pendrive too - upper layer driver is missing.
I've built a Buildroot linux image for my PhidgetSBC and included bluetooth support unfortunately it appears my bluetooth USB dongle isn't working. Although I have not tested it with code it's internal LED does not illuminate when I plug it in.
When I issue lsmod I see this:
Module Size Used by Not tainted
usb_storage 33699 -
btusb 8560 -
bluetooth 50130 -
It appears bluetooth is in the kernel but how could I test my usb dongle?
This is definitely not Buildroot related, but rather hardware and kernel configuration rleated. Unfortunately, you're giving way too few details: which Bluetooth USB dongle you're talking about, what kernel version using, what is your kernel configuration, etc.
First of all, check if your USB device appears when running lsusb.