Strange serial communication problem on COM2

  • In an application I'm working on, I'm using serial communication on COM2, 9600-N81. If I build my application (using VS2008) and copy the executable to the PicoCom and run it, communication works as expected. I have a timer running (interval around 100 millisec) and every time the timer triggers I have around 10 bytes to process. But if I close the program and then run it again, SerialPort.BytesToRead returns 2047 every time regardless of what I do. I can read bytes, discard the buffer, disconnect the hardware sending the data: I keep getting 2047 bytes. Looks like the UART or the Windows serial driver has gone a bit wild.


    Please note


    1) I close the port on program exit
    2) I discard any data in the input buffer when opening the port
    3) I need to use a timer and not the Windows CE event driven model (the latter doesn't work well)


    So, in short: comms work, I close program and run it again, comms doesn't work
    What could possibly be wrong?

  • I moved this thread to the Windows Embedded section of the forum as these are apparently no Linux problems.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    we already recognized this problem and working on it.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Quote from "dhovden"

    Posted in "Board index » Windows Embedded » PicoCOM » picoCOMA5", not Linux
    So why move it?


    That's where I have moved it to. The original posting was under the Linux section.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    attached the driver which resolves the "open/close" issue. It will be included into the next kernel release.

    Files

    • fs_serial.zip

      (18.15 kB, downloaded 406 times, last: )

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Copy Driver to \ffsdisk and chanche register from HKLM\...\DLL=<drivername> to DLL=\ffsdisk\<drivername>.
    For COM2: registering is no problem - you should see the new version in the boot Output.


    PS: you can not overwrite files from ROM.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,

    Code
    1. Does the latest CE6 kernel, 140414, include thus updated serial driver? Or do I have to update manually

    Yes, version should be "UART: Version 1.9". We last modify the driver at 140402. Do you have still problems?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.