Big Picture: I've attached an arduino uno to an android phone via the micro-usb connection on the phone. My goal is to SSH into the phone over its network or internet connection and then run commands from terminal such as this:
echo -n "h" > /dev/ttyACM0
where h is the character actually sent to the arduino and /dev/ttyACM0 is the hypothetical arduino device as it appears in the linux /dev folder.
Unfortunately i'm stuck and i'm wondering if it's because i need a rooted device in order for this to work.
What I've succeeded in doing so far:
-I successfully sent commands to the arduino uno as above (echo -n "h" > /dev/ttyACM0) using a desktop ubuntu 14.04 linux machine
-I can successfully SSH into the android phone via Putty on a windows computer, while also using the SSHDroid host app from google play on the phone itself. but I cannot access the /dev folder...well, I've looked around using an app that claimed it could show all root accessible files and folders (smart kit 360 on google play) and there were no tty items in the /dev folder. I got an app called "list usb devices" and it gave some other path for the device that was /sys ...but it said i didn't have permission to access that.
-I can successfully send individual character commands from the phone to the arduino uno using another google play app called "DroidTerm" ...similar to the old windows hyperterminal program.
So I've verified that all the individual pieces of this puzzle should work each in a particular context. However, when I try to SSH into the phone and then run the command "echo -n "h" > /dev/ttyACM0" it throws an error regarding permissions, though I'm surprised it didn't throw an error regarding the existence of /dev/ttyACM0, given the missing tty files i mentioned earlier..I was hoping they were just hidden (if this is the device name "file" on one linux machine, will it be the same on a different linux machine (since android is technically linux?)? I was hoping it would be.
Ideas, known solutions, and alternatives are very welcome!
Alternatives I've tried instead of SSH:
remote control the android device with rc software and control the app droidterm.
I tried that, and it's quite expensive in terms of bandwidth (i don't need to send the whole screen constantly), doesn't allow multi-tasking applications on the phone which i need (yes, I know that android nougat supports multi-tasking but my phone is old and won't load it without serious intervention at the level of rooting that I'd rather not do), and has several other issues that will be problematic.