lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110810051603.M89044@admin-gateway.ncra.tifr.res.in>
Date:	Wed, 10 Aug 2011 10:55:39 +0530
From:	"Raju Rameshwar Uprade" <rajsingh@...a.tifr.res.in>
To:	Greg KH <greg@...ah.com>
Cc:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Regarding USB-RS485 Cable Manufacturer: FTDI SerialNumber: FTU6Z938


Hello Greg,
           I have purchased a USB-RS485 Cable Manufacturer: FTDI SerialNumber: FTU6Z938.
And I have written a user space program to communicate with my Rs-485 device at the
other end.The device at the other end expect 1 address byte with mark parity and rest of
the bytes with space parity.


Below is the userspace code which I have used for setting the Mark and Space parity bit.

 // Send the first byte with mark parity-
          attr.c_cflag |= PARENB;
          attr.c_cflag |= CMSPAR;
          attr.c_cflag |= PARODD;
     
        tcsetattr(fd, TCSADRAIN, &attr);
         write(fd, buff, 1); // It writes the address byte 

// Send the rest with space parity

          attr.c_cflag |= PARENB;
          attr.c_cflag |= CMSPAR;
          attr.c_cflag &= ~PARODD;
          tcsetattr(fd, TCSADRAIN, &attr);
           write(fd,buff+1,( length-1));

I can see the Data going out on the Scope when I terminate the userspace program using
Control+ C. But the device at the other end is not responding.

Kindly tell me Whether It can be done from userspace or I have to modify the device driver.


Regards,
Raj.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ