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
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 working on Nitrogen6x board that runs on Yocto 2.1 with Qt 5.6.2 support. I have developed a Qt application that shall support the input options like USB Keyboard, Mouse and Touchscreen and shall support a Full HD resolution display.
I have connected a touchscreen monitor which supports Full HD resolution to the Nitrogen board using HDMI to VGA converter cable, and my application was working fine with the correct resolution and supports plug and play keyboard and mouse connections.
BUT, the touch response on the touchscreen monitor was not received by the Qt Framework and hence the touch interface was not working for me as expected.
When I plug the mouse am seeing the below information on my nitrogen board console:
~ # usb 1-1.1: new low-speed USB device number 8 using ci_hdrc
input: HID 413c:3010 as /devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1:1.0/0003:413C:3010.0006/input/input3
hid-generic 0003:413C:3010.0006: input: USB HID v1.00 Mouse [HID 413c:3010] on usb-ci_hdrc.1-1.1/input0
But, When I plug the touchscreen monitor am only seeing this:
~ # usb 1-1.1: new full-speed USB device number 7 using ci_hdrc
I was expecting that the touch screen interface will get automatically detected and will be passed as a input plugin to the Qt application.
I have run make menuconfig and have enabled USB Touch screen rebuilt the kernel. But, still am noticing the below error messages while the kernel is booting:
Galcore version 5.0.11.41671
egalax_ts 2-0004: Failed to read firmware version
egalax_ts: probe of 2-0004 failed with error -5
ft5x06-ts 2-0038: reset fffffffe
ft5x06-ts 2-0038: Could not detect touch screen -19.
Am some how missing to configure the right kernel options to detect the touchscreen. any help on this is appreciable. Thanks in advance.
I have selected the below option:
Device Drivers -> HID Devices -> Special HID drivers -> HID Multitouch panels as an embedded driver (*) in my Kernel configuration, and then I have rebuilt the kernel by adding my touchscreen's Vendor ID and Device / Product ID to the files hid-ids.h and hid-multitouch.c at relevant places.
My touchscreen is working as expected now.
I'm currently working on a project in which I have to communicate with a custom-made sonar board over an USB<>Serial connection with cts/rts hardware flow control at a baud rate of 4,499,456.
MATLAB code for sending and receiving data is already available and fully tested on Windows.
The problem occurs when trying to execute the MATLAB code on linux (Ubuntu 14.10/15.04). Both the commands for toggling the LED on the board (write) as well as receiving information (read) are not working.
Python ports of the MATLAB code using the pyserial and pylibftdi library do allow writing, but also hang on receiving data.
Does anyone have any idea as to why it does work on Windows but not Ubuntu? Maybe a driver issue? Or something having to do with cts/rts on Linux?
lsusb output
Bus 002 Device 004: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
dmesg output
[11906.209231] usb 2-3: new high-speed USB device number 5 using ehci-pci
[11906.346701] usb 2-3: New USB device found, idVendor=0403, idProduct=6014
[11906.346713] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11906.346720] usb 2-3: Product: USB <-> Serial Converter
[11906.346725] usb 2-3: Manufacturer: FTDI
[11906.346730] usb 2-3: SerialNumber: FT69T4N
[11906.351716] ftdi_sio 2-3:1.0: FTDI USB Serial Device converter detected
[11906.351800] usb 2-3: Detected FT232H
[11906.352234] usb 2-3: FTDI USB Serial Device converter now attached to ttyUSB1
Edit: Just logging my progress in case somebody encounters the same issue. The problem seems to lie in the baudrate; changing it to 115200 allows reading from the device, but messes up sending data to it.
Apparently the FTDI driver doesn't work to well with very high/non-standard baudrates. I ended up solving this by using a baudrate of 3,000,000
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.
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.