Apps Communicate with exterior device physically connected to android phone



I have a project where it is required of me to replicate a Desktop application into an easy to use mobile application.

The application I want to create needs to communicate with an external device that monitors data like temperature and humidity. This monitored data will also be plotted on a graph in the android application (basically a two-way real time data sharing via wire). There's also configuration files that need to be uploaded into that device from the android application.

I would like to know if doing such a thing is possible. The communication has to be via wire. Wireless connections are not an option.

If someone could direct me via an API that handles such tasks or a small tutorial it would be amazing!

Thank you.