[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: linka ihop /dev/rfcomm serial med dev/ttyUSB1?

ska kolla upp det. tack för tipset!


Michael Olberg wrote:
Annars kan man väl åstadkomma den typ av länk som du vill ha m.h.a. udev rules.

eva sjuve wrote:
Martin Leben wrote:
eva sjuve wrote:
hej jag har letat men hittar ingen förklaring hur man
sätter en länk mellan bluetooth serial som jag finfint får in på /dev/rfcomm0
och läser i cat /dev/rfcomm0

men jag vill ha in det i ett program, som /dev/ttyUSB1
hur linkar jag ihop dessa två
jag har provat symlink ln -s /dev/rfcomm0 /dev/ttyUBS1
men det har inte funkat
det är säkert enkelt
nån som kan?


Vad sägs om "snooper" eller "socat"? Hittade med "apt-cache search serial two". :-) (Obs! Har inte testat själv.)

$ aptitude show snooper
Description: Captures communication between two external serial devices
 Snooper passes data transparently between two serial (RS232C) devices,
capturing and logging the data and occasional comments you want to insert
 into the logs.

 It is useful for debugging or analyzing the communications protocol
 between two devices that would normally be connected directly to each
other, e.g. a digital camera and a personal computer. By sitting "in the middle" (after you connect the two devices to serial ports on your Linux
 machine) snooper is able to capture data traveling in either direction
 while also passing it unmodified to the other device.

 It is also possible to operate with a single serial device, using your
 console and keyboard as the second device.

$ aptitude show socat
Description: multipurpose relay for bidirectional data transfer
 Socat (for SOcket CAT) establishes two bidirectional byte streams and
 transfers data between them. Data channels may be files, pipes, devices
 (terminal or modem, etc.), or sockets (Unix, IPv4, IPv6, raw, UDP, TCP,
 SSL). It provides forking, logging and tracing, different modes for
 interprocess communication and many more options.

 It can be used, for example, as a TCP relay (one-shot or daemon), as an
 external socksifier, as a shell interface to Unix sockets, as an IPv6
 relay, as a netcat and rinetd replacement, to redirect TCP-oriented
 programs to a serial line, or to establish a relatively secure
 environment (su and chroot) for running client or server shell scripts
 inside network connections.

Lycka till!

/Martin Leben

de här ser lovande ut

Reply to: