How can I use AT-Commands?

Discussion in 'Questions (Windows Mobile)' started by blackwinged, Sep 7, 2007.

  1. blackwinged

    blackwinged Member

    How can I use AT-Commands (like getting current gsm provider etc) with basic4ppc? Do I have to use the serial commands?
    Does anybody have an example or a usefull libraray that can :sign0085:?
  2. Erel

    Erel Administrator Staff Member Licensed User

    Do you have a modem connected to your device?
    You can use the Serial library to send AT commands (send it like a regular string).
  3. blackwinged

    blackwinged Member

    Nope, I want to send the commands to the gsm device of my HTC Prophet. Do I have to use serial communication however it is not an external device?
    Btw, any idea which COM-port, baud rate etc I have to use?
  4. Erel

    Erel Administrator Staff Member Licensed User

    Assuming that the internal modem exposes a virtual port you could use the serial library to communicate with it.
    If the port is described in the registry, you can use the code from this post to find it:

    What are you trying to achieve? Maybe there is a simpler way to do it.
  5. blackwinged

    blackwinged Member

    First of all, thanks a lot for your help!
    I´m trying to get the current CellID of my mobile. With this information (and maybe some more) I´ll try to calculate the current position. This is of course not exact, but at least in cities the tolerance is only ~50m.
    So I could 'emulate' a GPS device or build a simple location based service... there are many possibilities ; )
    I already used the program you mentioned, but it only displays that COM1 is my Communication port (well, ASync I guess) and COM4 is my Infrared Port. 0,2,3 and 9 are displayed but without a description.
    I´m currently playing around with serial commands, but the port does not seem to open or send any information...
    I´ll try different ports and baud-rates now, maybe I get it working.

    EDIT: Hey, sometimes the port opens. And immediately after that, the program crashes (including b4ppc)...
    Last edited: Sep 7, 2007
  6. dzt

    dzt Active Member Licensed User


    I think that there is not a virtual com port for a windows mobile (phone) targeting the GSM module.
    So, can't send directly AT commands.

    It should ne some other way to read relative info.
  7. blackwinged

    blackwinged Member

    So...when I connect from a windows machine to my mobile I should be able to send the commands (should - didn´t work for me either). At least I read so. But I can´t do this from the device itself? I don´t hope so...
  8. blackwinged

    blackwinged Member

    I found a dll on an older website that makes it possible to get the cell information I need.
    its here
    I manage creating an object from the file MDAGetCellDll.dll, but it doesn´t return the information I need.
    Now I´m quite new to basic programming languages - in case that anyone has tried (or is going to try) this with success, please tell me.

    I found that many ppl are looking for a solution to get cell ids, so this would be very helpful.
  9. Erel

    Erel Administrator Staff Member Licensed User

    I haven't tried it, but you should try to put the native dll mdaatcom.dll in basic4ppc folder: \Program Files\Basic4ppc
  10. blackwinged

    blackwinged Member

    I just don´t get any results... Only empty Strings are returned from the functions.
  11. Erel

    Erel Administrator Staff Member Licensed User

    Maybe this dll does not work properly.
    Did you try to run his example (cab file)?
  12. dzt

    dzt Active Member Licensed User


    These DLLs doesn't work neither for me but...

    I found this idea interesting, so I searched a little bit more and I developed a little DLL (attached among with b4ppc sample).

    You sould also download RilWrapper.DLL from here

    Put in your device RilWrapper.DLL, dzRil.DLL, test1.exe and test1.exe.config (yes, needed .NET CF 2.0)

    Some more info here

    Because it seems that RIL (Radio Interface Layer) doesn't work in the same way in every Windows Mobile Phone Edition device, I would be thankful for every working or not working report.

    Attached Files:

  13. Roadrunner

    Roadrunner Member Licensed User

    Works great on a HTC Kaiser!
  14. tuktak

    tuktak New Member

    PDA get cell infos

    I'm a beginner in phone application, I work with c# and I would like to get some GSM informationd (cellid...) I tried with dlls mdagetcell.dll and mdaat.dll.
    but I had only empty strings in result. I have an ipaq 6915
    Please help me.:sign0085:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice