Hi there, i'm trying to read/send commands to ardunio 2560, its more like android based question but i dont know where to ask, maybe someone had similar issues.
I connect phone to ardunio via otg cable, phone sees the device but i cannot find any valid file descriptor to use i have several /dev/tty devices but all of them report that read function would block, even when i set serial communication to be nonblocking, baud rates match, and i am supposed to receive a text from ardunio board (it controls a 3d printer)
After connecting phone to board it creates /dev/bus/001/'devnum' node but its not a tty device so i cannot set baudrate etc for this so i tried various tty fds on /dev/ node however they seem not to work at all
I tested if printer is being able to work with other 3rd party software(on phone) and it works i can send commands to printer (i think programs written in java - its called 3d fox) so i think i should be able to find a proper file descriptor and refer to it, so at least i would know that if im referencing to valid fd i have a bug in my application, however i cant use java and im very happy about it so its pure c/c++ app.
I also tried to find devpath in /sys/class node but it seems phone doesnt create any new dev/tty node and doesnt even show devpath at all
dmesg | grep usb returns only this garbage:
[499667.618103s][pid:29191,cpu0,kworker/0:2][USB_DEBUG]hw_is_usb_cable_connected ret is 0 !
[499667.813842s][pid:29191,cpu0,kworker/0:2][USB][hisi_usb_otg_event]event: 2
[499667.894012s][pid:28738,cpu1,kworker/u16:0][usbotg][dwc_otg_core_init]:usb mode Host
[499668.004119s][pid:28738,cpu1,kworker/u16:0][I/smpl] charge_usb_notifier_call 146 receive usb event:5, in_charging:0, valid_event:0
[499668.005676s][pid:28738,cpu1,kworker/u16:0][USB][handle_event]hisi usb_status: OFF -> HOST
[499683.722137s][pid:29191,cpu0,kworker/0:2]usb 1-1: new full-speed USB device number 14 using dwc_otg
[499683.933166s][pid:29191,cpu0,kworker/0:2]usb 1-1: New USB device found, idVendor=1a86, idProduct=7523
[499683.933197s][pid:29191,cpu0,kworker/0:2]usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[499683.933227s][pid:29191,cpu0,kworker/0:2]usb 1-1: Product: USB2.0-Serial
Cheers