Waiting for response --- Read() and Write C functions are working only for Console Port, not for another serial port on MVME162

AJAI KUMAR MEDHAVI akmedhavi at rrcat.gov.in
Tue Aug 20 10:51:53 UTC 2013


Hi Nick,


1. Port Mapping

console Port ( with minor 1) maps to serial port 1
tty01 (with minor 1) maps to serial port 1.
tty00 (with minor 0) maps to serial port 2.


2. There was typical mistake in


static const char          device0[] = "/dev/tty00";
static const char          device1[] = "/dev/tty01";

fd0 = open(device0, O_RDWR);
fd1 = open(device0, O_RDWR);


Here correction is :


fd0 = open(device0, O_RDWR);
fd1 = open(device1, O_RDWR);


Thanks


AJAI




> Hey Ajai,
>
> Think these're probably just typos, but just in case...
>
> On Mon, 2013-08-19 at 17:23 +0700, AJAI KUMAR MEDHAVI wrote:
>
>> Most probably due to above facts, There is error in Opening tty00
>> (serial
>> port 2) and consequently failure of read / write on serial port 2 :
>
> You mean "tty01", right?
>
>>
>> I have used following in my application :
>>
>>
>> static const char          device0[] = "/dev/tty00";static
>> const char                 device1[] = "/dev/tty01";
>>
>> fd0 = open(device0, O_RDWR);
>> fd1 = open(device0, O_RDWR);
>
> You mean "fd1 = open(device1, O_RDWR);", yeah?
>
> (snip)
> --
> Nick Withers
>
> Embedded Systems Programmer
> Room 2.26, Building 57
> Department of Nuclear Physics
> Research School of Physics and Engineering
> The Australian National University (CRICOS: 00120C)
>
> eMail: nick.withers at anu.edu.au
> Phone: +61 2 6125 2091
> Mobile: +61 414 397 446
>
>
>


-- 





More information about the users mailing list