Sample Header Ad - 728x90

How do I read USB data from a character device

2 votes
1 answer
854 views
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?
Asked by acon__ (21 rep)
Dec 25, 2017, 03:02 PM
Last activity: Dec 25, 2017, 04:15 PM