1

I have an Orange Pi Zero running Lubuntu and I want it to communicate with an Arduino (clone).

I have just put the USB cable from the arduino into my Orange Pi. If compare al the 'ports'(?) (/dev folder) when I am plugged in and when I am not i found that /dev/usbdev6.4 is my arduino.

My arduino is just running a code where it says every second "Hey" over serial. So i tried to run: minicom -D /dev/usbdev6.4 But noting comes up.

I have tried a lot of things and I am now out of options.

Can somebody help my?

EDIT: The requested information:

My kernel version:

Linux orangepi 3.4.39 #46 SMP PREEMPT Wed Nov 9 09:50:08 CST 2016 armv7l armv7l armv7l GNU/Linux

the dmesg | grep -i tty command gave me this:

$[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 init=/sbin/init rootwait rootfstype=ext4 panic=10 consoleblank=0 enforcing=0 loglevel=7
[    0.000000] console [tty1] enabled
[    0.393385] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.505110] console [ttyS0] enabled
[    1.007724] uart1: ttyS1 at MMIO 0x1c28400 (irq = 33) is a SUNXI
[    1.111633] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI
[    2.490156] Bluetooth: RFCOMM TTY layer initialized

dmesg difference:

> [  188.338462] ehci_irq: highspeed device connect
> [  188.540136] ehci_irq: highspeed device disconnect
> [  188.540200] ohci_irq: fullspeed or lowspeed device connect
> [  188.960117] usb 6-1: new full-speed USB device number 2 using sunxi-ohci

lsusb difference:

> Bus 006 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

I have also read this: https://lists.launchpad.net/kernel-packages/msg183415.html

It is about a CH341 chip bug. And I think my clone arduino is using this. Could this be the problem?

I did modinfo ch341 and this returned:

libkmod: ERROR ../libkmod/libkmod.c:507 kmod_lookup_alias_from_builtin_file: 
could not open builtin file '/lib/modules/3.4.39/modules.builtin.bin'
modinfo: ERROR: Module ch341 not found.

Thanks in advance!

SimonG
  • 13
  • Hi, welcome to stackexchange! if you see /dev/usbdev6.4 that's already a good sign, but usually serial ports start with something like /dev/ttyXXXX, where XXXX could be something like tty0 or ttyUSB0.... do you see anything like that? also, check that you are using the appropriate baud rate – Sam F Apr 11 '17 at 10:17
  • Thank you both for the fast response! I have edited the question :) Hope you can help me. – SimonG Apr 11 '17 at 11:23
  • /dev/ttyS3 is not found and the lsmod command returns nothing... – SimonG Apr 11 '17 at 13:04
  • Please edit your question with the output of modinfo ch341 (called as root). – dirkt Apr 11 '17 at 13:58

1 Answers1

1

And there's your answer: You don't have the kernel module needed for your USB serial device. Upgrade to a newer kernel that contains this module, or compile the module for your kernel.

Make sure you use a version of the module source code that already includes the device id you need (1a86:7523). After successful installation, you should get something like

$ sudo modinfo ch341
filename:       /lib/modules/4.8.5/kernel/drivers/usb/serial/ch341.ko
license:        GPL
alias:          usb:v1A86p5523d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v1A86p7523d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v4348p5523d*dc*dsc*dp*ic*isc*ip*in*
depends:        usbserial,usbcore
intree:         Y
vermagic:       4.8.5 SMP preempt mod_unload modversions 686 

(that's for my system, of course). The alias v1A86p7523d is the one that was patched in and should be present.

dirkt
  • 32,309