Results 1 to 7 of 7

Thread: [RESOLVED] COM Ports working erratically in 2K and XP?

  1. #1

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Resolved [RESOLVED] COM Ports working erratically in 2K and XP?

    Hi, I am in the 'research' phase of a project at work involving sending data strings from a machine over a serial bus and recieving them into COM1 on a target machine. To conduct the simplest of tests, I load up hyperterminal, set everything to 9600, 8 data bits, 1 stop bit, no parity.. and send data. In windows XP, I get roughly 1/4th of every 20 data strings. On my laptop, which is win2K, I get the last 3 characters of every sent string. However, on an old dinosaur win98 laptop, the strings are recieved perfectly. I have screwed with the FIFO buffer settings, max speed, transmission speeds, etc.. but nothing in 2K or XP seems to give me consistent input. Again, 98 works fine, at any speed I select.

    Any suggestions?

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: COM Ports working erratically in 2K and XP?

    It looks to me like there is some kind of buffering issue, compression seems unlikely as you are getting the strings back in readable form. What size strings are you using? On Windows 98 is there a length at which the strings become concatenated?

    It may also be due to a difference in the data link protocols used in Win9x and Win2k+ Is COM1 a USB port with a serial adapter?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: COM Ports working erratically in 2K and XP?

    i have a 7 character heartbeat, and a 15-30 character data string. I'll have to look into that USB using serial adapter thing.. though, I do have some PCI Serial port cards I can try..

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: COM Ports working erratically in 2K and XP?

    The reason I ask is because my dad, who uses serial printers where he works often has problems when he attempts to connect via a USB adapter.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: COM Ports working erratically in 2K and XP?

    The ports in question, are:

    On the XP machine - Standard ATX Style Serial port on the mobo

    On my 2K Laptop - connected via 9 pin ribbon cable to the laptop mobo.

    Internally there could be some data management, but do you (or anyone else know) if say.. in 2k+, it's a low priority thread I could somehow raise priority of? It seems like it just. .. "kicks into recieve mode" a few milliseconds too late.

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: COM Ports working erratically in 2K and XP?

    I showed my dad a printout of this and he said that when the buffer for a COM port becomes full a signal is sent back down the wire to instruct the host to stop sending data. This is especially the case where the computers in question are running different operating systems and/or hardware. Even if the baud wrates are identical, the gap between each data tramission tends to be shorter the faster the PC.

    For this stop signal to be interpreted, you need to ensure that the Flow Control setting in the File->Properties (Configure) are set to "Hardware" at both endpoints in hyper terminal.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: [RESOLVED] COM Ports working erratically in 2K and XP?

    Turns out it's just a problem with Hyperterminal.. works fine in-program.

    Bill
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

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