public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to access /dev/ttyS* ?
@ 2012-04-26 15:48 Ryan Johnson
  2012-04-26 20:05 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Johnson @ 2012-04-26 15:48 UTC (permalink / raw)
  To: cygwin

Hi all,

I'm trying to connect a VirtualBox guest's serial port to something that 
cygwin/gdb can access for remote debugging, and am having trouble 
connecting the pieces...

One post from a couple of years ago [1] suggests using /dev/ttyS* to 
access COM ports. This would work great... except there are no 
/dev/ttyS* on my install.

The other VirtualBox option is to create a named pipe (as in Windows 
NPFS), and then wrap it into a pty using socat [2], but I can't figure 
out how to access such a pipe from cygwin -- the "\\.\pipe\*" path 
doesn't seem to be supported by cygpath and there's nothing obvious in 
/dev/.

[1] http://cygwin.com/ml/cygwin/2010-01/msg00081.html
[2] 
http://allmybrain.com/2010/04/29/debugging-linux-kernel-modules-with-virtualbox-and-kgdb/

Thoughts?
Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to access /dev/ttyS* ?
  2012-04-26 15:48 How to access /dev/ttyS* ? Ryan Johnson
@ 2012-04-26 20:05 ` Corinna Vinschen
  2012-04-26 23:58   ` Ryan Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2012-04-26 20:05 UTC (permalink / raw)
  To: cygwin

On Apr 26 11:48, Ryan Johnson wrote:
> Hi all,
> 
> I'm trying to connect a VirtualBox guest's serial port to something
> that cygwin/gdb can access for remote debugging, and am having
> trouble connecting the pieces...
> 
> One post from a couple of years ago [1] suggests using /dev/ttyS* to
> access COM ports. This would work great... except there are no
> /dev/ttyS* on my install.

If the VM has a virtual HW serial port configured, you should see a
/dev/ttyS0 entry.  If it's not there, you didn't configure it.  Cygwin
in the guest can only access what is available in the guest OS.  If
there's a COM1, Cygwin has a /dev/ttyS0.

> The other VirtualBox option is to create a named pipe (as in Windows
> NPFS), and then wrap it into a pty using socat [2], but I can't
> figure out how to access such a pipe from cygwin -- the "\\.\pipe\*"
> path doesn't seem to be supported by cygpath and there's nothing
> obvious in /dev/.

I don't know how that's supposed to work, but you could try to
connect it via /proc/sys/Device/NamedPipe/<name-of-named-pipe>
No guarantee that it works, though.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to access /dev/ttyS* ?
  2012-04-26 20:05 ` Corinna Vinschen
@ 2012-04-26 23:58   ` Ryan Johnson
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Johnson @ 2012-04-26 23:58 UTC (permalink / raw)
  To: cygwin

On 26/04/2012 4:04 PM, Corinna Vinschen wrote:
> On Apr 26 11:48, Ryan Johnson wrote:
>> Hi all,
>>
>> I'm trying to connect a VirtualBox guest's serial port to something
>> that cygwin/gdb can access for remote debugging, and am having
>> trouble connecting the pieces...
>>
>> One post from a couple of years ago [1] suggests using /dev/ttyS* to
>> access COM ports. This would work great... except there are no
>> /dev/ttyS* on my install.
> If the VM has a virtual HW serial port configured, you should see a
> /dev/ttyS0 entry.  If it's not there, you didn't configure it.  Cygwin
> in the guest can only access what is available in the guest OS.  If
> there's a COM1, Cygwin has a /dev/ttyS0.
Ah, I'm trying to debug a linux guest from cygwin/win7 host. I guess the 
problem is my laptop doesn't have a physical COM1 port, so there's no 
way to route anything to it (and nothing for cygwin to display in /dev).

>> The other VirtualBox option is to create a named pipe (as in Windows
>> NPFS), and then wrap it into a pty using socat [2], but I can't
>> figure out how to access such a pipe from cygwin -- the "\\.\pipe\*"
>> path doesn't seem to be supported by cygpath and there's nothing
>> obvious in /dev/.
> I don't know how that's supposed to work, but you could try to
> connect it via /proc/sys/Device/NamedPipe/<name-of-named-pipe>
> No guarantee that it works, though.
No love... I get "no such process." In retrospect I shouldn't have 
expected that to work, tho. Named pipes are undoubtedly very different 
beasts in Windows vs Posix.

It looks like my options are to run a second VM that points at the same 
named pipe and debug from within it, or use vmwaregateway [1] to convert 
it to TCP so my cygwin-based gdb can connect to it.  Both work.

[1] http://www.l4ka.org/91.php

Thanks anyway,
Ryan




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-26 23:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 15:48 How to access /dev/ttyS* ? Ryan Johnson
2012-04-26 20:05 ` Corinna Vinschen
2012-04-26 23:58   ` Ryan Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).