Search Results

Search found 2 results on 1 pages for 'kigurai'.

Page 1/1 | 1 

  • Directly accessing the modem in Windows Mobile

    - by kigurai
    For some reasons I need to be able to access the internal modem of a Windows Mobile smartphone (a HTC s740 with WM version 6.1). What I want is to be able to access it like it was a serial port in order to give AT-commands. I have code that uses the TAPI Line interface and lineGetID() to get a "handle" on which I shuld be able to do ReadFile()/WriteFile(). Sadly I have not gotten it to work. What I do currently is: Initialize TAPI with lineInitializeEx() Open the Line with lineOpen() Iterate through each available device and get info. Currently I am selecting the "UNIMODEM"/"Hayes compatible on COM1" device. But maybe I should choose the "TAPI cellular service"/"Cellular Line" instead? I have tried the "Cellular Line" device with the same result. Use lineGetID() on the selected device to get a handle. Do WriteFile("AT\r") and then directly do a ReadFile(), which should give me a "OK" back if it really was the modem I accessed. Realize that it doesn't work and get annoyed... But this has so far been a no-go. Does anyone have any idea on how to do it? I am doing this in Native WIN32 C++ on Windows Mobile 6 SDK. UPDATE: I have so far managed to get a data connection between two phones using RIL, which gives me a serial port handle to write and read from. BUT, I still would like to be able to interact directly with the modem to send AT-commands. So, the bounty I am starting only concerns getting direct access to the modem in order to give AT-commands. My investigations so far indicates that this was possible in previous versions of Windows Mobile (by opening COM2 and/or COM9 and slaying RIL, or something like that) but I have not yet seen code which works on WM6.

    Read the article

  • Fake serial communication under Linux

    - by kigurai
    I have an application where I want to simulate the connection between a device and a "modem". The device will be connected to a serial port and will talk to the software modem through that. For testing purposes I want to be able to use a mock software device to test send and receive data. Example Python code device = Device() modem = Modem() device.connect(modem) device.write("Hello") modem_reply = device.read() Now, in my final app I will just pass /dev/ttyS1 or COM1 or whatever for the application to use. But how can I do this in software? I am running Linux and application is written in Python. I have tried making a FIFO (mkfifo ~/my_fifo) and that does work, but then I'll need one FIFO for writing and one for reading. What I want is to open ~/my_fake_serial_port and read and write to that. I have also lpayed with the ptymodule, but can't get that to work either. I can get a master and slave file descriptor from pty.openpty() but trying to read or write to them only causes IOError Bad File Descriptor error message.

    Read the article

1