[原创]Linux机和Windows机用红外线端口互传文件
这个方法适用于Linux与Windows98之间传输文件,具体步骤请看下面的帖子。 这个问题我在公社还没有遇到过,希望你找到解决办法候在公社发表出来 方法在下面。 方法找到了,不妨置顶让大家改进这个方法。任务:一台IBM 380D,使用的是Windows98操作系统,一台Winbook e佳,使用的是RedHat Linux 9.0操作系统,现在要实现两台笔记本之间通过红外端口传输文件。
操作步骤:
1、在RedHat Linux 9.0下挂载红外设备。RedHat Linux 9.0的内核已经将红外设备的支持模块编译进去,因此不需要重新编译内核(红旗Linux 4.0也不需要),但是必须确定irda-utils-0.9.14.i386.rpm已经装上,使用以下命令来加载红外设备(以下命令在/usr/share/doc/irda-utils-0.9.14/README.irattach有具体说明):
irattach /dev/ttyS1 -s
irattach /dev/ttyS0 -d actisys -s
irattach irda0 -s 1
执行完以上操作,IBM 380D的Windows98操作系统就可以在有效范围内探测到名为localhost的红外设备(localhost是Linux的默认主机名),但是还不能传输文件。
2、我们需要安装IrCp这个东东,上ftp://fr.rpmfind.net/linux/ASPLinux/contribs/9/i386/openobex-1.0.0-3.i386.rpm和ftp://fr.rpmfind.net/linux/ASPLinux/contribs/9/i386/ircp-0.3-1asp.i386.rpm下载得到openobex-1.0.0-3.i386.rpm和ircp-0.3-1asp.i386.rpm,注意要先装openobex-1.0.0-3.i386.rpm再装ircp-0.3-1asp.i386.rpm。
3、传输文件。比如我们要把/root目录下一个名为net.txt的文件传给IBM 380D,那么使用以下命令:
ircp /root/net.txt
也可以传整个目录。
4、接收文件。先在Linux下执行命令:
ircp -r /root
然后在Windows98下执行:我的电脑——红外接收者——发送文件,选择要发送的文件点打开,过一会儿这个文件就会出现在RedHat Linux 9.0的/目录下。
问题:
1、不支持中文文件名,我还没在红旗Linux 4.0下试过。
2、在接收文件的时候,无论我设定为何目录,文件都会传到/目录下,我也搞不懂怎么回事,还望高手赐教。
3、两台Windows机能够通过红外端口来“直接电缆联接”(客户机可以访问主机的共享文件夹),Linux机和Windows机如何实现呢?。
以下是我所参照的外文资料,涵盖了Windows95到WindowsXP的内容:
Microsoft-Windows and Linux/IrDA
Introduction
Why this? Unfortunately Linux users are not always supported with the necessary hardware information. Sometimes it is possible to look at this informations in Microsoft-Windows. Sometimes its even useful to connect the two. Linux could also provide occasional access point services to a Microsoft-Windows laptop of a friend dropping by.
Where to get it from? At MicroSoft in the directory /Windows95/downloads/contents/WURecommended/S_WUCommunications/W95IrDA/ you will find a support pack Infrared Transfer 2.0. It is a self-extracting archive W95IR.EXE with 331KB. Note: Microsoft seems to change the location of this file (and others) at random, the former URL is Microsoft Windows95 IrDA - Old
Microsoft(tm) has three versions of IrDA support for Windows95. The version number can be found in the "Software" icon in the Control Panel and the file infrared.inf.
Version 1.0 is still delivered with some hardware.
Version 2.0 is the version they currently offer at their web site. It is in the self-extracting file W95IR.EXE. The last time I looked (1999-02-21) it was 434KB and was found at W95IR.EXE . Their website is frequently changing, so do not be surprised to find the file (also) in another location or not at all.
Version 3.0 can/could be found in their downloadable Infrared development kit IRDDK30, but is mostly useful for developers. It is internally different from 2.0, it is based on "miniport" network drivers, just like the Linux version. It exists for some time and has some support for NT, but it clearly did not make it into the mainstream NT4.0 distributions. For 95 you are probably better off with 2.0. The choice may depend on the documentation of the drivers you get with your specific hardware.
The Microsoft website also used to contain a nice utility IrXfer, contained in the archive IRXFER.EXE, This is the Infrared Transfer utility, which uses an IrOBEX variant I think, it is referenced in the IrOBEX protocol description. The utility was freely downloadable, but I could not find it the last time. It is a nice graphical utility which can be used to transfer files over IrDA between computers.
With some machines, e.g. a HP Omnibook 800 it is necessary to use a vendor specific version of this package (for the HP Omnibook 800 you may find it on the recovery CD).
Especially the ..\windows\inf\*.inf files and the device manager are of interest to look for configuration details.
As far as I know Window$NT doesn't support IrDA(TM). About Window$98 I have heard there is no IrDA(TM) support yet. Countersys claims to sell an IrDA solution for NT4.0 to support their JetBeam product, Microsoft refers to them for it.
AFAIK:
Windows95 : use 2.0
Windows98 : delivered with 3.0 and IrXfer (works with Linux/IrDA, IrOBEX?)
WindowsNT4.0: no IrDA support directly by the system
Windows2000 : 3.0(+?) MicroSoft
There are also some non M$ products available. Note: Some of them use proprietary infrared protocols:
CounterPoint: QuickBeam 1.15 (works with Linux/IrDA, IrOBEX?)
LapLink 7.5
CarbonCopy 32 4.0
pc ANYWHERE 7.5
Puma Technology: TRANXIT pro 4.0
Connection between Linux/IrDA and MS-Windows95 IrDA(TM)
You may use IrNET .
Communication between MS-Windows98 and Linux
Ha Duong Minh: Today I am delighted to report that ircp from the OpenOBEX project , works like a charm to transfer files between my Linux box and its Microsoft-Windows98 cousin. It can't be simpler: ircp file1, file2, ... to send or ircp -r to receive files over IrDA.
Communication between MS-Windows2000/XP and Linux
IrCOMM2k is a driver by Jan Kiszka for Windows 2000 and XP. It emulates a serial port which can be used to exchange data with mobile devices. For example, some cellular phones are able to act as modems or fax devices. PDAs with infrared interface can be synchronized with the PC. IrCOMM2k is an Open Source project according to the terms of the GPL. 好
建议加精
以后肯定用得着 好贴,正要找,就有了,一会把俺电脑里10G的xxx拷贝到本子上 各位高手不要忘了一起来解决那三个问题啊!
页:
[1]