Can't access Arduino under Ubuntu 18

If you're having trouble with your LattePanda Alpha & Delta, here's the place to get help.
Forum rules
If you have not found a solution, post a new issue. To speed up the process please let us know:
- Have you tried the solutions listed above?
- What board are you using? Standard (2GB RAM/32GB eMMC) or Enhanced (4GB RAM/64GB eMMC)?
- Have you tried any other solutions?
- How long have you had your board for?
- When did you first boot your board?
- Did it work ok before the issue occurred or has the issue always been there?
- Use images and videos to help us understand the issue where possible

If you are seeking RMA:
- Please open a new topic rather than hijacking someone else's thread
- Mark RMA posts with [DEFECTIVE] + <helpful description of issue>. We can then approve/disapprove each request
- Completed RMA cases will be marked with [CLOSED]
You can find the RMA guide [here]

Resolved Issues
- If you manage to fix an issue, please share your solution for the good of the community. It could help someone else in future.
- If an issue is resolved the thread should be marked as [RESOLVED]. We can then sticky the thread to help people in future.
Post Reply
User avatar
zlite
Posts: 1
Joined: Mon Jan 28, 2019 4:57 am

Mon Jan 28, 2019 5:27 am

I'm having trouble accessing the onboard Arduino on the Panda Alpha using Ubuntu 18. I get the following permission error on /dev/ttyACM0, despite adding my username to the dialout account. How do I fix this?
image.png
image.png (49.51 KiB) Viewed 5280 times

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Mon Jan 28, 2019 8:28 am

Since the "Leonardo" comes from the Arduino community, you might want to ask in the Arduino forum.
https://www.arduino.cc/
There are certainly more people who use Arduino under Ubuntu than here.

User avatar
raidensnake
Posts: 25
Joined: Mon Apr 23, 2018 7:31 am

Sat Mar 09, 2019 8:53 am

It's probably the kernel that got replaced. Do you know what version you have? You can use uname -a to find out.

User avatar
LattePanda
Site Admin
Posts: 2768
Joined: Wed Jan 20, 2016 9:09 am

Wed Mar 13, 2019 10:06 am

Enjoy Tinkering with LattePanda ! :lol:

User avatar
Subliminaltic
Posts: 4
Joined: Sun Sep 01, 2019 8:29 pm

Mon Sep 02, 2019 7:52 pm

Hello world - first post...

Reviving this topic as I
just
received my LattePanda Alpha (m-3-8100Y CPU, 970 EVO MVMe M.2 SSD, Ubuntu 18.04.3 LTS).
I installed the Arduino IDE 1.8.9 and created an account for the online Arduino cc editor.
Using either of these tools (one at a time) I can see and connect to the Leonardo Arduino on /dev/ttyACM0. However when I try to upload the blink example I get the same behavior in both tools:
a) Hang here:
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type =
Software Version = 1.0; No Hardware Version given...

or

b) Hang here:
Programming with: Serial
Restarting in bootloader mode
Get port list before reset
[/dev/ttyACM0 /dev/ttyS4]
Touching port /dev/ttyACM0 at 1200bps

I checked the USB device exits as the correct type and ensured I am a member of the dialout group:
<username>@Lattepande-Alpha:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 006: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 001 Device 005: ID 0461:4de2 Primax Electronics, Ltd
Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
<username>@Lattepande-Alpha:~$ groups <username>
<username> : <username> adm dialout cdrom sudo dip plugdev lpadmin sambashare
<username>@Lattepande-Alpha:~$ ls -l /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Sep 2 20:07 /dev/ttyACM0

While writing this post I noticed that the D13 LED is now not ON any longer and that the lsusb command no longer shows the Arduino:(

Any thoughts would be gratefully received, as I have not found any solutions in this forum or others. I do have to put my hand up and admit my Ubuntu experience is limited...

Thanks

User avatar
Subliminaltic
Posts: 4
Joined: Sun Sep 01, 2019 8:29 pm

Mon Sep 02, 2019 11:29 pm

After much trial and error and Googling...

I used the screen terminal to talk to the Arduino during the 5 second time window where the bootloader is active after pressing the reset button. I.e.release the reset button and run the following command asap:

screen /dev/ttyACM0 1200

After several attempts the D13 (red) LED kept pulsing (i.e. the Arduino reset properly) and I closed the terminal window.

At this point the lsusb command found:

<username>@Lattepande-Alpha:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 2341:0036 Arduino SA
Bus 001 Device 006: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 001 Device 005: ID 0461:4de2 Primax Electronics, Ltd
Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Almost there... Now at least the Arduino IDE actually tried to upload the sketch rather than failing immediately. However the port was busy, so still no luck. The issue of a busy port is well documented, use the following:

systemctl status

This produces a tree of the services currently running on the LattePanda. I could see that the SCREEN app was still active on ttyACM0. I restarted the LattePanda.

I started the Arduino IDE and uploading blink JUST WORKED... This obviously also loaded the correct USB driver onto the Leonardo because now using the lsusb command returns the correct device information for the Leonardo:

<username>@Lattepande-Alpha:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 010: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 006: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 001 Device 005: ID 0461:4de2 Primax Electronics, Ltd
Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So blink is running and the Leonardo is visible on /dev/ttyACM0. All good? No.

Unfortunately, trying a very simple modification to the blink sketch (changing the blink period to 500ms instead of 1000ms) and attempting to compile and upload resulted in the problem I described in (literally) my first post above.

This leads me to the conclusion that the solution is rather flaky and I´m looking to the admin for clues on how to make this stable. This should be basic and bomb-proof given the Leonardo is the coprocessor designed into the LattePanda.

Thoughts anyone?

Thanks

User avatar
OtavioOliveira
Posts: 1
Joined: Wed Jul 21, 2021 1:02 am

Wed Jul 21, 2021 1:09 am

I have the following problem:
I installed Arduino IDE and tried to send the Blink code to arduino on my LattePanda board. But when I clicked to upload, the program crashed and now the RX LED is on all the time.
How do I fix this problem?

User avatar
lovecd666
Posts: 8
Joined: Fri Dec 23, 2016 8:52 am

Fri Jul 23, 2021 8:12 am

OtavioOliveira wrote:
Wed Jul 21, 2021 1:09 am
I have the following problem:
I installed Arduino IDE and tried to send the Blink code to arduino on my LattePanda board. But when I clicked to upload, the program crashed and now the RX LED is on all the time.
How do I fix this problem?
Try to flash the arduino leonardo bootloader to the chip. This post may help you
https://zh.ifixit.com/Guide/Arduino+Leo ... ent/124128

Post Reply