嵌入式


usb gadget

<h3>ether</h3> <p>配置kernel后重新编译内核后编译module</p> <pre><code>insmod u_ether.ko insmod usb_f_rndis.ko insmod usb_f_ecm.ko insmod usb_f_ecm_subset.ko insmod g_ether.ko</code></pre> <p>然后分配一个ip地址给usb0 <code>ifconfig usb0 192.168.0.23</code></p> <p>windows安装rndis驱动http://www.opossom.com/_downloads/apf27_PPS/windrivers/ 其中安装文件内容</p> <pre><code>; ; Remote NDIS template device setup file ; Copyright (c) Microsoft Corporation ; ; This is the template for the INF installation script ; for the RNDIS-over-USB host driver. ; This INF works for Windows XP SP2, Windows XP x64, ; Windows Server 2003 SP1 x86, x64, and ia64, and ; Windows Vista x86 and x64. ; This INF will work with Windows XP, Windows XP SP1, ; and Windows 2003 after applying specific hotfixes. [Version] Signature = "$Windows NT$" Class = Net ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} Provider = %Microsoft% DriverVer =06/21/2006,6.0.6000.16384 ;CatalogFile = device.cat [Manufacturer] %Microsoft% = RndisDevices,NTx86,NTamd64,NTia64 ; Decoration for x86 architecture [RndisDevices.NTx86] %RndisDevice% = RNDIS.NT.5.1, USB\VID_0525&amp;PID_a4a2 ; Decoration for x64 architecture [RndisDevices.NTamd64] %RndisDevice% = RNDIS.NT.5.1, USB\VID_0525&amp;PID_a4a2 ; Decoration for ia64 architecture [RndisDevices.NTia64] %RndisDevice% = RNDIS.NT.5.1, USB\VID_0525&amp;PID_a4a2 ;@@@ This is the common setting for setup [ControlFlags] ExcludeFromSelect=* ; DDInstall section ; References the in-build Netrndis.inf [RNDIS.NT.5.1] Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI BusType = 15 ; NEVER REMOVE THE FOLLOWING REFERENCE FOR NETRNDIS.INF include = netrndis.inf needs = Usb_Rndis.ndi AddReg = Rndis_AddReg_Vista ; DDInstal.Services section [RNDIS.NT.5.1.Services] include = netrndis.inf needs = Usb_Rndis.ndi.Services ; Optional registry settings. You can modify as needed. [RNDIS_AddReg_Vista] HKR, NDI\params\VistaProperty, ParamDesc, 0, %Vista_Property% HKR, NDI\params\VistaProperty, type, 0, "edit" HKR, NDI\params\VistaProperty, LimitText, 0, "12" HKR, NDI\params\VistaProperty, UpperCase, 0, "1" HKR, NDI\params\VistaProperty, default, 0, " " HKR, NDI\params\VistaProperty, optional, 0, "1" ; No sys copyfiles - the sys files are already in-build ; (part of the operating system). ; Modify these strings for your device as needed. [Strings] Microsoft = "Microsoft Corporation" RndisDevice = "Remote NDIS based Device" Vista_Property = "Optional Vista Property"</code></pre> <h3>使用ssh或telnet登录</h3> <h3>使用telnet传输文件</h3> <ul> <li><code>cat &gt; file</code></li> <li>uuencode转换文件后拷贝文件内容</li> <li>uudecode恢复文件</li> </ul>

页面列表

ITEM_HTML