'분류 전체보기'에 해당되는 글 56건

  1. 2009.05.03 에버랜드 웨딩? ㅎ
  2. 2009.04.21 HSDPA 연결은 RAS?? Connection Manager??
  3. 2009.04.20 Starting a RAS Connection
  4. 2009.04.20 Getting Started with PPP, RAS, and serial modem
  5. 2009.04.20 Windows Mobile용 삼성전자 SDK
2009. 5. 3. 12:10

에버랜드 웨딩? ㅎ

2009. 4. 21. 13:09

HSDPA 연결은 RAS?? Connection Manager??


2G망 (CDMA)은 한 회선으로 음성 및 네트워크가 이루어진단다.

3G망 (WCDMA)은 음성과 네트워크가 다른 회선으로 이루어진단다.

그런데 RAS는 음성 회선을 이용하게 되므로 CDMA에서 하는거랑 차이가 없단다.

WCDMA에서 말하는 HSDPA는 고속으로 데이터를 처리하기 위한 통신 방식으로 음성과 분리되어 있단다.

따라서 이 놈을 이용할 때는 CM (Connection Manager)를 이용해야 한단다.

MSDN과 커뮤니티를 통해 좀 더 찾아봐야 할듯.. ㅎ


MSDN Library
- http://msdn.microsoft.com/en-us/library/ms879581.aspx



<13:40 추가>

CONNMGR_CONNECTIONINFO pConnInfo; //Connect Manager 구조체
ZeroMemory(&pConnInfo, sizeof(CONNMGR_CONNECTIONINFO));//구조체 초기화
pConnInfo.cbSize = sizeof(CONNMGR_CONNECTIONINFO); //구조체 사이즈
pConnInfo.dwParams = CONNMGR_PARAM_GUIDDESTNET;
pConnInfo.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;

pConnInfo.dwFlags = 0;

pConnInfo.bExclusive = false;
pConnInfo.bDisabled = false;
pConnInfo.guidDestNet = IID_DestNetInternet;

pConnInfo.hWnd = NULL;

pConnInfo.lParam = (LPARAM)0;
HANDLE hConnection = NULL;

DWORD status = CONNMGR_STATUS_CONNECTED;
HRESULT hr = ConnMgrEstablishConnectionSync(&pConnInfo, &hConnection,15000, &status);
if (hr != S_OK)
{
     AfxMessageBox(_T("전화접속에 실패 하였습니다."));
}



<13:50 추가>
http://www.codeproject.com/KB/mobile/ConnectionManager.aspx?display=Print

2009. 4. 20. 14:39

Starting a RAS Connection

 

The RasDial function indicates a successful connection in two ways. If RasDial make a successful connection:

  • It returns a zero. A nonzero value indicates failure.
  • The function stores a handle to the RAS connection in the variable pointed to by the function parameter pRasConn.

The RasDial function must specify data so that RAS can establish the connection from a Windows CE–based device to a remote access server. The client uses the RasDial function parameters to specify a phone-book entry. The lpszPhonebookPath parameter must be NULL. The lpRasDialParams parameter points to a RASDIALPARAMS structure that specifies the phone-book entry to use. To connect, the RasDial function must specify the data necessary to establish a connection. Typically, the RasDial call provides the connection data by specifying a phone-book entry using the RASDIALPARAMS structure to provide data such as a phone number, user name, domain, and password.

Instead of having the user supply credential information before RasDial is called, you can also set the RASEO_PreviewUserPw option bit in the RASENTRY structure. Setting this option bit causes a username and password dialog box to be displayed to the user before dialing occurs.

The connection data includes callback and user authentication data. To make a connection, the RasDial function can specify an empty string for the szEntryName member of the RASDIALPARAMS structure. This will result in the first available modem being used. The szPhoneNumber member must contain the phone number to dial.

To use RasDial to establish a connection

  1. Set the dialExtensions parameter to NULL.
  2. Set the lpszPhonebook parameter to NULL. Phone-book entries are stored in the registry rather than in a phone-book file.
  3. Set the dwNotiferType parameter to 0xFFFFFFFF, specifying the lpvNotifier parameter as a handle to the window receiving progress notification messages. If the application requires messages from RAS, the messages must be sent to a window handle. There is no support for callback functions.
  4. If you have not set the RASEO_PreviewUserPw option bit in the RASENTRY structure, which presents the user with a username and password dialog box before dialing, set the szEntryName, szUserName, szPassword, and szDomain members of the RASDIALPARAM structure. Pass a pointer to this structure into lpRasDialParam.

RAS Connection Example

The following code example shows how to establish a RAS connection.

BOOL MakeRasDial (HWND hDlgWnd)
{
  BOOL bPassword;
  TCHAR szBuffer[100];

  if (bUseCurrent)
  {
    // Get the last configuration parameters used for this connection. 
    // If the password was saved, then the logon dialog box will not be
    // displayed.
    if (RasGetEntryDialParams (NULL, &RasDialParams, &bPassword) != 0)
    {
      MessageBox (hDlgWnd, 
                  TEXT("Could not get parameter details"), 
                  szTitle, 
                  MB_OK);
      return FALSE;
    }
  }
  else
  {
    // Display the Authentication dialog box.
    DialogBox (hInst, MAKEINTRESOURCE(IDD_AUTHDLG), hDlgWnd, 
               AuthDlgProc);

    // Set hRasConn to NULL before attempting to connect.
    hRasConn = NULL;

    // Initialize the structure.
    memset (&RasDialParams, 0, sizeof (RASDIALPARAMS));

    // Configure the RASDIALPARAMS structure. 
    RasDialParams.dwSize = sizeof (RASDIALPARAMS);
    RasDialParams.szPhoneNumber[0] = TEXT('\0');
    RasDialParams.szCallbackNumber[0] = TEXT('\0');
    wcscpy (RasDialParams.szEntryName, szRasEntryName);
    wcscpy (RasDialParams.szUserName, szUserName); //This is optional    wcscpy (RasDialParams.szPassword, szPassword); //This is optional
    wcscpy (RasDialParams.szDomain, szDomain); //This is optional
  }

  // Try to establish RAS connection.
  if (RasDial (NULL,            // Extension not supported
               NULL,            // Phone book is in registry
               &RasDialParams,  // RAS configuration for connection
               0xFFFFFFFF,      // Notifier type is a window handle
               hDlgWnd,         // Window receives notification message
               &hRasConn) != 0) // Connection handle
  {
    MessageBox (hDlgWnd, 
                TEXT("Could not connect using RAS"), 
                szTitle, 
                MB_OK);
    return FALSE;
  }

  wsprintf (szBuffer, TEXT("Dialing %s..."), szRasEntryName);

  // Set the Dialing dialog box window name to szBuffer.
  SetWindowText (hDlgWnd, szBuffer);

  return TRUE;
}
2009. 4. 20. 13:44

Getting Started with PPP, RAS, and serial modem


MSDN forum을 뒤지던중.. 좋은 질문&답변 발견

내가 하고 싶던 질문이야..

Where can I find information on using PPP. RAS, and a serial modem to do FTP? I'm prototyping using Windows CE 5.0, but I think the target system will run Windows CE 6.0. Things I have not yet been able to figure out:

  • How to tell Windows CE to use a serial modem on a particular COM port
  • How to FTP a file after a successful RAS connection


PPP, RAS와 serial modem을 사용하여 FTP를 사용하는 방법? 
이라는 질문이구만..

이에 대한 답변은..


If you're a C/C++ developer then you don’t need to P/Invoke (which is a way to call into the OS for .Net developers).

Just use RAS API - which RasDial() is part of. There are method to create connection - RasSetEntryProperties(), then you can use RasDial() on it. It would dial out and establish PPP connection and you just get TCP/IP working on your device.

It is possible your CE device has no RAS API though - in which case you probably won't be able to use it.

Here's RAS API: http://msdn.microsoft.com/en-us/library/ms897066.aspx

For FTP you can use WinInet API: http://msdn.microsoft.com/en-us/library/aa451973.aspx

Again, it’s optional, might not be available on your device. You can fall back to sockets. There are no FTP sockets, just sockets.  Once you have socket opened to the server you can transmit and receive data through it as FTP protocol specifies. You can find description on the web, just search for “RFC FTP”.

Platform SDK is for desktop only, BTW, does not work for CE. You would need to obtain SDK for your CE device from device manufacturer.

Also you probably know that but just in case: you would need special compilers as well, desktop compilers won’t work in CE. You can use VS 2005 SE or above or VS 2008 Pro or above to develop for CE.

만약에 C/C++ 개발자는 P/Invoke를 신경쓰지 않아도 된단다. 그리고 RAS API만을 사용하면 된다고 한다. RasDial()이 있고. 연결을 성립하기 위한 RasSetEntryProperties()의 메서드를 가지고 있고 이어 RasDial()을 사용한다고 한다. 메서드는 연결을 위한 정보같은걸 가지고 있는건가? 그리고.. 연결.. 머 이런식인가보네.. ㅋ PPP 연결을 확립한 이후에 TCP/IP 를 디바이스에서 수행할수 있다고 하네

그리고.. RAS API에 대한 설명과.. 주요한건 FTP 서비스를 제공하는 API가 있다는 것이다. Internet Client Service에 보니까 HTTP와 FTP를 제공한다는군.

추가적인 기능으로 디바이스에서 사용할 수 있으며 소켓으로 fall back할 수 있다고 한다. FTP 소켓이 아닌 그냥 소켓. 한 번 소켓을 서버로 열면 데이터를 FTP 프로토콜 스펙으로 전송, 수신할 수 있다고 한다. 이러한 것은 RFP FTP에서 볼 수 있다고.

좋은 정보구만 ㅎ

원문 : http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/f9001457-cbfe-4fb9-a59e-454060c746dd/

2009. 4. 20. 08:59

Windows Mobile용 삼성전자 SDK


요즘 T옴니아로 인기를 끌고 있는 삼성전자가 드디어 개발자를 위해 Samsung Mobile Innovator 웹 사이트에서 드디어 Windows Mobile용 삼성전자 확장 SDK를 발표했네요!!

처음에는 북유럽을 위한 심비안 S60 으로 부터 시작하여 어제에 드디어 Windows Mobile용 삼성전자 SDK가 발표가 되었습니다. 이 삼성전자 Windows Mobile 용 확장 SDK는 멤버쉽 등록을 해야 하는데, 멤버쉽은 무료로 가입할 수 있습니다. 설치하고 나면 몇 가지 재미나는 내용들이 있는데 한번 살펴 보도록 하겠습니다.

image_3

우선 먼저 눈에 뛰는 것은 일반 초보 개발자들을 위해 Getting Started 으로 Hello, World 자습서가 나와 있네요. 비록 영어로 된 문서이지만 한 번 따라 해 보시면 될 것 같습니다. 위와 같이 따라 해 보기 위해서는 Visual Studio 2008 Professional Edition 이상 되는 버전과 무료로 공개되는 Windows Mobile 6 SDK가 필요합니다. 설치 순서는 “처음으로 T옴니아폰 응용프로그램을 개발하려면” 이라는 기사를 참고하시기 바랍니다.

삼성전자의 Windows Mobile 용 확장 SDK의 주요 특징으로는 자이로 센서라고 부르는 액셀러메이터(Accelerometer)와, LED 표시 그리고 햅틱 등을 사용할 수 있도록 개발자들에게 API를 제공합니다.

더욱이 옴니아는 다른 윈도우 폰과 같이 달리 480 * 800의 화면 크기를 가지고 있습니다. 그렇다 보니 다른 에뮬레이터에서 사용할 때 화면 크기가 달리 불편 했었습니다. 그래서 T옴니아 SW경진대회 때에도 옴니아와 비슷한 크기의 6.1.4 이미지를 권장했으나 이제부터 옴니아 전용 에뮬레이터를 사용하면 될 것 같습니다. 

Lab.dev 이라는 가상 장치 랩을 모바일 이노베이션 랩에 준비해서 옴니아 장치가 없어도 웹에서 접속해서 여러분의 애플리케이션을 설치하고 테스트 해 볼 수 있는 환경을 제공 해 줍니다. 또한 개발자 기술 지원 및 커뮤니티를 위해 Windows Mobile Discussion Board 를 마련해 놓고 있으며 누구든지 글을 올리거나 답변할 수 있습니다.

삼성전자 장치 에뮬레이터의 스킨은 옴니아 폰 뿐만 아니라 블랙잭II, Epix/Mirage, Robin, Saga, ACE 및 Omni 등이 더 포함되어 있습니다. 고객의 여러 가지 피드백을 위해 Knowlege Base 도 개발 되었으니 참조해 주시기 바랍니다.

삼성 모바일 이노베이터의 WiKi 서비스를 통한 디지털 마케팅을 위해 Samsung Device Database 를 서비스하며, Samsung Windows Mobile SDK 문서도 공개해 놓았습니다. 이로서 애플리케이션 개발자들은 삼성전자가 개발한 윈도우 모바일 기반 스마트폰 애플리케이션을 쉽고 빠르게 개발할 수 있도록 지원해 줍니다.