Cleric-K / FlySky-i6X_Firmware_BugFix

Fixes a bug in the original FS-i6X firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asking for advice. How to get stared with firmware tweaks for the FS-i6X embedded processor and USB link question

Mitomensch opened this issue · comments

Hi,
This is slightly off-topic, I apologize!
I am a technically interested person with a physics/IT background. After 40 years I am only starting again to play with the new technologies for radio control. I have a couple of questions regarding the current 2,4 GHz technology, hardware and firmware.
I understand that the embedded microcontroller is a STM32F072VBT6.
Which development environment do you use on which platform (WIN/Linux)?
Which disassembler?
How to extract the firmware from the Windows installer?
I'm impressed by Cleric-K's knowledge and presentation of the problem he solved. What is your hardware setup to produce those plots and graphs of the radio data?
Anybody with interest in these matters can reach me privately at mitomensch@gmail.com. I would like to start something like a public knowledge base for all iX6 or else.

I recently purchased a FS-iX6 transmitter. It came with a X6B receiver. I am still in the process of evaluating this set. One thing I would like to have a conversation about is the PS2 interface on the back of the transmitters. My transmitter came with a USB cable that seems to work fine as a simulator controller AND update link with a Windows 10 system. But I heard that some people were using adapter cables from AliExpress of Banggood. Any thoughts from the community?

Thank you!

Which development environment do you use on which platform (WIN/Linux)?

Depends on what you need. For the compilation of the patch I used Notepad++ to write the code and the standard gcc-arm toolchain for building.
If you want to write normal stm32 projects I use https://platformio.org/

Which disassembler?

IDA 7.0

How to extract the firmware from the Windows installer?

http://www.angusj.com/resourcehacker/
Although I dumped it directly from the transmitter, by connecting with ST-LINK. I used resourcehacker to replace the firmware in updater.exe with the patched.

What is your hardware setup to produce those plots and graphs of the radio data?

It's simply blackbox data from Betaflight FC. You need either RC_INTERPOLATION or RC_SMOOTHING debug mode. See https://github.com/betaflight/betaflight/wiki/Debug-Modes

One thing I would like to have a conversation about is the PS2 interface on the back of the transmitters. My transmitter came with a USB cable that seems to work fine as a simulator controller AND update link with a Windows 10 system. But I heard that some people were using adapter cables from AliExpress of Banggood. Any thoughts from the community?

FS-I6X uses USB communication. FS-I6 uses UART
image

TX and RX are for FS-I6's UART.
D+/- are for FS-I6X's USB.

Thank you, Cleric, for the kind explications. Do you work on Linux or Windows?

I have a ST-LINK V2 adapter. How do you connect it to the i6X? There must be some pins on the motherboard. I found OpenOCD as a tool to flash firmware. What software are you using to read out and upload the firmware?

The PS2 story continues. I realize that the iX6 has a USB Port. I have RealFlight 7.5. Under Windows the FS-iX6 registers as a "Flysky FS-iX6CN" HID-compliant game controller BUT it is NOT recognized by RealFlight 7.5! I also tried "Student mode" without success. The FS-SM100 dongles that are available on Aliexpress etc. are for the FS-i6 UART port. But some sellers claim that they work with iX6 too. What is your take on that? Do you have information on the electrical characteristics of the i6 UART port?

BTW, when you enter the firmware update mode on a FS-iX6 under Windows 10, the "flavour" of the USB device changes. It becomes a "SF-i6X firmware update" HID-compliant vendor-defined device.

I understand that the PS2 issue is off-topic. What is the correct way on Github to have a discussion? Shall I create a new PS2 port issue on your project or on my space?

Thank you in advance. please PM me on mitomensch@gmail.com if you want to keep this conversation private.
MM

Thank you, Cleric, for the kind explications. Do you work on Linux or Windows?

Primarily Windows.

I have a ST-LINK V2 adapter. How do you connect it to the i6X? There must be some pins on the motherboard. I found OpenOCD as a tool to flash firmware. What software are you using to read out and upload the firmware?

I don't have exact photo but there are labelled pads on the board for SWDIO and SWCLK.

The PS2 story continues. I realize that the iX6 has a USB Port. I have RealFlight 7.5. Under Windows the FS-iX6 registers as a "Flysky FS-iX6CN" HID-compliant game controller BUT it is NOT recognized by RealFlight 7.5! I also tried "Student mode" without success. The FS-SM100 dongles that are available on Aliexpress etc. are for the FS-i6 UART port. But some sellers claim that they work with iX6 too. What is your take on that? Do you have information on the electrical characteristics of the i6 UART port?

I have no idea about RealFlight. It's possible that the dongles work because they use the trainer PPM signal (not USB or UART). Unfortunately this solution is not optimal because PPM in itself adds latency that can be felt. I don't have electrical characteristics.

Thank you again. Just to clarify. I just found out that the port on the FS-i6X is an S-Video connector. NOT PS/2.
https://en.wikipedia.org/wiki/S-Video

I am now checking the pinout. I opened the thing and looked at the motherboard. So far I identified
Pin 1=PPM_OUT
Pin 2=PPM_IN
PIN 3=D- (USB)
PIN 4=D+ (USB)

Now for the supplied S-Video-to-USB cable:
Metal case of S-Video connector is connected to USB negative power pin, not the USB plug case.
S-Video PINS 3 and 4 are connected to the USB plug. PINS 1 and 2 are ignored.

This might explain why some simulator or UART cables can use the UART PPM signals on PINS 1 and 2 of the S-Video port.