none
How to specify that Cellular device is a unimodem device RRS feed

  • Question

  • I have a GSM modem connected to an Embedded Compact 7 based platform and am trying to make a GPRS connection via RAS/Cellcore. I am using the RASENTRY sample from

    \WINCE700\PUBLIC\COMMON\OAK\DRIVERS\NETSAMP\RASENTRY

    and am firstly trying to find the device ID of the cellular device.  Here is the specific bit of code that checks for the device name and that its a unimodem device and returns the correct id. In my case szDeviceName is "Cellular Line" which I think is what I am looking for.

            //
            // Compare the TAPI device's line name.
            //
           
            if (!_tcscmp((LPTSTR) ((char *)lpDevCaps + lpDevCaps->dwLineNameOffset), szDeviceName)) {            //
                // It's a match. Now see if it's a unimodem device
                //
                if (pfUnimodem) {
                    *pfUnimodem = FALSE;
                    if (lpDevCaps->dwProviderInfoSize) {
                        lpszTSP = (LPTSTR)((DWORD)lpDevCaps + lpDevCaps->dwProviderInfoOffset);
                        LogDebugData(LOG_DETAIL, TEXT(_FILENAM) TEXT(" - FindDeviceID - TSP for %d is %s"), dwDeviceID, lpszTSP);
                        if (!_tcscmp(lpszTSP, TEXT("UNIMODEM"))) {
                            *pfUnimodem = TRUE;
                        }
                    }
                }
                lineShutdown(hLineApp);
                LocalFree(lpDevCaps);
                return dwDeviceID;
            }

        }   // for dwDeviceID


    First of all I find that there are three devices. The first device has a line name of "Cellular Line" which I believe is the one I am looking for. However the providor Info is "Cellular TAPI Service Provider" and not "unimodem" as expected. The other two are the serial comms ports COM1 and COM2 and are specified in platform.reg.

    After investigating this I was expecting that device name for the Cellular device should be specified in a registry entry somewhere, something like:

    [HKEY_LOCAL_MACHINE\ExtModems\CompanyX-Modem]
        "Port"="COM1:"
        "DeviceType"=dword:1
        "FriendlyName"="CompanyX External Modem"
    [HKEY_LOCAL_MACHINE\ExtModems\CompanyX-Modem\Init]
    [HKEY_LOCAL_MACHINE\ExtModems\CompanyX-Modem\Settings]

    and that I would have to change it to suit my configuration. However I cannot find such an entry anyehere so where are "Cellular Line" and "Cellular TAPI Service Provider" coming from and do I need to change or add something to the platform to specify that my modem is a unimodem device.

    Thanks,

    Bruno


    Thursday, October 25, 2012 11:59 AM

Answers

  • Vinoth,

    Thanks for the reply. I have misunderstood this how this works and, based on the documentation, thought the Cellular modem is a unimodem device. Hence my question.

    Bruno

    • Marked as answer by BDP42 Tuesday, October 30, 2012 9:23 AM
    Tuesday, October 30, 2012 9:23 AM

All replies

  • Keep in Mind that RAS Entry application is the sample given only for UNIMODEM. To get the Device ID for cellular line you have to compare the "Cellular TAPI Service Provider", Instead of Unimodem. As shown below.

      if (lpDevCaps->dwProviderInfoSize) {
                        lpszTSP = (LPTSTR)((DWORD)lpDevCaps + lpDevCaps->dwProviderInfoOffset);
                        LogDebugData(LOG_DETAIL, TEXT(_FILENAM) TEXT(" - FindDeviceID - TSP for %d is %s"), dwDeviceID, lpszTSP);
                        NKDbgPrintfW(L" - FindDeviceID - TSP for %d is %s\r\n", dwDeviceID,WCtoC((WCHAR*)lpszTSP));
                        if (!_tcscmp(lpszTSP, TEXT("Cellular TAPI Service Provider"))) {

    To answer to this Question - However I cannot find such an entry anyehere so where are "Cellular Line" and "Cellular TAPI Service Provider" coming from

    This should be define somewhere in celltsp. dll  or their related registries. check the (_WINCEROOT)\PUBLIC\CELLCORE\OAK\FILES\cellore.reg you can find the name "Cellular TAPI Service Provider". But not sure that they are taking the name from here because This option is given to TSPI developers.

    For Unimodem, This is hardcode as follows.

    static const WCHAR szProviderName[] = TEXT("UNIMODEM");

    you can find this in the (_WINCEROOT)\PRIVATE\WINCEOS\COMM\TAPI\UNIMODEM\TSPI.c

    you can't change these names. you have to use "Cellular TAPI Service Provider" to select the device ID. I think i gave the other stubs in the below thread

    http://social.msdn.microsoft.com/Forums/en-US/winembplatdev/thread/35eab194-eaab-480b-80f9-d763b58df704/#c3be8d73-918f-4718-a38d-5242082172bc


    Vinoth.R www.e-consystems.com http://vinoth-vinothblog.blogspot.com

    Friday, October 26, 2012 4:37 PM
  • Vinoth,

    Thanks for the reply. I have misunderstood this how this works and, based on the documentation, thought the Cellular modem is a unimodem device. Hence my question.

    Bruno

    • Marked as answer by BDP42 Tuesday, October 30, 2012 9:23 AM
    Tuesday, October 30, 2012 9:23 AM