Page 1 of 1

Arduino uno on raspberry pi: serial ports not showing

Posted: Sun Sep 21, 2014 8:46 pm
by alpeace89
Hi,

I have installed Arduino IDE on Rpi. All works fine except the serial ports (on tools menu) is greyed out? Thus I cannot do anything. When I type lsusb the arduino does not show up as 'arduino' as it does in many online tutorials, instead it appears to be listed as 'Atmel Corp'. Any help appreciated.

Cheers,

Alex

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Sun Sep 21, 2014 8:57 pm
by DougieLawson
What does dmesg show when you plug in your Arduino?

My Uno appears as /dev/ttyACM0 (which works with the IDE) some appear as /dev/ttyUSB0. You can use udev rules to assign an alias.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 8:36 am
by alpeace89
dmesg shows:

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.12.28+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #709 PREEMPT Mon Sep 8 15:28:00 BST 2014
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] cma: CMA: reserved 8 MiB at 1b800000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c061dd90, node_mem_map c06cf000
[    0.000000]   Normal zone: 896 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 114688 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1680 bcm2708_fb.fbheight=1050 bcm2708.boardrev=0xe bcm2708.serial=0x8865610c smsc95xx.macaddr=B8:27:EB:65:61:0C sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 439532K/458752K available (4498K kernel code, 242K rwdata, 1344K rodata, 143K init, 701K bss, 19220K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05bca24   (5843 kB)
[    0.000000]       .init : 0xc05bd000 - 0xc05e0eac   ( 144 kB)
[    0.000000]       .data : 0xc05e2000 - 0xc061e8a0   ( 243 kB)
[    0.000000]        .bss : 0xc061e8ac - 0xc06ce080   ( 702 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:394
[    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[    0.000000] Switching to timer-based delay loop
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.001176] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.001237] pid_max: default: 32768 minimum: 301
[    0.001754] Mount-cache hash table entries: 512
[    0.002571] Initializing cgroup subsys memory
[    0.002682] Initializing cgroup subsys devices
[    0.002720] Initializing cgroup subsys freezer
[    0.002751] Initializing cgroup subsys blkio
[    0.002900] CPU: Testing write buffer coherency: ok
[    0.003367] Setting up static identity map for 0xc04487f8 - 0xc0448854
[    0.005299] devtmpfs: initialized
[    0.021282] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.022859] NET: Registered protocol family 16
[    0.028193] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.028879] cpuidle: using governor ladder
[    0.028927] cpuidle: using governor menu
[    0.029356] bcm2708.uart_clock = 0
[    0.031435] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.031496] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.031530] mailbox: Broadcom VideoCore Mailbox driver
[    0.031627] bcm2708_vcio: mailbox at f200b880
[    0.031732] bcm_power: Broadcom power driver
[    0.031771] bcm_power_open() -> 0
[    0.031794] bcm_power_request(0, 8)
[    0.532514] bcm_mailbox_read -> 00000080, 0
[    0.532552] bcm_power_request -> 0
[    0.532808] Serial: AMBA PL011 UART driver
[    0.532982] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    0.893536] console [ttyAMA0] enabled
[    0.920672] bio: create slab <bio-0> at 0
[    0.926199] SCSI subsystem initialized
[    0.930197] usbcore: registered new interface driver usbfs
[    0.935900] usbcore: registered new interface driver hub
[    0.941456] usbcore: registered new device driver usb
[    0.948056] Switched to clocksource stc
[    0.952327] FS-Cache: Loaded
[    0.955494] CacheFiles: Loaded
[    0.971377] NET: Registered protocol family 2
[    0.977182] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.984593] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.991181] TCP: Hash tables configured (established 4096 bind 4096)
[    0.997628] TCP: reno registered
[    1.000924] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.006795] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.013569] NET: Registered protocol family 1
[    1.018554] RPC: Registered named UNIX socket transport module.
[    1.024512] RPC: Registered udp transport module.
[    1.029315] RPC: Registered tcp transport module.
[    1.034037] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.041392] bcm2708_dma: DMA manager at f2007000
[    1.046134] bcm2708_gpio: bcm2708_gpio_probe c05efef0
[    1.051702] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.061279] audit: initializing netlink socket (disabled)
[    1.066789] type=2000 audit(0.910:1): initialized
[    1.236561] VFS: Disk quotas dquot_6.5.2
[    1.240921] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.249916] FS-Cache: Netfs 'nfs' registered for caching
[    1.256822] NFS: Registering the id_resolver key type
[    1.262107] Key type id_resolver registered
[    1.266315] Key type id_legacy registered
[    1.271123] msgmni has been set to 874
[    1.276863] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.284724] io scheduler noop registered
[    1.288799] io scheduler deadline registered (default)
[    1.294277] io scheduler cfq registered
[    1.299487] BCM2708FB: allocated DMA memory 5bc00000
[    1.304532] BCM2708FB: allocated DMA channel 0 @ f2007000
[    1.315917] bcm2708_fb_pan_display(0,0) returns=0
[    1.330079] Console: switching to colour frame buffer device 210x65
[    1.330836] bcm2708_fb_pan_display(0,0) returns=0
[    1.361499] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
[    1.369363] uart-pl011 dev:f1: no DMA platform data
[    1.374388] kgdb: Registered I/O driver kgdboc.
[    1.379755] vc-cma: Videocore CMA driver
[    1.383781] vc-cma: vc_cma_base      = 0x00000000
[    1.388645] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.394144] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.409759] brd: module loaded
[    1.418499] loop: module loaded
[    1.422050] vchiq: vchiq_init_state: slot_zero = 0xdb800000, is_master = 0
[    1.430259] Loading iSCSI transport class v2.0-870.
[    1.436404] usbcore: registered new interface driver smsc95xx
[    1.442633] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.648789] Core Release: 2.80a
[    1.652030] Setting default values for core params
[    1.656939] Finished setting default values for core params
[    1.862775] Using Buffer DMA mode
[    1.866180] Periodic Transfer Interrupt Enhancement - disabled
[    1.872151] Multiprocessor Interrupt Enhancement - disabled
[    1.877831] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.882309] Dedicated Tx FIFOs mode
[    1.886226] WARN::dwc_otg_hcd_init:1042: FIQ DMA bounce buffers: virt = 0xdbc14000 dma = 0x5bc14000 len=9024
[    1.896307] FIQ FSM acceleration enabled for :
[    1.896307] Non-periodic Split Transactions
[    1.896307] Periodic Split Transactions
[    1.896307] High-Speed Isochronous Endpoints
[    1.913376] dwc_otg: Microframe scheduler enabled
[    1.913472] WARN::hcd_init:473: FIQ at 0xc0321550
[    1.918327] WARN::hcd_init:474: FIQ ASM at 0xc0321800 length 36
[    1.928919] WARN::hcd_init:500: MPHI regs_base at 0xdc806000
[    1.939124] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.948549] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.960356] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.970355] Init: Port Power? op_state=1
[    1.978767] Init: Power Port (0)
[    1.986777] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.998167] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.009979] usb usb1: Product: DWC OTG Controller
[    2.019186] usb usb1: Manufacturer: Linux 3.12.28+ dwc_otg_hcd
[    2.029571] usb usb1: SerialNumber: bcm2708_usb
[    2.039533] hub 1-0:1.0: USB hub found
[    2.047893] hub 1-0:1.0: 1 port detected
[    2.056869] dwc_otg: FIQ enabled
[    2.056892] dwc_otg: NAK holdoff enabled
[    2.056902] dwc_otg: FIQ split-transaction FSM enabled
[    2.056924] Module dwc_common_port init
[    2.057409] usbcore: registered new interface driver usb-storage
[    2.068496] mousedev: PS/2 mouse device common for all mice
[    2.079427] bcm2835-cpufreq: min=700000 max=1000000 cur=700000
[    2.090036] bcm2835-cpufreq: switching to governor powersave
[    2.100149] bcm2835-cpufreq: switching to governor powersave
[    2.110390] sdhci: Secure Digital Host Controller Interface driver
[    2.121003] sdhci: Copyright(c) Pierre Ossman
[    2.129868] sdhci: Enable low-latency mode
[    2.178138] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    2.190760] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    2.201382] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.213693] ledtrig-cpu: registered to indicate activity on CPUs
[    2.231702] hidraw: raw HID events driver (C) Jiri Kosina
[    2.242007] usbcore: registered new interface driver usbhid
[    2.254439] Indeed it is in host mode hprt0 = 00021501
[    2.266288] usbhid: USB HID core driver
[    2.279840] TCP: cubic registered
[    2.301855] Initializing XFRM netlink socket
[    2.328177] NET: Registered protocol family 17
[    2.338307] Key type dns_resolver registered
[    2.378604] registered taskstats version 1
[    2.399431] Waiting for root device /dev/mmcblk0p6...
[    2.409313] mmc0: read SD Status register (SSR) after 3 attempts
[    2.432672] mmc0: new high speed SDHC card at address 0002
[    2.443682] mmcblk0: mmc0:0002 00000 7.32 GiB 
[    2.456402]  mmcblk0: p1 p2 < p5 p6 >
[    2.538277] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.550573] Indeed it is in host mode hprt0 = 00001101
[    2.768549] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.793219] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.818831] hub 1-1:1.0: USB hub found
[    2.827430] hub 1-1:1.0: 3 ports detected
[    3.128248] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.248526] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.264484] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.291011] smsc95xx v1.0.4
[    3.378464] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:65:61:0c
[    3.488240] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.613200] usb 1-1.2: New USB device found, idVendor=05ac, idProduct=1001
[    3.625319] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.637705] usb 1-1.2: Product: Hub in Apple USB Keyboard
[    3.658102] usb 1-1.2: Manufacturer: Alps Electric
[    3.671847] hub 1-1.2:1.0: USB hub found
[    3.688146] hub 1-1.2:1.0: 3 ports detected
[    3.756099] EXT4-fs (mmcblk0p6): recovery complete
[    3.767451] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[    3.780435] VFS: Mounted root (ext4 filesystem) on device 179:6.
[    3.791374] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[    3.803860] devtmpfs: mounted
[    3.812992] Freeing unused kernel memory: 140K (c05bd000 - c05e0000)
[    3.888409] usb 1-1.3: device descriptor read/64, error -32
[    4.124413] usb 1-1.3: New USB device found, idVendor=03eb, idProduct=2fef
[    4.137428] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.149811] usb 1-1.3: Product: ATmega16u2 DFU
[    4.160200] usb 1-1.3: Manufacturer: ATMEL
[    4.248570] usb 1-1.2.1: new low-speed USB device number 6 using dwc_otg
[    4.384744] usb 1-1.2.1: New USB device found, idVendor=05ac, idProduct=0201
[    4.406873] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.419539] usb 1-1.2.1: Product: Apple USB Keyboard
[    4.429432] usb 1-1.2.1: Manufacturer: Alps Electric
[    4.465153] input: Alps Electric Apple USB Keyboard as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1:1.0/input/input0
[    4.482943] hid-generic 0003:05AC:0201.0001: input,hidraw0: USB HID v1.00 Keyboard [Alps Electric Apple USB Keyboard] on usb-bcm2708_usb-1.2.1/input0
[    5.464706] udevd[156]: starting version 175
[    7.794591] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory
[   12.373802] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
[   12.899519] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
[   19.022195] FAT-fs (mmcblk0p5): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   22.345171] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   23.861751] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
[   25.031089] bcm2835-cpufreq: switching to governor ondemand
[   25.031124] bcm2835-cpufreq: switching to governor ondemand
[   27.149783] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SSFS
[  146.988480] bcm2708_fb_pan_display(0,0) returns=0
[  147.052335] bcm2708_fb_blank(1) returns=1 p[1]=0x80000000
[  147.059248] bcm2708_fb_pan_display(0,0) returns=0
[  147.813011] bcm2708_fb_blank(0) returns=0 p[1]=0x80000000
[  154.622675] usb 1-1.3: USB disconnect, device number 5
[  159.722890] usb 1-1.3: new low-speed USB device number 7 using dwc_otg
[  159.827574] usb 1-1.3: New USB device found, idVendor=192f, idProduct=0916
[  159.827615] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[  159.827632] usb 1-1.3: Product: USB Optical Mouse
[  159.851630] input: USB Optical Mouse as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input1
[  159.853793] hid-generic 0003:192F:0916.0002: input,hidraw1: USB HID v1.11 Mouse [USB Optical Mouse] on usb-bcm2708_usb-1.3/input0
[  203.525282] usb 1-1.3: USB disconnect, device number 7
[  216.814728] usb 1-1.3: new full-speed USB device number 8 using dwc_otg
[  216.929327] usb 1-1.3: New USB device found, idVendor=03eb, idProduct=2fef
[  216.929367] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  216.929383] usb 1-1.3: Product: ATmega16u2 DFU
[  216.929396] usb 1-1.3: Manufacturer: ATMEL
How do I assign an alias?

Alex

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 9:57 am
by DougieLawson
You need to solve the

Code: Select all

device descriptor read/64, error -32
problem first. That can be caused by the USB device needing more power than is available. So one option is to try in a powered hub.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:15 am
by alpeace89
Ok I will try to sort that. So it isn't possible to plug Arduino Uno directly into RPi?

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:21 am
by DougieLawson
My regular, genuine, non-cloned Uno is plugged into my RPi right now and appears as /dev/ttyACM0.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:23 am
by alpeace89
Hmmm strange, my one is a new official (like bought from a shop in an Arduino box) and does not show. I have got a new cable from work so will try that later and see if that makes a difference.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:27 am
by DougieLawson
My RPi is running on a 2A power supply.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:31 am
by alpeace89
In addition to the USB connection?

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 10:38 am
by DougieLawson
alpeace89 wrote:In addition to the USB connection?
I don't use a powered hub but I do have a reliable 2A supply for the whole system.

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 12:15 pm
by alpeace89
I am using a HTC phone charger like this to power the RPi and peripherals: http://www.htcaccessorystore.com/uk/p_h ... x?i=204070

Could this not be providing enough power?

Alex

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 3:20 pm
by DougieLawson
Something like this: http://cpc.farnell.com/pro-power/mwusb3 ... dp/PW03051

My Pi with my Arduino and Arduberry is currently running from: http://www.tesco.com/direct/hudl-micro- ... 6-0645.prd Which is rated at 2A. (I'm using my HTC phone charger for the Hudl.)

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Mon Sep 22, 2014 3:59 pm
by alpeace89
Thanks I will try some different power options later.

Alex

Re: Arduino uno on raspberry pi: serial ports not showing

Posted: Tue Sep 23, 2014 4:46 pm
by alpeace89
I swapped the Arduino board today. New one worked instantly! Works with both Mac and Rpi now.

Cheers,

Alex