Difference between revisions of "DIY USB adapter for dummies/zh-cn"

From GIMX
Jump to: navigation, search
(Created page with "为了方便,把文件放到桌面上(或者专门的一个文件夹里)")
(Created page with "注意:CP2102的驱动已经放在GIMX软件里了,图里那个文件请无视。")
Line 51: Line 51:
 
为了方便,把文件放到桌面上(或者专门的一个文件夹里)
 
为了方便,把文件放到桌面上(或者专门的一个文件夹里)
  
--todo: update screenshot (CP210x drivers are included in the GIMX setup)
+
注意:CP2102的驱动已经放在GIMX软件里了,图里那个文件请无视。
https://gimx.fr/img/screenshots/tuto/gfd/gfd-files.png
 
  
 
==Ubuntu==
 
==Ubuntu==

Revision as of 10:03, 22 January 2021

Other languages:
Deutsch • ‎English • ‎français • ‎中文(中国大陆)‎

gfd-header.png

这篇教程是一个简易入门教程。如果需要专业信息,请去隔壁DIY_USB_adapter页面查看。


欢迎来到GIMX USB转接器制作指南!不需要焊电路板的那种。
认真阅读此文,足够你制作且开始使用转接器。
建议先粗读一遍,然后再开始一步一步的制作。

购买需要的硬件

CP2102模块 USB 2.0 转 TTL

买的时候通常会送杜邦线(如果没有,跟老板要3根吧):

gfd-cp2102.jpg

如果不想焊电路板,你需要买个有针头的板才行。
这两种开发板都可以: Teensy 2.0 或者 Teensy ++ 2.0。
但其他的 Teensy 开发板 (3.x, LC, ...) 是不支持的!注意别买错了

如果没有的话,你可能还要准备一两根USB线:
一个是延长CP2102的USB延长线(不用延长的话可以不买),
一个是连接 Teensy 开发板的 mini-usb 线(Teensy可能有不同的接口,而且买Teensy的时候常常送一根很短的mini-usb线)

可选:

这个教程里,我将使用一个火柴盒替代。你也可以考虑用大的热缩管,或者3D打印个合适的外壳。
  • 电工胶带
为了防止电路板触碰到别的金属部分东西发生短路什么的,普通胶带也行。
  • 橡皮筋
用来把东西绑到一起,没弄好也能拆开。

当然估计会用到剪刀小刀什么的常用小工具。

gfd-parts.jpg

注意:别用上面图中展示的伸缩USB延长线,最好用抗干扰的USB线

下载所需的软件和固件

Windows

  • EMUJOYSTICKPS3: HID joystick emulation, with 16bit stick axes, for PS3
  • EMUPS3: Sixaxis emulation, for PS3
  • EMU360: 360 pad emulation, for Xbox 360
  • EMUPS4: Hori Pad FPS Plus emulation, for PS4 (with touchpad support)
  • EMUXONE: Xbox One pad emulation, for Xbox One
  • EMUG29PS4: Logitech G29 gaming wheel emulation, for PS4, with force feedback support
  • EMUG27PS3: Logitech G27 gaming wheel emulation, for PS3, with force feedback support
  • EMUGTFPS2: Logitech GT Force emulation, for PS2, with force feedback support
  • EMUDFPS2: Logitech Driving Force emulation, for PS2, with force feedback support
  • EMUDFPPS2: Logitech Driving Force Pro emulation, for PS2, with force feedback support
  • EMUG27PC: Logitech G27 gaming wheel emulation, for PC, force feedback support

为了方便,把文件放到桌面上(或者专门的一个文件夹里)

注意:CP2102的驱动已经放在GIMX软件里了,图里那个文件请无视。

Ubuntu

  • EMUJOYSTICKPS3: HID joystick emulation, with 16bit stick axes, for PS3
  • EMUPS3: Sixaxis emulation, for PS3
  • EMU360: 360 pad emulation, for Xbox 360
  • EMUPS4: Hori Pad FPS Plus emulation, for PS4 (with touchpad support)
  • EMUXONE: Xbox One pad emulation, for Xbox One
  • EMUG29PS4: Logitech G29 gaming wheel emulation, for PS4, with force feedback support
  • EMUG27PS3: Logitech G27 gaming wheel emulation, for PS3, with force feedback support
  • EMUGTFPS2: Logitech GT Force emulation, for PS2, with force feedback support
  • EMUDFPS2: Logitech Driving Force emulation, for PS2, with force feedback support
  • EMUDFPPS2: Logitech Driving Force Pro emulation, for PS2, with force feedback support
  • EMUG27PC: Logitech G27 gaming wheel emulation, for PC, force feedback support
(You will have to follow the instructions on that page if you want to use the Teensy Loader with Ubuntu)

Assemble the adapter

To begin with, carefully check that your serial converter is exactly the same as in this tutorial.
The adapter used in this tutorial is mislabeled: RXD and TXD are inverted.
If it is not exactly the same, you may have to connect different pins:

Teensy USB to UART board
GND GND
D2 TX / TXO / TXD
D3 RX / RXI / RXD

Next, I recommend you insulate the serial converter using the electrical tape if it's going to be in a tight enclosure, to avoid any shorts between it and the Teensy.

gfd-insulate.jpg

Now connect the cables as shown in the picture below. (Notice how the Teensy is placed! Pins should point left with the USB connector pointing away from you.)

gfd-cablesgohere.jpg

The next two steps are only required if you're putting the parts in a very tight enclosure and need the parts to take up as little space as possible.

1. Bend the pins with the jumper cables attached to them inwards, slowly to prevent them from snapping, and tuck the cables between the pins on the opposite side.

gfd-bend-1.jpg

2. To save some extra space, I usually wrap the cables around the Teensy. There's no special way of doing this, so you just need to figure out what works best for your build.

Remember not to cover up the button on the Teensy as we need to press it later on. (Also, this is where the rubber band will come in handy!)

gfd-bundle.jpg

If you want, you can also place the serial converter so that the pins and jumper cables go in between the rows of pins on the Teensy. It's a very snug fit though so you should use some electrical tape to insulate the pins on the serial converter because they will touch the Teensy ones if you don't.

gfd-insulate2.jpg

Cut some holes in your project box of choice to match the Mini USB plug on one side and regular USB plug on the other side. Do some tests and make sure everything aligns up before securing everything in place. In the picture below I've bundled everything up using the rubber band and secured it to the box with some electrical tape (double sided tape or hot glue works wonders too if you have it)

gfd-matchdapter.jpg

Voilà! You're done building the adapter.

Load the firmware onto the adapter

Connect the adapter to your computer using the USB Mini-B cable and a LED on the Teensy should turn on or start blinking.

gfd-loadfirmware.png

Now start up Teensy Loader (teensy.exe on your desktop) and follow these steps:

Press the button on the Teensy and the LED should turn off. In Teensy Loader, open atmega32u4.hex from the firmwares folder on your desktop. Click the Program button and you should get the message "Download Complete" Now click the Reboot button and your GIMX USB adapter is ready for use!

If the Teensy loader does not detect the device, try with another USB cable, and another USB port.

gfd-connect.jpg

NOTE! You can now unplug the USB Mini-B cable from your computer. The USB Mini-B cable will only be connected to your computer when upgrading the firmware from now on. When in use, the USB Mini-B cable is connected to your console.

Install the GIMX software

This step is pretty straight forward. Simply run setup-X.YZ.exe from your desktop and follow the installation steps, preferably with the default installation location.

gfd-setupgimx2.jpg

When the installation is done you should have three GIMX icons on your desktop.

--todo: update screenshot (gimx-serial was renamed to gimx-launcher) gfd-icons.png

Configuration basics

GIMX comes pre-loaded with a few configurations, but let's take a quick look on how you can make your own configurations using the GIMX FPS Config Tool (As you can tell by the name, this is mainly meant for setting up a basic FPS configuration.)

Youtube video

You can also check out the Configuration Requests and Index thread for other configurations available for download, or post requests that we or the community might be able to fulfill.

NOTE! To open the configuration directory, click on File>Open config directory in gimx-config, gimx-fpsconfig, or gimx-launcher.

Good to go!

That's it. You're ready to start using the GIMX USB adapter!

  • Connect the regular USB side to your PC

gfd-contopc.jpg

  • Connect the USB Mini-B side to your console, run gimx-launcher and make sure the adapter is recognized on a COM port.
(If the Device box is blank, refer to the Support section and report the problem if a solution isn't found)

gfd-comport.jpg

  • Read the Quick Start page to learn how to download a pre-made configuration, and how to install the libusbk driver (needed for consoles that require authentication).
  • Select the config you made/downloaded from the drop down menu, click the Start button and a couple of windows should pop up to start capturing your mouse and keyboard input!

If there is a "No controller detected." error message when you start GIMX, double check you wiring, and try to invert TX and RX in case it's still not working.

gfd-selconfig.png

Now if you're in the menus of your console and press the WASD or arrow keys on your keyboard, you should be able to navigate through the menus, meaning you've succeeded! If not, or if something went wrong elsewhere, go back and make sure you followed every step to the letter and try again, then let us know if nothing you try works.

Enjoy!