×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    1,733

    PPC, eVB & NCP 2.0 - CommPort

    Posted by Henrik Danielsson, henrik.danielsson@exsero.se
    on April 26, 2002 at 12:20



    Hi folks!
    I'm developing an app using NCP2.0 and eVB. Right now I can send AT commands, but I cannot get any response. I've seen in earlier threads that you should make assignmant as CommPort = "COM4:", but I cannot do that because CommPort must be assigned an integer. Can please anyone who solved this problem give me an answer.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    1,733

    RE: PPC, eVB & NCP 2.0 - CommPort

    Posted by Todd Main, todd_main@hotmail.com
    on April 28, 2002 at 06:32

    Yes, just use YourMSComm32Object.CommPort = 4

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Posts
    1,733

    RE: PPC, eVB & NCP 2.0 - CommPort

    Posted by Todd Main, todd_main@hotmail.com
    on April 30, 2002 at 19:11



    Try something like this:
    With mscomNokiaPhone
    .InputLen = 0
    .InputMode = comInputModeText
    .Settings = "9600,N,8,1"
    .CommPort = 4
    .PortOpen = True
    .Output = "AT" & vbCrLf
    Do
    DoEvents
    Loop Until .InBufferCount >= 2
    .Output = "AT+CMGF=1" & vbCrLf
    Do
    DoEvents
    Loop Until .InBufferCount >= 2
    .Output = "AT+CSCA=" & Chr(34) & txtMsgCenter.Text & Chr(34) & vbCrLf
    Do
    DoEvents
    Loop Until .InBufferCount >= 2

    .Output = "AT+CMGS=" & Chr(34) & cmbSendTo.Text & Chr(34) & vbCrLf
    Do
    DoEvents
    Loop Until .InBufferCount >= 2

    .Output = txtMsg.Text & Chr$(26) & vbCrLf
    End With

    'Where:
    'mscomNokiaPhone = you MSComm32 control
    'txtMsgCenter.Text = your services message center number
    'cmbSendTo.Text = the number you want to send to
    'txtMsg.Text = the text you want to send

    Be sure to close down the com port with .PortOpen = False when you need to close it down

    Note to leave the waiting for your "OK" via:
    Do
    DoEvents
    Loop Until .InBufferCount >= 2
    Because .Output doesn't work properly with the MSComm32 control.

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×