Results 1 to 5 of 5

Thread: Serial port Communication, for mifare card read/write

  1. #1
    Join Date
    May 2010
    Location
    Bangalore, India.
    Posts
    28
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Serial port Communication, for mifare card read/write

    Hi

    I need to write the code for getting the mifare card data/number where the card reader is connected to serial port. (linux, qt)
    how to connect/ initialize the connection to the serial port. how the serial communication works in qt? i din't get any class for serial communication in qt.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Serial port Communication, for mifare card read/write


  3. #3
    Join Date
    May 2010
    Location
    Bangalore, India.
    Posts
    28
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Serial port Communication, for mifare card read/write

    Thanks, I have downloaded the cvs -z3 -dserver:anonymous@qextserialport.cvs.sourceforge.ne t:/cvsroot/qextserialport co -P q4extserialport as i am using Qt v 4.6.1, i am able to build the code.. & when i run it tells the one port opened. but i am not able to write to the port. i just inserted the code.. for writing
    if( sp1.open() )
    {
    qDebug("+++ Opened first");
    /* */
    char data[] = { 0x00, 0x7F, 0x80, 0xFF };
    if( sp1.write( data, 4 ) == 4 )
    {
    qDebug("+++ Transmitted");
    ....
    ...}
    the control is not going inside the if( sp1.write( data, 4 ) == 4 ), & i am getting sp1.write( data, 4 ) = 0.
    what could be problem.. & how to use this project for actual my project where i will be connecting a mifare card reader to the serial port. what are the steps..

  4. #4
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Serial port Communication, for mifare card read/write


  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Serial port Communication, for mifare card read/write

    I don't see how your code would work, you are not specifying which port, the port parameters (speed, parity, etc) or flow control (rts/cts etc). They must match your target device.

Similar Threads

  1. Serial Port communication
    By mgurbuz in forum Qt Programming
    Replies: 12
    Last Post: 22nd January 2011, 02:38
  2. Replies: 1
    Last Post: 16th June 2009, 09:09
  3. How to write bytes read from serial port to a QFile
    By shamik in forum Qt Programming
    Replies: 19
    Last Post: 25th June 2007, 14:12
  4. serial port and USB communication
    By shamik in forum Qt Programming
    Replies: 5
    Last Post: 4th December 2006, 10:40
  5. Serial Port Communication
    By soldstatic in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2006, 16:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.