Sponsored Content
Top Forums UNIX for Advanced & Expert Users read() from ttyS1 issue while write() is Ok Post 302541738 by Japonomatj on Monday 25th of July 2011 01:28:06 PM
Old 07-25-2011
So, I've got a development board Digi ConnectCore Wi-9C (digi.com/products/model.jsp?mid=576). There is need to establish connection between Digi and another board by UART.
At the beginning I wrote a code for serial communication between PC (running Kubuntu, there was program) and laptop. It was Ok, all worked.
Next step was to establish connection between Digi and my laptop. I compiled the same code for Digi board (dev/ttyS0) and experienced a problem: I can send data, but can't receive any byte! Smilie I've tried blocking and non-blocking regimes, but nothing helped. No data was received.
By the way, Linux console (on Digi) is working properly (dev/ttyS1).
 

10 More Discussions You Might Find Interesting

1. Programming

popening for read and write

How can 'popen()' be used for reading and writing to opening pipe? If i try 'popen("prog", "rw")' and then put and get chars - it does not work. What is wrong? (1 Reply)
Discussion started by: szzz
1 Replies

2. Shell Programming and Scripting

read and write from a file

I have tried to show the file name whose size is greater than 200 byte in current directory. Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while do read x echo $x #re=200 j=0 if }" < "200" ] then echo $j j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies

3. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

4. Programming

read/write files

Hi all, I have a problem with some read/write functions. I have a .bin file which contains a lot of structures as follows: struct alumno { char id; char apellido1; char apellido2; char nombre; float nota1p; float nota2p; float notamedia; char photofilename; }; What I have... (3 Replies)
Discussion started by: Attenea
3 Replies

5. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

6. IP Networking

write() / read() syntax

hi am newbie to unix and socket programing I am trying to figuring out syntax for read and write to send data from server to client and client can read it I have to send two integers write(newsockfd,buffer,"%d %d",x,y,0) writing from client where x and y are two integers.. ... (7 Replies)
Discussion started by: karthik1238
7 Replies

7. Programming

Need help about read() and write() on TCP/IP

HI I need to implement a client/server TCP application. the customer is the client and the bartender is the server. When the customer enter the Bar, client connects to the server Server should reply the client immediately. Other wise if the server is busy, it should send an update message... (10 Replies)
Discussion started by: lixiao1212
10 Replies

8. Emergency UNIX and Linux Support

Capturing console (/dev/ttyS1) logs

Hi, I have been trying to capture console logs from the init script. When the ramfs is mounted, i check if usb is connected , if conncted, i mount it and redirected the console logs like so: cat & /dev/ttyS1 >> /mnt/logs.txt I'm getting /bin/sh : /dev/ttyS1 :permission denied ... (8 Replies)
Discussion started by: xerox
8 Replies

9. Shell Programming and Scripting

File Read and Write

I have got a file in following format: AAAAAAA BBBBBBBB CCCCCCC DDDDDDD I am trying to read this file and out put it in following format: AAAAAAA,BBBBBBB,CCCCCCC,DDDDDD Preferred method is shell or Perl. Any help appreciated. (11 Replies)
Discussion started by: Araoki
11 Replies

10. Programming

FIFO write and read

Can someone help me to write this program in C in QNX? Using the FIFO queues write a simple communication system consisting of programs write and read. The program write the parameters given strings enclosed in single quotes. These strings are written to the FIFO file. Reads the program read... (1 Reply)
Discussion started by: ebasse2
1 Replies
usbser_edge(7D) 						      Devices							   usbser_edge(7D)

NAME
usbser_edge - Digi Edgeport USB to serial converter driver SYNOPSIS
#include <fcntl.h> #include <sys/termios.h> usbser_edge@unit DESCRIPTION
The usbser_edge driver is a loadable STREAMS and USBA (Solaris USB architecture) compliant client driver that provides basic asynchronous communication support for Digi Edgeport USB-to-serial converters. Supported devices include Edgeport/1, Edgeport/2, Edgeport/21, Edge- port/4, Edgeport/421, Edgeport/8, and Edgeport/416. Serial device streams are built with appropriate modules that are pushed atop the usb- ser_edge driver by the autopush(1M) facility. The usbser_edge module supports the termio(7I) device control functions specified by flags in the c_cflag word of the termios structure, and by the IGNBRK, IGNPAR, PARMRK and INPCK flags in the c_iflag word of the termios structure. All other termio(7I) functions must be per- formed by STREAMS modules pushed atop the driver. When a device is opened, the ldterm(7M) and ttcompat(7M) STREAMS modules are automati- cally pushed on top of the stream, providing the standard termio(7I) interface. Use device logical names /dev/term/[0-9]* to access the serial ports. These names are typically used to provide a logical access point for a dial-in line that is used with a modem. To allow a single tty line to be connected to a modem and used for incoming and outgoing calls, a special feature is available that is con- trolled by the minor device number. By accessing through device logical name/dev/cua/[0-9]*, you can open a port without the Carrier Detect signal being asserted, either through hardware or an equivalent software mechanism. These devices are commonly known as dial-out lines. Unlike onboard serial ports, the usbser_edge ports cannot serve as a local serial console. APPLICATION PROGRAMMING INTERFACE
A dial-in line can be opened only if the corresponding dial-out line is closed. A blocking /dev/term open waits until the /dev/cua line is closed (which drops Data Terminal Ready, after which Carrier Detect usually drops as well) and carrier is detected again. A non-block- ing/dev/term open returns an error if the /dev/cua is open. If the /dev/term line is opened successfully (usually only when carrier is recognized on the modem), the corresponding /dev/cua line cannot be opened. This allows a modem and port to be used for dial-in (by enabling the line for login in /etc/inittab) or dial-out (by tip(1), or uucp(1C)) when no one is logged in on the line. Device hot-removal is functionally equivalent to modem disconnect event, as defined in termio(7I). IOCTLS
The usbser_edge driver supports the standard set of termio(7I) ioctl calls. Input and output line speeds can be set to the following baud rates: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. Input and output line speeds cannot be set independently; for example, when the output speed is set, the input speed is automatically set to the same speed. ERRORS
An open() fails under the following conditions: ENXIO The unit being opened does not exist. EBUSY The /dev/cua (dial-out) device is being opened while the/dev/term (dial-in device) is open, or the dial-in device is being opened with a no-delay open while the dial-out device is open. EBUSY The unit has been marked as exclusive-use by another process with a TIOCEXCL ioctl() call. EIO USB device I/O error. FILES
/kernel/drv/usbser_edge 32-bit x86 ELF kernel module /kernel/drv/amd64/usbser_edge 64-bit x86 ELF kernel module /kernel/drv/sparcv9/usbser_edge 64-bit SPARC ELF kernel module /dev/cua/[0-9]* dial-out tty lines /dev/term/[0-9]* dial-in tty lines ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+------------------------------+ |Architecture |SPARC, x86, PCI-based systems | +-----------------------------+------------------------------+ |Availability |SUNWuedg | +-----------------------------+------------------------------+ SEE ALSO
strconf(1), tip(1), uucp(1C), autopush(1M), ioctl(2), open(2), termios(3C), attributes(5), usba(7D), termio(7I), ldterm(7M), ttcompat(7M) DIAGNOSTICS
In addition to being logged, the following messages may appear on the system console. All messages are formatted in the following manner: Warning: <device path> (usbser_edge<instance num>): Error Message... Device was disconnected while open. Data may have been lost. The device was hot-removed or powered off while it was open and a possible data transfer was in progress. Device is not identical to the previous one on this port. Please disconnect and reconnect. The device was hot-removed while open. A new device was hot-inserted which is not identical to the original device. Please disconnect the device and reconnect the original device to the same port. Device has been reconnected, but data may have been lost. The device that was hot-removed from its USB port has been re-inserted again to the same port. It is available for access but data from a previous transfer may be lost. Cannot access <device>. Please reconnect. This device has been disconnected because a device other than the original one has been inserted. The driver informs you of this fact by displaying the name of the original device. SunOS 5.10 9 Oct 2004 usbser_edge(7D)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy