Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Problem connecting two Arduino boards

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
Alefa
Posts: 17
Joined: 2013-06-11 09:09

[SOLVED] Problem connecting two Arduino boards

#1 Post by Alefa »

Hi,

I'm trying to connect two Arduino microcontrollers to my laptop running Debian Stretch, but without success. Connecting a single board works fine. The problem seems to be that both Arduinos are assigned to the same serial port (for example /dev/ttyACM1), and then one of the boards gets disconnected. Here is the output of dmesg when I connect the first board via USB:

Code: Select all

[331661.246877] usb 2-1: new full-speed USB device number 93 using xhci_hcd
[331661.397748] usb 2-1: New USB device found, idVendor=2341, idProduct=0242
[331661.397753] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[331661.397755] usb 2-1: Product: Genuino Mega 2560
[331661.397757] usb 2-1: Manufacturer: Arduino LLC (www.arduino.cc)
[331661.397759] usb 2-1: SerialNumber: 55434343633351501181
[331661.398492] cdc_acm 2-1:1.0: ttyACM1: USB ACM device

And this is what happens when I connect the second board:

Code: Select all

[331676.860957] usb 2-1: USB disconnect, device number 93
[331677.082844] usb usb3-port1: over-current condition
[331678.074958] usb 2-2: new full-speed USB device number 94 using xhci_hcd
[331678.225561] usb 2-2: New USB device found, idVendor=2341, idProduct=0242
[331678.225566] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[331678.225569] usb 2-2: Product: Genuino Mega 2560
[331678.225572] usb 2-2: Manufacturer: Arduino LLC (www.arduino.cc)
[331678.225575] usb 2-2: SerialNumber: 5543434363335150C0B0
[331678.226313] cdc_acm 2-2:1.0: ttyACM1: USB ACM device
As you see, the first board becomes disconnected as soon as I plugin the second board. The first board's control LED also goes out.

The strange thing is that connecting two boards to the same computer worked fine when I last tested it about a year ago. At that time, one Arduino was automatically assigned to ttyACM0 and the second to ttyACM1. Maybe the issue was introduced through a kernel update? I'm running kernel 4.14 from stretch-backports, because the default kernel in Stretch (4.9) causes graphical artifacts and system crashes with my hardware.

Any idea how to solve or debug this? I've already spent hours googling, but to no avail. If you'd like to have additional information about my system, let me know.
Last edited by Alefa on 2018-01-30 11:41, edited 1 time in total.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Problem connecting two Arduino boards

#2 Post by Dai_trying »

I just tested on my machine and it seems to be working ok here

Code: Select all

Jan 29 22:31:58 q4fujitsu kernel: [45242.784021] usb 2-2: new full-speed USB device number 2 using uhci_hcd
Jan 29 22:31:58  kernel: [45243.004106] usb 2-2: New USB device found, idVendor=2341, idProduct=0042
Jan 29 22:31:58  kernel: [45243.004110] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Jan 29 22:31:58  kernel: [45243.004113] usb 2-2: Manufacturer: Arduino (www.arduino.cc)
Jan 29 22:31:58  kernel: [45243.004115] usb 2-2: SerialNumber: 956353336303510182E1
Jan 29 22:31:58  mtp-probe: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2"
Jan 29 22:31:58  mtp-probe: bus: 2, device: 2 was not an MTP device
Jan 29 22:31:58  kernel: [45243.148987] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
Jan 29 22:31:58  kernel: [45243.150526] usbcore: registered new interface driver cdc_acm
Jan 29 22:31:58  kernel: [45243.150529] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Jan 29 22:32:22  kernel: [45267.364018] usb 3-2: new full-speed USB device number 3 using uhci_hcd
Jan 29 22:32:22  kernel: [45267.579162] usb 3-2: New USB device found, idVendor=2341, idProduct=0043
Jan 29 22:32:22  kernel: [45267.579166] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Jan 29 22:32:22  kernel: [45267.579169] usb 3-2: Manufacturer: Arduino (www.arduino.cc)
Jan 29 22:32:22  kernel: [45267.579172] usb 3-2: SerialNumber: 556393131333514190F0
Jan 29 22:32:22  kernel: [45267.582329] cdc_acm 3-2:1.0: ttyACM1: USB ACM device
Jan 29 22:32:22  mtp-probe: checking bus 3, device 3: "/sys/devices/pci0000:00/0000:00:1d.2/usb3/3-2"
Jan 29 22:32:22  mtp-probe: bus: 3, device: 3 was not an MTP device
Jan 29 22:32:44  kernel: [45288.924085] usb 3-2: USB disconnect, device number 3
Jan 29 22:32:48  kernel: [45292.892088] usb 2-2: USB disconnect, device number 2
I connected the Arduino Mega first and then an Uno and both are available.

User avatar
Alefa
Posts: 17
Joined: 2013-06-11 09:09

Re: Problem connecting two Arduino boards

#3 Post by Alefa »

Thanks for trying this out! Which kernel version do you use?
I just noticed that dmesg shows the message "usb3-port1: over-current condition" when I plug in the second board. Apparently this message usually appears when there's a short circuit in the usb port. Maybe I need to clean my usb ports, but I think it's strange that the message only appears when both ports are connected to Arduino boards. Connecting two pen drives at the same time works fine. Maybe there's a problem with the Arduinos' usb cables. I'll try different cables and a different computer next. I can also try exchanging one of the Arduino Mega boards with an Arduino Uno I have at home.
If you or anybody else has other ideas how to solve this, please let me know.
Dell Latitude E6320
Debian Wheezy KDE

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Problem connecting two Arduino boards

#4 Post by Dai_trying »

Yes I noticed that line in your dmesg output too, I was wondering if you were using a hub attached and it may have been drawing too much power from a single usb port, but that was just a guess really. Just one thing though, do you have anything connected to the Arduino boards when you connect them as this might cause more current to go through the usb port...

My Kernel : 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux

I only have one Mega board so couldn't test with two, but I wouldn't have thought it made a difference.

User avatar
Alefa
Posts: 17
Joined: 2013-06-11 09:09

Re: Problem connecting two Arduino boards

#5 Post by Alefa »

No, I'm not using a usb hub, just the two ports in the laptop. But you put me on the right track with your last comment. I had a rather complex array of four circuit boards connected to the Arduinos. Once I unplugged everything, I was able to connect both boards to the computer without problems. So now I only have to find out what's causing the short circuit. :(
I didn't consider this possibility before, because the whole array was working perfectly last year. Evidently something's broken now. Since this is not a Linux problem, I'll mark the thread as solved. Thanks a lot for your help!
Dell Latitude E6320
Debian Wheezy KDE

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: [SOLVED] Problem connecting two Arduino boards

#6 Post by Dai_trying »

You're welcome, and I don't think there is a short circuit, just the devices are using more current than the usb port can supply, generally it is less than 500mA and often it is considerably less (depending on laptop). Also I don't know if you were running on battery but if you were you could try connecting the mains power to laptop to see if it helps.

Davood_T
Posts: 1
Joined: 2018-02-07 18:53

Re: [SOLVED] Problem connecting two Arduino boards

#7 Post by Davood_T »

Thank you
my problem is solve

Post Reply