serial communication with linux kernel device driver that we write

hi sorry bad english but I need to know that issue that I have been seaching for

I want to send data from /dev/my_driver to my arduino.Is there any way to do this?

For example :

echo "hello" > /dev/ttyUSB0

how can I write my own device driver I can send data like this way?

I'm not sure what you mean by "write my own device driver". The device driver is a low level 'application' and is already there for e.g. an Uno.

Without an Arduino connected, run the dmesg command. Next connect the Arduino and run the dmesg command again. At the end you will see if something is picked up; in my case it showed /dev/ttyACM0.

Maybe see Using Serial over USB with Ubuntu (+other linux?). It uses a different approach to determine if a new device was added to /dev.

See the replies in this recent Thread about a similar problem

...R

hi I am asking this again

we are asked a device driver that send data to arduino

I planed to write a virtual usb driver like /dev/ttyUSBx does.in this way I can send data by typing echo "hello" > /dev/myUsbDriver to arduino

but when I tried this Device Drivers, Part 13: Data Transfer to and from USB Devices - Open Source For You and plug in arduino to usb there was no myUsbDriver in /dev folder?

maybe there is a better way I dont know for sending data to arduino via a normal device driver?

This is a question for a linux forum, not Arduino.

herhangibirhesap:
maybe there is a better way I dont know for sending data to arduino via a normal device driver?

Did you take the trouble to read the link that I took the trouble to include in Reply #2

...R