#114 Serial port redirection - asynchronous read


Hello everybody!

There was problem with serial redirection whith
com-port events in 1.4.1 version - it was needs to
press a key or move mouse or update screen to send
readed from serial port data to terminal-server. (the
problem looks like this one :

I have Metrologic Eclipse barcode-scanner connected to
com port and need to work whith it in terminal session.

My solve this problem :
I added asinc-initiation (like fcntl(*handle, F_SETFL,
FASYNC)) into "serial.c" into serial_create() function :
--<start listing serial.c ( end of serial_create()
585: /* all read and writes should be non blocking */
586: if (fcntl(*handle, F_SETFL, O_NONBLOCK) == -1)
587: perror("fcntl");
589: /* dpl added <<<<<<<<<<<<<<<< start */
590: if (fcntl(*handle, F_SETFL, FASYNC) == -1)
591: perror("fcntl");
592: /* dpl added >>>>>>>>>>>>>>>> end*/
594: pser_inf->read_total_timeout_constant = 5;
596: return STATUS_SUCCESS;
597: }
--<end listing>-------------------------------------------

after that, scanner-created-event starts to process

i did not use cvs version... it may be it is already
present there ?

Best regards. =)


  • Evgeniy

    Evgeniy - 2006-10-02

    Logged In: YES

    Hello everybody!

    I have barcode scaner. Some programms don't work with
    rdesktop. Rdesktop send data as one stream. If I don't
    press any key or move mouse, stream don't end.

    For exam.:

    I do:
    1. scan barcode 4607028751240
    2. move mouse
    3. scan barcode 4607028751240
    4. scan barcode 4607028751240
    5. press key

    Program get streams:
    1. 4607028751240 #13 #10
    2. 4607028751240 #13 #10 4607028751240 #13 #10

    I'm use FASYNC and O_ASYNC flags

    This patch don't work!!! :(

  • Nobody/Anonymous

    Logged In: NO

    sory, i have no access to hardware now.
    are you really did all patches and recompile the programm ?.
    it was all right when i did it.

  • Michael Karpuhin

    I confirm the bug!!
    OS Ubuntu 8.10 rdesktop 1.6.0 + Windows 2003

  • Nobody/Anonymous

    I have this bug with a ski pass and a room keys coder.

    OS Ubuntu 8.10 rdesktop 1.6.0 + Windows 2003

  • Nobody/Anonymous

    I have this bug with a ski pass and a room keys coder.

    OS Ubuntu 8.10 rdesktop 1.6.0 + Windows 2003

  • Infra H.D.C.

    Infra H.D.C. - 2014-01-24

    I have this bug too: after scan, to put barcode to in-RDP-app, one must to do mouse click/move or keypress.

    Topic starter patch doesn't work in 1.8.1: when I scan barcode with in RDP session with opened application program, it causes I/O Error and unexpected terminating of rdesktop process.

    Change FASYNC to O_ASYNC doesn't solve problem too.

    About my system:
    rdesktop from tarball, is not installed, "./configure" and "make" only, not "make install"
    HOST OS: Debian GNU/Linux 7.3 AMD64
    HOST H/W: DELL OptiPlex 760
    Scanner H/W: Motorola Symbol LS9203
    RDP Server: Windows 2008 R2

    Last edit: Infra H.D.C. 2014-01-24

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks