2010-08-12 01:10:16     Accessing Serial ports through GDB and multiplexing serial ports

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-08-12 01:10:16     Accessing Serial ports through GDB and multiplexing serial ports

Sarath Chandra (INDIA)

Message: 92344   

 

The serial port of BF537 once opened by a user can't be accessed by another user. Is there any possible way by which two users having access to the same  board can access on a sharing basis i.e. can the users access as if there are two different serial ports without any problems arising? The user would be using GDB and GDB server for debugging his programs.

QuoteReplyEditDelete

 

 

2010-08-12 01:18:23     Re: Accessing Serial ports through GDB and multiplexing serial ports

Mike Frysinger (UNITED STATES)

Message: 92345   

 

that isnt really true.  a UART can be opened an unlimited number of times.  what you're probably referring to is that whoever happens to do a read() when data is available will get it.

 

Linux has no support for creating "virtual serial ports" so that one can be multiplexed into many.  use ppp instead to create a simple network link over the UART.

 

https://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:ppp

QuoteReplyEditDelete

 

 

2010-08-12 02:43:16     Re: Accessing Serial ports through GDB and multiplexing serial ports

Sarath Chandra (INDIA)

Message: 92347   

 

No. What I meant was allowing two people to have a simultaneous access,which is not possible once a user has opened a serial port in his application code. The resource becomes free only when he relinqushes control of it by closing application code or by closing file pointer. Is there some way around it?

QuoteReplyEditDelete

 

 

2010-08-12 07:10:38     Re: Accessing Serial ports through GDB and multiplexing serial ports

Mike Frysinger (UNITED STATES)

Message: 92373   

 

seems to work just fine for me, so i dont know what your trouble is

 

cat /dev/ttyBF0 > /dev/null &

cat /dev/ttyBF0 > /dev/null &

cat /dev/ttyBF0 > /dev/null &

cat /dev/ttyBF0 > /dev/null &

cat /dev/ttyBF0 > /dev/null &

QuoteReplyEditDelete

 

 

2010-08-12 11:11:42     Re: Accessing Serial ports through GDB and multiplexing serial ports

Sarath Chandra (INDIA)

Message: 92380   

 

By serial port I am refering to SPORT0 and 1 of bf537. bfin_sport.c is the driver file written in Char device drivers. When two users try accessing SPORT,it returns busy status

QuoteReplyEditDelete

 

 

2010-08-12 12:01:05     Re: Accessing Serial ports through GDB and multiplexing serial ports

Mike Frysinger (UNITED STATES)

Message: 92383   

 

people do not use the term "serial port" to refer to the SPORT.  they use "SPORT".  no confusion/overlap with any other system.

 

what driver exactly are you referring to ?  bfin_sport.c ?  the version in trunk has been rewritten to handle multiple people opening it simultaneously.

Attachments

    Outcomes