Help - Search - Members - Calendar
Full Version: connecting 2 computers with a USB cable
Suggest A Fix PC Support Forums > Operating Systems > Unix, Linux, and BSD
Pman
Hey Sam, hopefully you can help me out with this one.

I have two computers PC1 and PC2 which I have to connect to each other using a USB cable. The reason I need to do this is because I have a software suite that runs on PC1 which through the use of a serial port remotely controls PC2, I want to change the serial port functionality to be USB functionality. But I have never used anything USB on freeBSD.

First off, what do I need to set up in order to get USB up an running on both PCs? what do I need to install? and what do I need to configure and how?

Second, I have the files that specify the configuration that needs to be done on both PCs in order to establish the serial connection, but I dont know how to modify them to be able to do this through a USB connection instead. here are the relevant parts of the file:

1.2. Serial line

Connect both COM ports of PC1 and PC2 with
a Null-modem cable (or a RS232C cross cable).

Example:

COM1 COM1
PC1 -------------------- PC2
serial line
(Null-modem cable)

The following Null-modem cable is required to connect PC1 and PC2
if a cable is DSUB-9 pins.

1 DCD ********** open ********* 1 DCD

2 RXD ------------------------- 3 TXD
3 TXD ------------------------- 2 RSD

4 DTR ------------------------- 6 DSR
6 DSR ------------------------- 4 DTR

5 GND ------------------------- 5 GND

7 RTS ------------------------- 8 CTS
8 CTS ------------------------- 7 RTS

9 CE ********** open ********* 9 CE

1.2.1 - Configuration of PC2
PC1 requires you to log into PC2 as a super user.
To log into NPC2, modify /etc/ttys.

Example: /etc/ttys
==========================================================
--- ttys.orig Fri Oct 12 13:32:01 2001
+++ ttys Fri Oct 12 13:32:54 2001
@@ -42,6 +42,7 @@
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
+cuaa0 "/usr/libexec/getty std.9600" unknown on secure
ttyd0 "/usr/libexec/getty std.9600" dialup off secure
ttyd1 "/usr/libexec/getty std.9600" dialup off secure
ttyd2 "/usr/libexec/getty std.9600" dialup off secure
==========================================================

NOTE: The cuaa* drivers are safer than the ttyd* drivers
because the cuaa* drivers can work with a Null-modem cable
that drops CD signals.

1.2.2 Configuration of PC1

Example: /usr/local/etc/pc1.def (where tn.def is a configuration file installed by the software suite"
==========================================================
RemoteDevice cuaa0
RemoteDebug 0
RemoteIntDebug 0
RemoteLog 0
RemoteSpeed 0
RemoteLogout 0
RemoteMethod serial
Link0 ed1 00:00:00:00:01:00
==========================================================


1.2.3 cu command (run this from PC1)

To run cu command, set up the following.

# touch /var/log/aculog
# chmod a+rw /var/log/aculog

HINT: /etc/fbtab is another way to adjust file permission.

The package uses "/dev/cuaa0" as the default line name
(see /usr/local/v6eval/etc/tn.def).
If TN requires a different line name, modify the following files,
depending on the setups of your machine:

- /etc/remote or else
- "RemoteDevice" entry in /usr/local/etc/pc1.def

DIAG: If "cu" related customization is not properly performed,
the following command can not be executed successfully:

%cu -l /dev/cuaa0
user: root
password: testpassword
root@PC2#

If /usr/local/etc/{pc2,pc1}.def is not correct,
the following command can not be executed successfully.

%/usr/local/etc/loginout.rmt -o1


I hope some of that made some sense, both computers are connected DIRECTLY through a network cable (which is how the software suite does its job) and the reason why the serial connection exists is to remotely control PC2 from PC1 at certain times (say when the test suite on PC1 requires PC2 to reboot) without having to create any network traffic. The only things is that I want to be able to use USB instead of a serial connection.

do you have any ideas at all?

thanx!
~pman
LinuxSam
Why do you want to use USB instead of a serial connection if its only for simple things like rebooting the computer and send some commands?

And... using USB instead of serial connection would require the controll program to be aware of the USB connection... is it? can you specify a device to use?

Answer these questions and I'll see what I can find.

/LinuxSam
Pman
because the device that I want to use as PC2 does not have a serial port, only has a network and USB port and I cannot use the network port to run both the suite and the remote control application. thanx
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.