Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
3
answers
4486
views
Arduino: avrdude: ser_open(): can't open device "/dev/ttyACM1": Input/output error
I use arduino ide on arch linux with arduino uno connected via USB. I am sure that I choosed right port and board in ide menu. when I run `ls -l /dev/ttyACM*` I get: ``` crw-rw---- 1 root uucp 166, 0 14. dub 12.44 /dev/ttyACM0 crw-rw-rw- 1 root uucp 166, 1 14. dub 12.54 /dev/ttyACM1 ``` bu...
I use arduino ide on arch linux with arduino uno connected via USB.
I am sure that I choosed right port and board in ide menu.
when I run
ls -l /dev/ttyACM*
I get:
crw-rw---- 1 root uucp 166, 0 14. dub 12.44 /dev/ttyACM0
crw-rw-rw- 1 root uucp 166, 1 14. dub 12.54 /dev/ttyACM1
but when I click upload I get this error:
Sketch uses 440 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: Version 6.3, compiled on Jul 7 2020 at 19:38:43
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "//etc/avrdude.conf"
User configuration file is "/home/john/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM1
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "/dev/ttyACM1": Input/output error
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected
Error remains on newest linux kernel and LTS.
---
My device is Lenovo thinkpad X390: Linux 5.11.14-arch1-1
---
When I plug arduino to usb and then run sudo dmesg
I get this messages:
[ 1605.378324] usb 1-4: new full-speed USB device number 14 using xhci_hcd
[ 1605.520509] usb 1-4: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
[ 1605.520517] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1605.520521] usb 1-4: Manufacturer: Arduino (www.arduino.cc)
[ 1605.520523] usb 1-4: SerialNumber: 7583434383935150E152
[ 1605.523881] cdc_acm 1-4:1.0: ttyACM1: USB ACM device
[ 1630.618749] usb 1-9: reset full-speed USB device number 10 using xhci_hcd
[ 1630.792727] audit: type=1130 audit(1618567069.016:82): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1632.601215] audit: type=1100 audit(1618567070.822:83): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:authentication grantors=? acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=failed'
[ 1635.720577] audit: type=1100 audit(1618567073.942:84): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.721507] audit: type=1101 audit(1618567073.942:85): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="john" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.722751] audit: type=1110 audit(1618567073.946:86): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1635.727018] audit: type=1105 audit(1618567073.949:87): pid=29714 uid=1000 auid=1000 ses=1 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
---
How can I fix this ?
Thank you for help
**PS:** If you need any more information, comment below and I will add it soon as possible.
Jan Černý
(1723 rep)
Apr 14, 2021, 11:16 AM
• Last activity: Jul 24, 2025, 06:28 PM
4
votes
1
answers
2154
views
How to bind arduino as a fix block-device --- /dev/ttyACM0?
I want to bind my Arduino Mega as /dev/ttyACM0. Sometimes, it turns out to be /dev/ttyACM0 and sometimes as /dev/ttyACM1. I have taken help from this [question][1] and this [tutorial][2] [1]: https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name [2]: http://www.re...
I want to bind my Arduino Mega as /dev/ttyACM0. Sometimes, it turns out to be /dev/ttyACM0 and sometimes as /dev/ttyACM1.
I have taken help from this question and this tutorial
Someone please help me to achieve that as there are only 2 entries in /etc/udev/rules.d :-
1. 20-crystalhd.rules
2. 98-kexec.rules
The output of
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)
:-
> Udevadm info starts with the device specified by the devpath and then
> walks up the chain of parent devices. It prints for every device
> found, all possible attributes in the udev rules key format. A rule to
> match, can be composed by the attributes of the device and the
> attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/tty/ttyACM0':
KERNEL=="ttyACM0"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0':
KERNELS=="2-1.5:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="cdc_acm"
ATTRS{bInterfaceClass}=="02"
ATTRS{bmCapabilities}=="6"
ATTRS{bInterfaceSubClass}=="02"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bNumEndpoints}=="01"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5':
KERNELS=="2-1.5"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.5"
ATTRS{idVendor}=="2341"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 2"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{busnum}=="2"
ATTRS{devnum}=="4"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0001"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="55431313937351C05151"
ATTRS{version}==" 1.10"
ATTRS{urbnum}=="17"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Arduino (www.arduino.cc)"
ATTRS{removable}=="removable"
ATTRS{idProduct}=="0042"
ATTRS{bDeviceClass}=="02"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1':
KERNELS=="2-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{devpath}=="1"
ATTRS{idVendor}=="8087"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="2"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="6"
ATTRS{bcdDevice}=="0000"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="70"
ATTRS{ltm_capable}=="no"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0024"
ATTRS{bDeviceClass}=="09"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="2"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="2"
ATTRS{bcdDevice}=="0310"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:1d.0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="42"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.10.0-123.13.2.el7.x86_64 ehci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0002"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="EHCI Host Controller"
looking at parent device '/devices/pci0000:00/0000:00:1d.0':
KERNELS=="0000:00:1d.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x104d"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0320"
ATTRS{companion}==""
ATTRS{enabled}=="1"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="000f"
ATTRS{device}=="0x1c26"
ATTRS{uframe_periodic_max}=="100"
ATTRS{msi_bus}==""
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x9081"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
***Where should I edit my entries in which files and how. Please explain in somewhat depth as I am much naive!!***
Please help me establish this. It's already taking my mind and mood off.
Am_I_Helpful
(721 rep)
Jan 17, 2015, 10:10 AM
• Last activity: Jul 18, 2025, 11:04 AM
0
votes
1
answers
81
views
arduino-cli only cannot access to serial port
I'm using Ubuntu 25.04. My Arduino board creates a serial port on `/dev/ttyACM0`. When I try to upload a sketch using command line I get the following error: $ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:leonardo sketch.ino Non è possibile effettuare il reset della porta: listing seri...
I'm using Ubuntu 25.04.
My Arduino board creates a serial port on
/dev/ttyACM0
.
When I try to upload a sketch using command line I get the following error:
$ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:leonardo sketch.ino
Non è possibile effettuare il reset della porta: listing serial ports: lstat /dev/mqueue: permission denied
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Caricamento non riuscito: errore durante il caricamento: exit status 1
The device has the correct permissions:
$ ls -l /dev/ttyA*
crw-rw-rw-+ 1 root dialout 166, 0 giu 10 08:00 /dev/ttyACM0
and the current user has the dialout
group:
$ groups
mark adm dialout cdrom sudo dip plugdev users lpadmin scanner vboxusers docker
I removed the ModemManager application (it is known that could lead to this issue):
$ sudo apt-get purge modemmanager
I also checked that no other applications are using the same port:
$ lsof /dev/ttyACM0
Any other applications (running as normal user) can open the port: CuteCom, cat, VSC, etc...
**What can cause such an error given all the steps above?**
UPDATE
--
Running:
$ journactl --follow
give the following output after issuing the upload command:
giu 10 08:38:36 mypc systemd: Started snap.arduino-cli.arduino-cli-538e4659-789a-4972-94e3-8d3dbe5dbf0a.scope.
giu 10 08:38:36 mypc kernel: kauditd_printk_skb: 26 callbacks suppressed
giu 10 08:38:36 mypc kernel: audit: type=1400 audit(1749537516.473:1519): apparmor="DENIED" operation="open" class="file" profile="snap.arduino-cli.arduino-cli" name="/snap/core/17210/usr/share/locale/it/LC_MESSAGES/snappy.mo" pid=42542 comm="snap-exec" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
giu 10 08:38:36 mypc kernel: audit: type=1326 audit(1749537516.672:1520): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.arduino-cli.arduino-cli pid=42542 comm="arduino-cli" exe="/snap/arduino-cli/60/usr/bin/arduino-cli" sig=0 arch=40000003 syscall=434 compat=1 ip=0x8056dee code=0x50000
giu 10 08:38:36 mypc kernel: audit: type=1400 audit(1749537516.674:1521): apparmor="DENIED" operation="getattr" class="posix_mqueue" profile="snap.arduino-cli.arduino-cli" name="/" pid=42608 comm="serial-discover" requested="getattr" denied="getattr"class="posix_mqueue" fsuid=1000 ouid=0
giu 10 08:38:37 mypc kernel: audit: type=1400 audit(1749537517.677:1522): apparmor="DENIED" operation="getattr" class="posix_mqueue" profile="snap.arduino-cli.arduino-cli" name="/" pid=42542 comm="arduino-cli" requested="getattr" denied="getattr"class="posix_mqueue" fsuid=1000 ouid=0
giu 10 08:38:37 mypc kernel: audit: type=1400 audit(1749537517.683:1523): apparmor="DENIED" operation="open" class="file" profile="snap.arduino-cli.arduino-cli" name="/dev/ttyACM0" pid=42629 comm="avrdude" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
giu 10 08:38:37 mypc systemd: snap.arduino-cli.arduino-cli-538e4659-789a-4972-94e3-8d3dbe5dbf0a.scope: Consumed 295ms CPU time, 133.2M memory peak.
Mark
(815 rep)
Jun 10, 2025, 06:25 AM
• Last activity: Jun 10, 2025, 07:02 AM
80
votes
10
answers
201247
views
How to bind USB device under a static name?
I have an Arduino which sometimes gets bound to `/dev/ttyUSB0` and other times to `/dev/ttyUSB1`, making my script fail. I do not want to enumerate all the possibilities of where my device could be, but I'd rather have it be bound somewhere static, e.g. `/dev/arduino`. How do I achieve that?
I have an Arduino which sometimes gets bound to
/dev/ttyUSB0
and other times to /dev/ttyUSB1
, making my script fail.
I do not want to enumerate all the possibilities of where my device could be, but I'd rather have it be bound somewhere static, e.g. /dev/arduino
.
How do I achieve that?
k0pernikus
(16501 rep)
Mar 5, 2013, 07:38 AM
• Last activity: Jun 22, 2024, 07:26 PM
1
votes
1
answers
693
views
Assign ttyACM to USB
I have a partially similar question like this one [https://unix.stackexchange.com/questions/466185/ttyusb-no-ttyacm-how-can-i-assign-the-usb-device-to-ttyacm-not-ttyusb][1] **But mine is a little bit more difficult.** I recently bought a Feather RP2040 Prop-Maker device like [this][2] I work for som...
I have a partially similar question like this one https://unix.stackexchange.com/questions/466185/ttyusb-no-ttyacm-how-can-i-assign-the-usb-device-to-ttyacm-not-ttyusb
**But mine is a little bit more difficult.**
I recently bought a Feather RP2040 Prop-Maker device like this
I work for some time with ESP32 and Arduino devices. And I connected this one to my computer and got readings from the Arduino IDE. I therefore know the device and cable are working fine.
However, it also works as a tiny USB device. The manual states one could upload files to it (it plays music and you are supposed to copy the files via USB).
However when I plug the device it is not recognized as USB device.
calling
lsusb
I see the device is there (obviously since I can read from the serial monitor in the Arduino IDE)
Bus 001 Device 022: ID 239a:8131 Adafruit Feather RP2040 Prop-Maker
Calling ls -l /dev/serial/by-id
it states this
lrwxrwxrwx 1 root root 13 Sep 16 16:57 usb-Adafruit_Feather_RP2040_Prop-Maker_DF6260785F590937-if00 -> ../../ttyACM0
So the device is understood as an ACM device. I thought that made sense since I can program it and read from the Serial connection.
However, I have no idea how I might connect it as a USB device for moving files there.
I had a look at the journal and saw this message:
kernel: usb 1-6.2.4: new full-speed USB device number 23 using xhci_hcd
kernel: usb 1-6.2.4: New USB device found, idVendor=239a, idProduct=8131, bcdDevice= 1.00
kernel: usb 1-6.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 1-6.2.4: Product: Feather RP2040 Prop-Maker
kernel: usb 1-6.2.4: Manufacturer: Adafruit
kernel: usb 1-6.2.4: SerialNumber: DF6260785F590937
kernel: cdc_acm 1-6.2.4:1.0: ttyACM0: USB ACM device
mtp-probe: checking bus 1, device 23: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.4"
mtp-probe: bus: 1, device: 23 was not an MTP device
mtp-probe: checking bus 1, device 23: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2.4"
mtp-probe: bus: 1, device: 23 was not an MTP device
The only solution I could find is to create a udev rule like that one:
#Adafruit RP2040 Prop-Maker Feather
ATTR{idVendor}=="293a", ATTR{idProduct}=="8131", GOTO="libmtp_rules_end"
And it kind of works that I don't get that error any longer. However the device still doesn't show up in lsblk or so. I can't mount anything.
I should note, I bought an Adafruit Soundboard which is the predecessor of that one. And there I can just plug in the cable and copy files. But it is not programmable so I assume it gets difficult when you want to use the device in 2 different ways - programming the ACM device and copy files on the USB device.
I would be fine to "switch" things, copy files and switch back to the programmable connection if that helps. But **how can I tell my system to interpret the device as USB drive**?
I'm using Manjaro (Arch) Linux. (And I tried the same on Windows with no success).
Any ideas?
Tobias Reich
(291 rep)
Sep 16, 2023, 10:06 PM
• Last activity: Sep 17, 2023, 04:14 PM
0
votes
1
answers
215
views
Login using arduino and RFID
I have been thinking about this for a while. How would I go about being able to log in using an Arduino and RFID card reader? Hardware: Arduino UNO, Card reader: RFID-RC522 OS: Arch Linux
I have been thinking about this for a while. How would I go about being able to log in using an Arduino and RFID card reader?
Hardware:
Arduino UNO, Card reader:
RFID-RC522
OS:
Arch Linux
Sixtenson
(1 rep)
Mar 12, 2023, 06:44 PM
• Last activity: Mar 12, 2023, 08:58 PM
1
votes
3
answers
1063
views
How to find Arduino connected to FreeBSD?
I have programmed Arduino to respond simple commands via USB. Unfortunately, I can't find it and can't communicate with it. My `usbconfig` returns following: $usbconfig ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA) ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0m...
I have programmed Arduino to respond simple commands via USB. Unfortunately, I can't find it and can't communicate with it.
My
usbconfig
returns following:
$usbconfig
ugen1.1: at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen0.1: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen4.1: at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen3.1: at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.2: at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen2.2: at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (96mA)
Is there Arduino among above?
When I try something like
screen /dev/ugen2.2
I have screen
exiting immediatedly.
**UPDATE**
Experimentally I found that
ugen3.3: at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (96mA)
appears and disappears according to whether I have connected arduino or not.
Unfortunately command
screen /dev/ugen2.3 9600
exits with saying
'/dev/ugen3.3' is not a tty Sorry, could not find a PTY or TTY.
Dims
(3425 rep)
Jan 6, 2018, 05:10 PM
• Last activity: Jan 23, 2023, 01:49 PM
7
votes
4
answers
35500
views
How to log Serial data with time stamp?
I have an Arduino sending serial data to the computer. I'm able to view the data using a Serial console. But, I want to be able to log it with time stamp. I want a ready made script or program that logs serial data with time-stamp automatically without me having to change much or mess with code.
I have an Arduino sending serial data to the computer. I'm able to view the data using a Serial console. But, I want to be able to log it with time stamp.
I want a ready made script or program that logs serial data with time-stamp automatically without me having to change much or mess with code.
Ufoguy
(1278 rep)
Dec 12, 2013, 08:01 AM
• Last activity: Sep 14, 2022, 06:34 AM
1
votes
1
answers
618
views
Can't type at Linux login prompt
I've just opened up two brand new Intel Galileo Gen 2s and am looking to login to their default Linux distro via terminal (ie. no SD card used). I am coming across a weird, identical issue with both which leads me to believe I am missing a step/doing something wrong. Please could someone help? Steps...
I've just opened up two brand new Intel Galileo Gen 2s and am looking to login to their default Linux distro via terminal (ie. no SD card used). I am coming across a weird, identical issue with both which leads me to believe I am missing a step/doing something wrong. Please could someone help?
Steps I've tried
----------------
The exact steps I have taken since unboxing the Galileos are:
1. Powered on the Intel Galileo Gen 2 and connected a UART cable, ethernet cable and micro usb to USB cable to a Mac. I also connected a keyboard directly to the Galileo's USB port.
2. Installed the 1.1.0 firmware via Intel's firmware updater software for Mac
3. In a Linux VM running inside the Mac, show the terminal input from the Galileo via
sudo picocom -b 115200 /dev/ttyUSB0
4. Restarted the Galileo.
At this point, with my keyboard plugged directly into the Galileo, I was able to navigate through the boot options (ie. Press Enter to directly boot
and selecting what to boot from). After selecting the default boot option, the Galileo booted and arrived at:
Poky 9.0.4 (Yocto Project 1.4.4 Reference Distro) 1.4.4 clanton /dev/ttyS1
clanton login:
At this login prompt, the cursor is flashing as you'd expect, however as soon as I try typing a single character, the cursor kind of freezes by just constantly being visible instead of flashing. I also do not see the character showing at the login prompt as you'd expect as you type something. I am unable to do anything else until I restart, at which point the same thing happens again.
Here are the log files from when attempting to boot with this approach.
Other attempts
--------------
I'm unsure if my peripheral setup is wrong, the way I am accessing the terminal, if I need to install some more drivers to support I/O or something else.
I have also tried using a custom Linux image via an SD card but have got the same end result (log files from that attempt here ).
Curiously, I have been able to follow these instructions to telnet into the Galileo and interact with it via a keyboard (keyboard plugged into the computer, not the Galileo this time), however I want to be able to avoid the Arduino IDE as required in these instructions as I believe I need to do that when booting from a Linux SD card which is what I ultimately want to do.
Thanks so much for your help!
hardanger
(121 rep)
Feb 4, 2022, 09:58 AM
• Last activity: Feb 20, 2022, 12:03 PM
1
votes
0
answers
282
views
Use bash to receive serial input then do some math with said input then send to virtual serial port for another app to read
I have an arduino sending me some numbers through serial @9600 baud. Two values seperated by a comma sent every 500ms or so. `cat /dev/ttyACM0` looks like this: 10.5,20.3 with the numbers ranging from -10 to 100. I have an application which receives this information and puts it on a graph for me to...
I have an arduino sending me some numbers through serial @9600 baud. Two values seperated by a comma sent every 500ms or so.
cat /dev/ttyACM0
looks like this: 10.5,20.3 with the numbers ranging from -10 to 100. I have an application which receives this information and puts it on a graph for me to visualize. My problem is the application in question lacks the ability to do any sort of math with the values given so I am stuck with what the arduino can send for graphing.
I need to take the numbers and "condition" them so to speak. Better put in pseudocode below:
read value1 //values parsed from serial using comma as a seperator
read value2 //I have no idea how to do that but I know its doable lol
var kwh = 0;
var lastReadTime = systemTimeMillis();
Loop {
var addKwh = (value1 + value2) * 120 * (systemTimeMillis() - lastReadTime)/1000/60/60/1000
kwh = kwh + addKwh
lastReadTime = systemTimeMillis();
echo $value1 + "," + $value2 + "," + $kwh > virtualSerialPortForOtherApplicationToRead
}
Now - I know what you are thinking - why not do the "conditioning" on the arduino? Well I need to be able to reset this value at the end of the day hence the need for system time which is a pain in the butt to pass back to arduino and have it be reliable.
So my thought is to make a bash script that reads the incoming data from the arduino serial stream and "conditions" it as needed and then send the conditioned data to my other application via a dummy serial port. I am pretty much clueless on how to do the virtual serial port part of this whole thing. And my knowledge of bash is also limited so I really appreciate examples. I guess I also have no idea if any of this is possible but I am hoping to find a solution.
Another reason for bash is I will be able to easily also send the conditioned values to a csv for my own use as well.
Thanks in advance!
1431
(11 rep)
Nov 1, 2021, 01:52 AM
1
votes
1
answers
600
views
find where USB 3.0 device attached
I would like to read a serial input ([as for example here][1]) in linux command line but I am not able to find out the attached device (Arduino) path. I can identify the device: # lsusb Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3...
I would like to read a serial input (as for example here ) in linux command line but I am not able to find out the attached device (Arduino) path.
I can identify the device:
# lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM) <- this one
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
but dmesg is showing only this message related
# dmesg | grep usb
[15026545.556311] usb 4-1: new full-speed USB device number 3 using xhci-hcd
[15026545.697929] usb 4-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
what also confuses me, is that lspci is not showing this device:
# lspci
00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
00:03.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
01:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
02:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter
looking through /dev directory:
# ls /dev/
autofs kmsg network_latency ram4 ttyS12
btrfs-control log network_throughput ram5 ttyS13
bus mapper null ram6 ttyS14
console mem port ram7 ttyS15
cpu_dma_latency memory_bandwidth ppp ram8 ttyS2
full mmcblk0 ptmx ram9 ttyS3
fuse mmcblk0boot0 pts random ttyS4
hwrng mmcblk0boot1 ram0 root ttyS5
i2c-0 mmcblk0p1 ram1 rtc0 ttyS6
i2c-1 mmcblk0rpmb ram10 shm ttyS7
i2c-2 mtd0 ram11 snd ttyS8
i2c-3 mtd0ro ram12 spidev0.2 ttyS9
i2c-4 mtd1 ram13 tty ubi_ctrl
i2c-5 mtd1ro ram14 ttyS0 urandom
i2c-6 mtdblock0 ram15 ttyS1 watchdog
i2c-7 mtdblock1 ram2 ttyS10 watchdog0
i2c-8 net ram3 ttyS11 zero
I am able to find out these things:
1. no ttyUSB*/ttyACM* path created
2. the path to the device is /dev/bus/usb/004/003
3. it is USB 3.0 that should use xhci-hcd
There is one more output, that confuses me even more (the iProduct line that says 2(error)):
# lsusb -v -s 004:003
Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x2341 Arduino SA
idProduct 0x0043 Uno R3 (CDC ACM)
bcdDevice 0.01
iManufacturer 1 Arduino (www.arduino.cc)
iProduct 2 (error)
iSerial 220 8553130343135121F1A0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 10.01
CDC ACM:
bmCapabilities 0x06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
Is it a sign that device malfunctions in this environment?
Can you help me to find out, how can I find attached address for this device?
Background info: the system I am running here is TurrisOS (OpenWrt based). Tested also Debian/Mint/Ubuntu/Manjaro and all of these are attaching the USB without any problem (the device itself is not corrupted).
**EDIT**: this is dmesg related output when usbserial drivers installed:
[15707335.904584] usbserial: USB Serial support registered for carelink
[15707335.904622] usbserial: USB Serial support registered for zio
[15707335.904657] usbserial: USB Serial support registered for funsoft
[15707335.904686] usbserial: USB Serial support registered for flashloader
[15707335.904714] usbserial: USB Serial support registered for google
[15707335.904743] usbserial: USB Serial support registered for libtransistor
[15707335.904771] usbserial: USB Serial support registered for vivopay
[15707335.904802] usbserial: USB Serial support registered for moto_modem
[15707335.904832] usbserial: USB Serial support registered for motorola_tetra
[15707335.904863] usbserial: USB Serial support registered for novatel_gps
[15707335.904891] usbserial: USB Serial support registered for hp4x
[15707335.904917] usbserial: USB Serial support registered for suunto
[15707335.904944] usbserial: USB Serial support registered for siemens_mpi
[15707336.867539] usbcore: registered new interface driver ti_usb_3410_5052
[15707336.867582] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[15707336.867611] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
[15721145.188760] usb 4-1: new full-speed USB device number 4 using xhci-hcd
[15721145.330360] usb 4-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
**EDIT 2**:
When I googled around, I found this script which clearly claims, that I need to:
opkg install kmod-usb-acm
in order to attach these devices.
Kube Kubow
(113 rep)
May 25, 2021, 01:14 PM
• Last activity: Jun 1, 2021, 01:17 AM
1
votes
0
answers
218
views
arduino and esp8266 problem
I can't seem to connect my esp8266 d1 mini; can any one help me? This is the error msg I get: ``` Arduino: 1.8.13 (Linux), Board: "LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read m...
I can't seem to connect my esp8266 d1 mini; can any one help me?
This is the error msg I get:
Arduino: 1.8.13 (Linux), Board: "LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, DOUT (compatible), 40MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 231788 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 26777 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1496 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 876 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 25616 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 260937 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27988 bytes (34%) of dynamic memory, leaving 53932 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port /dev/ttyUSB0
Traceback (most recent call last):
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/pyserial/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/upload.py", line 66, in
esptool.main(cmdline)
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool/esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool/esptool.py", line 271, in __init__
self._port = serial.serial_for_url(port)
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/pyserial/serial/__init__.py", line 90, in serial_for_url
instance.open()
File "/home/oem/.arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/pyserial/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
the selected serial port serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
does not exist or your board is not connected
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Dorivogur Svavarsson
(11 rep)
May 28, 2021, 08:57 AM
• Last activity: May 31, 2021, 02:45 AM
0
votes
1
answers
812
views
AttributeError: module 'serial' has no attribute 'to_bytes'
Iam trying to program Arduino Uno using python program. My python version is python 3.8. I successfully installed the pyfirmata2. but when i tried to import pyfirmata2 from command line iam getting the following error. >>> import pyfirmata2 Traceback (most recent call last): File " ", line 1, in Fil...
Iam trying to program Arduino Uno using python program. My python version is python 3.8. I successfully installed the pyfirmata2. but when i tried to import pyfirmata2 from command line iam getting the following error.
>>> import pyfirmata2
Traceback (most recent call last):
File "", line 1, in
File "C:\Python38\lib\site-packages\pyfirmata2\__init__.py", line 2, in
from .pyfirmata2 import * # NOQA
File "C:\Python38\lib\site-packages\pyfirmata2\pyfirmata2.py", line 7, in
import serial.tools.list_ports
File "C:\Python38\lib\site-packages\serial\tools\list_ports.py", line 27, in
from serial.tools.list_ports_windows import *
File "C:\Python38\lib\site-packages\serial\tools\list_ports_windows.py", line 127, in
Ports = serial.to_bytes([80, 111, 114, 116, 115]) # "Ports"
AttributeError: module 'serial' has no attribute 'to_bytes'
vijayakumar sargunam
(11 rep)
Nov 18, 2020, 05:39 AM
• Last activity: Nov 18, 2020, 07:15 PM
5
votes
4
answers
5471
views
How would/do I access/program a remote Arduino through SSH via an intermediate computer?
I have Arduino IDE installed on my laptop and I'd like to program a remote Arduino (Uno) that is connected to a remote machine in the same network, say, for instance, a Raspberry Pi (to which the Arduino Uno would be plugged with the USB cable) connected to my wireless network. What would I need to...
I have Arduino IDE installed on my laptop and I'd like to program a remote Arduino (Uno) that is connected to a remote machine in the same network, say, for instance, a Raspberry Pi (to which the Arduino Uno would be plugged with the USB cable) connected to my wireless network. What would I need to set up to do that?
Note: I don't mean to use the Arduino as a SSH client. What I'd like to do is some kind of tunnelling, preferably SSH, between Arduino IDE on my laptop and the Raspberry PI, to which the Arduino board is connected with the USB cable.
Ideally what would happen when I press the
Upload
button is that the firmware, compiled locally would then be sent to the remote Arduino through the tunnel. Also I would use the serial monitor to remotely connect to the /dev/ttyACM0
device node on the remote Pi.
user86969
Jan 30, 2017, 08:49 PM
• Last activity: May 4, 2020, 10:39 PM
2
votes
0
answers
2736
views
device or resource busy: /dev/ttyUSB0 when not root
I've got an arduino that I use `echo "b" > /dev/ttyUSB0` to send data to it. When this command is run via the `root` user it works correctly. However a normal user gets an error of: ``` echo 'b' > /dev/ttyUSB0 zsh: device or resource busy: /dev/ttyUSB0 ``` How can I give a regular user permission fo...
I've got an arduino that I use
echo "b" > /dev/ttyUSB0
to send data to it. When this command is run via the root
user it works correctly.
However a normal user gets an error of:
echo 'b' > /dev/ttyUSB0
zsh: device or resource busy: /dev/ttyUSB0
How can I give a regular user permission for this?
ls -altr /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Nov 30 22:40 /dev/ttyUSB0
My user is in the dialout
group, so they should have permission.
Chris Stryczynski
(6603 rep)
Nov 30, 2019, 10:43 PM
• Last activity: Nov 30, 2019, 11:01 PM
0
votes
0
answers
110
views
How to enable all users to access arduino card?
I am trying to set up Linux (Debian 9) machines in a computer lab to let users plug in their arduino interface and flash their device with their code. I do not really know about arduino and so on, and my arduino users do not know about linux. I also have never really done things with udev. I am insp...
I am trying to set up Linux (Debian 9) machines in a computer lab to let users plug in their arduino interface and flash their device with their code.
I do not really know about arduino and so on, and my arduino users do not know about linux. I also have never really done things with udev.
I am inspecting the script in the arduino IDE distro. It creates udev rules which I think are aimed at populating /dev with devices when a range of arduino-compatible interfaces are plugged in.
The devices belong to specific user groups and the scripts adds the current user to said groups to make things work. Now, I need all people who use these machines to be able to use arduino, but I do not want to add them all to the groups (this would require changing the ldap config which is out of my realm).
I am tempted to tweak the udev rules in the scripts to set the devices to mode 666 instead of 660.
Is this a reasonable way to achieve what I want ?
(also, if you think letting all users have access is a terrible idea, please say so and explain ; I assume that the arduino card is just a serial-like peripheral so it cannot per se do more harm to the system than a keyboard but I may be wrong)
ysalmon
(361 rep)
Nov 28, 2018, 09:45 PM
0
votes
0
answers
157
views
Can't Flash Image onto Arduino Yun Shield using Uboot or TFTP
_Note:_ This question was originally asked on Arduino Stack exchange, but closed as off-topic because it's an OpenWRT issue. I have a Geeetech Iduino Yun Shield. I accidentally flashed [the wrong firmware image](https://www.arduino.cc/en/Tutorial/YunSysupgrade) (not the sysupgrade) to the board. I t...
_Note:_ This question was originally asked on Arduino Stack exchange, but closed as off-topic because it's an OpenWRT issue.
I have a Geeetech Iduino Yun Shield. I accidentally flashed [the wrong firmware image](https://www.arduino.cc/en/Tutorial/YunSysupgrade) (not the sysupgrade) to the board. I then tried using the [Yun UBoot Reflash](https://www.arduino.cc/en/Tutorial/YunUBootReflash) method. However, when I open the console monitor from the IDE and restart/reboot the board, I do not get the UBoot prompt. I have attempted to run it at least ten times without receiving any console/serial output.
The shield is running on a Leonardo base board.
Is there anything I can do to load the correct firmware onto the shield and get it operational or is it truly bricked? If it's bricked, is it possible to obtain a new Atheros AR9331 module to replace the existing one or should I buy a new Yun?
I have tried to get the shield to do an FTP boot, [as detailed here by Majenko](https://hackingmajenkoblog.wordpress.com/2016/02/24/fixing-the-dragino-yun-board/) . I get to the stage where I get the
dr_boot>
prompt. However, when I type in tftpboot 0x81000000 dragino2-yun-common-v2.0.6-kernel.bin
, I get no feedback; it just sits there indefinitely (unless I interrupt the process). I can't figure out what I'm doing wrong.
_Note:_ [This question, currently unanswered](https://unix.stackexchange.com/questions/60115/booting-over-the-lan-using-uboot?rq=1) may be related; I'm not sure.
Agi Hammerthief
(622 rep)
Oct 17, 2018, 12:09 PM
• Last activity: Oct 17, 2018, 12:18 PM
1
votes
0
answers
438
views
gcc-config: could not run/locate 'avr-gcc-ar'
I'm trying to build an arduino sketch, but it fails with error: > "/usr/bin/avr-gcc-ar" rcs "/tmp/arduino_build_191139/core/core.a" "/tmp/arduino_build_191139/core/wiring_pulse.S.o" gcc-config: error: could not run/locate 'avr-gcc-ar' exit status 1 Error compiling for board Arduino Nano. I'm using G...
I'm trying to build an arduino sketch, but it fails with error:
> "/usr/bin/avr-gcc-ar" rcs "/tmp/arduino_build_191139/core/core.a" "/tmp/arduino_build_191139/core/wiring_pulse.S.o"
gcc-config: error: could not run/locate 'avr-gcc-ar'
exit status 1
Error compiling for board Arduino Nano. I'm using Gentoo with crossdev for avr and Arduino studio to compile.
x86_64-pc-linux-gnu-6.4.0 * Does anybody know how to deal with this error?
gcc-config: error: could not run/locate 'avr-gcc-ar'
exit status 1
Error compiling for board Arduino Nano. I'm using Gentoo with crossdev for avr and Arduino studio to compile.
avr-g++
version is avr-gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
.
gcc-config
:
> avr-6.4.0 *x86_64-pc-linux-gnu-6.4.0 * Does anybody know how to deal with this error?
g4s8
(498 rep)
Mar 12, 2018, 08:44 AM
• Last activity: Sep 18, 2018, 02:16 AM
0
votes
1
answers
1223
views
Binding arduino to static port name
My question is an extension to the one asked [here][1]. The Udev rule seem to be applied properly and i can now distingush my arduinos uniquely from an external script by referring to links files created as `/dev/arduino` and `/dev/arduino2`. The rules in the /etc/udev/rules.d is SUBSYSTEM=="tty", A...
My question is an extension to the one asked here .
The Udev rule seem to be applied properly and i can now distingush my arduinos uniquely from an external script by referring to links files created as
/dev/arduino
and /dev/arduino2
.
The rules in the /etc/udev/rules.d is
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0001", ATTRS{serial}=="OMITTED1", SYMLINK+="arduino1"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0001", ATTRS{serial}=="OMITTED2", SYMLINK+="arduino2"
The issue now is, how can i have those link names display in the arduino IDE.
The Arduino IDE still recognises them as /dev/ttyACMx
. Assigning random ACMx numbers on each assignment.
I would like the arduino IDE show the devices as /dev/arduino1
etc rather than /dev/ttyACMx
. Can this also be handled through a udev file or a unix hack.
I am on Ubuntu 16.04, if that matters.
Thanks.
sherinkapotein
(1 rep)
Jan 26, 2017, 12:05 PM
• Last activity: Mar 28, 2018, 04:38 AM
2
votes
1
answers
854
views
How do I read USB data from a character device
I need to write a "character device" that reads data from an arduino and writes that data to a log file. I have been searching this subject for hours and I have seen a couple of ways to make this work, but they don't use a character device. I know that this can simply be done using cat from usb devi...
I need to write a "character device" that reads data from an arduino and writes that data to a log file. I have been searching this subject for hours and I have seen a couple of ways to make this work, but they don't use a character device.
I know that this can simply be done using cat from usb device but I am doing this for System Programming class and I need to use a character device. The closest thing I have found was a similar assignment done by the last year's students, but they opened and closed
/dev/ttyACM0
file as shown in this answer.
Is there a correct way other than that to do this from a chacacter device file or is that the correct way?
acon__
(21 rep)
Dec 25, 2017, 03:02 PM
• Last activity: Dec 25, 2017, 04:15 PM
Showing page 1 of 20 total questions