Results 1 to 5 of 5

Thread: Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2008
    Posts
    6

    Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

    Hello,
    This is the first time I've ever used VB.NET. I'm used to VB6. I am trying to create a serial terminal program for my WM6. I have a bluetooth serial adaptor connected to a microcontroller development board. I have created a textbox. When there is a keypress event I use 'serialport.write(e.keychar)' That works fine. I'm having problems with the SerialPort_DataReceived method. There are a few methods that seem to do what I want for receiving:

    serialport.
    read
    readbyte
    readchar
    readline
    readexisting

    I've tried readbyte, readchar, readline and readexisting and they all throw an exception.

    All I want to do is get a single byte from the serial port and place it in txtTerminal (My 'terminal' window).

    The serial connection is via a bluetooth adaptor.

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

    Hi,
    have you tried it in the full framework?
    What is it crashing with?
    What is ReceivedBytesThreshold set to?

    There is an article on using the serial port here
    Last edited by petevick; Mar 1st, 2008 at 04:05 AM.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3
    New Member
    Join Date
    Apr 2009
    Posts
    1

    Re: Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

    Dear Daniel,

    I am trying to do the same with WM6 and VB.NET 2008. So far i didnt have any success at all. Please let me know if you succeeded in having a bidirectional communication between your mobile and the remote bluetooth device using the serial port? If yes, can you share with me your work? This will be a great deal of help as i have been trying and trying for days without having a clue.

    Sincerely,

    MedianIX.

    Quote Originally Posted by DanielTTurner View Post
    Hello,
    This is the first time I've ever used VB.NET. I'm used to VB6. I am trying to create a serial terminal program for my WM6. I have a bluetooth serial adaptor connected to a microcontroller development board. I have created a textbox. When there is a keypress event I use 'serialport.write(e.keychar)' That works fine. I'm having problems with the SerialPort_DataReceived method. There are a few methods that seem to do what I want for receiving:

    serialport.
    read
    readbyte
    readchar
    readline
    readexisting

    I've tried readbyte, readchar, readline and readexisting and they all throw an exception.

    All I want to do is get a single byte from the serial port and place it in txtTerminal (My 'terminal' window).

    The serial connection is via a bluetooth adaptor.

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

    Could you post the exption that you get?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Serial port access in WM6 Standard via SerialPort - TX works fine, RX crashes

    Did you look at the article I pointed at - that contains working code for the serial port.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

Posting Permissions

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



Click Here to Expand Forum to Full Width