I would like to access the hardware serial port (tty*) , not the usb serial port(last resort if not possible), via unity, I have no experience in android development and have barely managed to get a running game in unity.
My game should send and receive data to/from hardware serial port provided by the manufacturer(I can see the connectors provided for usage by software).For hardware protion, assume I have it ready on my end.
I tried building a java warpper,including some .jar file to plugins folder and also edited the manifest and gradle file in unity and some stuff suggested by chatGPT , to the extent I tried android studio to build custom library(jar/aar) for integration with unity, but with no prior knowledge in this domain, I am stuck. I do not wish(and also don't know)to use the usb for serial plugin as it uses a usb-uart adapter, whereas I have two serial ports exposed on android hardware for usage, and one on my hardware.
Please help/guide,provide resource,I am also open to your help in building that uart bridge sort of for my game, any pointers would be greatly be appreciated.
Yeah, figured, it is possible but I lack the expertise, however I found that you need to have su privilages for the app, which is impossible to provide in these devices , they are closed source and very little documentation is available from manufacturer, I even tried adb and all other ways (tried rooting too, but failed misearbly),somehow, accesing the serial port via termux is possible,even tried background terminal process)(too slow for me),
Later I found a plugin called SPUP ,a uart bridge approach(my last resort), but it is smart and can adapt to all platforms without any code changes,which hopefully worked
So the problem is currently solved, but still open to suggestion and alternatives.
Thanks