Discussion Groups

EP10 Modem port

This question is answered

Hi,

How can I communicate with the modem on EP10 using SerialPort. I am not sure which COM port is assigned to the modem.

Requirement is to send some AT commands to initialize the modem for a data connection. After the data connection is established, I need to listen to the data the modem receives.

Would be great if anyone can shed some light on this.

Thanks

Madhan

Verified Answer
  • Madhan,

    Before you go through my previous post, I'd like to know why you didn't use CreateFile to pen "VDA1:"?

    Regards,

    Maryam

All Replies
  • Madhan,

    As per the below EP10 HDK (Hardware Development Kit) User Manual excerpt, the built WWAN radio can be accessed via COM9:

    This said, have you considered using the Microsotf Connection Manager API for network connections establishment and management?

    Regards,
    Jacques

  • Thanks for the reply Jacques.

    Using .NET (SerialPort.GetPortNames()), I can see COM9, but when I try to open it, an exception is thrown that COM9 does not exist.

    I cannot use Connection Manager API, since this is not a network connection but a data connection made to a data server.

    Regards

    Madhan

  • madhu3n
    this is not a network connection but a data connection made to a data server.

    Which conduit / pipe / carrier are you using then?

  • Madhan,

    For your information, I just brought your query to one of our WWAN experts / Engineers.
    He shall respond / get back to you shortly.

    MfG
    Jacques

  • Thanks Jacques.

    Here is some more explanation about what I want to acheive.

    1. Using the AT Command (ATD), I dial a number and make a connection to a data server (not a Internet Connection) which will stream me GPS realtime corrections.

    2. After the connection is established, the data server will start streaming the GPS corrections to which I have to listen continuously.

    Regards

    Madhan

  • Hello Madhan,

      In this case please try to use the port VDA1: .

      Keep in mind that most European networks support dial-up data only over GSM, not over UMTS. In other works, you may have to disable the UMTS bands for the dial-up data connection to work.

    Regards,

    Rüdiger

  • FYI: as depicted below, RIL logical port names can be found in the device registry [HKEY_LOCAL_MACHINE\Software\Microsoft\RIL]

  • Hi Jacques & Rüdiger,

    When trying to open the port 'VDA1:' using .NET, I got the error message 'The port 'VDA1:' does not exist.'.

    When I used the 'CreateFile' function (P/Invoke) for the Port 'VDA1:', I got the following error message:

    ERROR_DEV_NOT_EXIST - The specified network resource or device is no longer available.

    In the registry key HKEY_LOCAL_MACHINE\Drivers\Active, I found the following entry:

    Fortunately I can open the ports 'VCA1:' and 'VCA2:' in .NET, but when I send the command 'AT', I don't get any response from the modem.

    Regards

    Madhan

  • Hi Madhan,

    Try the following steps:

    -          Use the  RIL-API RIL_Dial() to establish a CSD call (of type RIL_CALLTYPE_DATA).

    -          After the RIL announced that the connection was established {poll e.g. using RIL_GetCallList()}, then (not earlier!) it can open port VDA1:

    -          In order to end the data connection, first close VDA1: and after that, end the call using RIL_Hangup()

    Please note:

    The VDA1: port is only for data connection and you must not send at-commands on this port.

    Also, CSD and a GPRS-PPP-connection cannot be opened in parallel.

    Let me know how it works.

     

    Regards,

    Maryam

  • Hi Maryam,

    I tried the RIL API - RIL_Dial() as you suggested, but I was unable to creat a successful connection. The result of RIL_Dial() was 'RIL_RESULT_NOCARRIER'.

    I also tried TAPI API. There is a .NET wrapper for TAPI from OpenNETCF (OpenNETCF.Telephony).

    Fortuanately with TAPI,  I can establish a data call and as soon I get connected, I can open 'VDA1:'. But the call gets disconnected as soon as I open the port. Is there any workaround that you might know?

    Thanks.

    Regards

    Madhan

  • Hi Madhan,

    I have no idea why RIL_Dial failed to connect but I guess you might have been connected to 3G network. Data_CSD is only available on 2G networks.

    You can force 2G for Data_CSD in the registry as well.

    Change the following registry key to 1(default is 0) and warm reset the device(press and hold BLUE+POWER key)

    [HKEY_LOCAL_MACHINE\Software\Microsoft\RIL\UMTS RA3050]    
        "Force2GforCSD"=dword:1

    It will enable only 2G bands when attempt  for Data_CSD service and enable all default bands after Data_CSD is disconnected.

    Run RIL-Dial and let me know how it works.

     

    Regards,

    Maryam

  • Hi Maryam,

    I have changed the registry key to '1' as you mentioned in the previous post, but still no success. I am getting the same result using RIL_Dial.

    Do you have any sample application which uses RIL API?

    If you want, I can send you the code that I use. It might probably help to find the issue.

    Regards,

    Madhan

  • Hi Madhan,

    Canadian operators do not support Data_CSD, so I cannot test it in Canada. You may contact our help desk. Our local office might be able to test it and of course communicate it with me if needed.

    Also, Would you enable RIL log and send us the ril log?

    Regards,

    Maryam

     

     

  • Hi Maryam,

    As requested, I have sent the source code and the RIL log to the Developer Support.

    In the meanwhile, I have checked the RIL log and found something.

    The 'RIL_Dial' function declaration in MSDN is

    HRESULT RIL_Dial(HRIL hRil, LPCSTR lpszAddress, DWORD dwType, DWORD dwOptions);

    and the P/Invoke for this function in .NET (C#) is

    [DllImport("ril.dll", EntryPoint = "RIL_Dial", SetLastError = true)]

    public static extern int RIL_Dial(IntPtr hRil, string lpszAddress, int dwType, int dwOptions); 

    It seems that the second parameter (lpszAddress) is not marshalled properly. For example if I call the function like

    RIL_Dial(23232, "0121121121",  0x00000002,  0x00000002);

    The RIL log says:

    516747 TID:6d226bc6 RilDrv: Call IOCTL: 12

    516753 TID:8e58fbb2 RilDrv: call RHA_IsRadioPwrOn()

    516758 TID:8e58fbb2 RilDrv: call RHA_IsRadioPwrOn() returned 1

    516763 TID:8e58fbb2 RilDrv: Sending cmd (data port): ATD0i<cr> 

    Only the first character from the dial string is used in the command 'ATD'.

    Any ideas?

    Regards

    Madhan

     

     

  • Dear customer,

    Your request has been logged with service ticket reference 189684.

     One of our Technical Support Analysts will contact you shortly.

    Best regards,

    Cécile - European Helpdesk