is it possible to connect com port ?
Try using a function such as [man]fopen/man with a path of "COM1" or "COM1:" (replacing the "1" with whichever COM port you want, obviously).