For some reason, I need to have access to the internal modem of a Windows Mobile smartphone (HTC s740 with WM version 6.1). I want to have access to it, as it was a serial port, to give AT commands.
I have code that uses the TAPI Line and lineGetID () interface to get a "handle" on which I could do ReadFile () / WriteFile (). Unfortunately, I did not get a job.
I am currently doing the following:
Initialize TAPI with lineInitializeEx ()
Open a line with lineOpen ()
Iterate through every available device and get information. I am currently selecting a "UNIMODEM" / "Hayes compatible with COM1" device. But maybe I should choose “TAPI cellular service” / “Cell line”? I tried the Cell Line device with the same result.
Use the lineGetID () method on the selected device to get the handle.
Make WriteFile ("AT \ r"), and then directly do ReadFile (), which should give me "OK" if it really was access to the modem.
Understand that this does not work and is annoying ...
But so far it has been bad.
Does anyone know how to do this?
I do this in Native WIN32 C ++ on the SDK for Windows Mobile 6.
UPDATE:
, RIL, . , AT-. , , , , AT-. , Windows Mobile ( COM2 / COM9 RIL, - ), , WM6.