Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flysky IBUS telemetry does not work on 4.3 #11473

Closed
tn2009 opened this issue Mar 15, 2022 · 25 comments · Fixed by #11533
Closed

Flysky IBUS telemetry does not work on 4.3 #11473

tn2009 opened this issue Mar 15, 2022 · 25 comments · Fixed by #11533
Labels
BUG Bugs are excluded from automatically being marked as stale

Comments

@tn2009
Copy link

tn2009 commented Mar 15, 2022

Describe the bug

Impossible arming drone. Communication with the receiver is constantly lost. TX16s and mobula6 crazybeef4s. When the connection is lost, you have to turn off and turn on the whoop.

The same is true on the IA6B receiver with matek f405ctr.

To Reproduce

turn on the equipment and the quadcopter.

Expected behavior

It works fine on BF4.2.11. Communication with the receiver is not lost.

Flight controller configuration

diff all

version

Betaflight / STM32F405 (S405) 4.3.0 Feb 3 2022

config: manufacturer_id: MTKS, board_name: MATEKF405CTR, version: b020e572, date: 2022-01-16T20:04:31Z

start the command batch

batch start

reset configuration to default settings

defaults nosave

board_name MATEKF405CTR
manufacturer_id MTKS
mcu_id 0042001a5048500820393350
signature

resources

resource MOTOR 5 NONE
resource LED_STRIP 1 A15

feature

feature -SOFTSERIAL
feature GPS
feature LED_STRIP

serial

serial 0 4096 115200 57600 0 115200
serial 2 2048 115200 57600 0 115200
serial 3 2 115200 115200 0 115200

led

led 0 6,0::C:6
led 1 7,0::CB:1
led 2 8,0::CB:1
led 3 9,0::C:6

aux

aux 0 0 0 1100 2100 0 0
aux 1 1 2 900 1250 0 0
aux 2 2 2 1300 1700 0 0
aux 3 46 1 1200 2100 0 0
aux 4 13 1 1300 1700 0 0
aux 5 15 3 900 1500 0 0
aux 6 36 3 1300 2100 0 0

vtxtable

vtxtable bands 6
vtxtable channels 8
vtxtable band 1 BAND_A A FACTORY 5865 5845 5825 5805 5785 5765 5745 5725
vtxtable band 2 BAND_B B FACTORY 5733 5752 5771 5790 5999 5828 5847 5866
vtxtable band 3 BAND_E E FACTORY 5705 5685 5665 5645 5885 5905 5925 5945
vtxtable band 4 AIRWAVE F FACTORY 5740 5760 5780 5800 5820 5840 5860 5880
vtxtable band 5 RACEBAND R FACTORY 5658 5695 5732 5769 5806 5843 5880 5917
vtxtable band 6 LOWRACE L FACTORY 5362 5399 5436 5473 5510 5547 5584 5621
vtxtable powerlevels 4
vtxtable powervalues 14 26 29 32
vtxtable powerlabels 25 400 800 MAX

master

set dyn_notch_count = 1
set dyn_notch_q = 250
set dyn_notch_min_hz = 125
set dyn_notch_max_hz = 350
set acc_calibration = 65,95,-89,1
set align_mag = CW90FLIP
set mag_align_pitch = 1800
set mag_align_yaw = 900
set mag_hardware = AUTO
set mag_calibration = -429,-124,502
set rssi_channel = 10
set fpv_mix_degrees = 10
set serialrx_provider = IBUS
set blackbox_sample_rate = 1/2
set dshot_idle_value = 900
set dshot_bidir = ON
set motor_pwm_protocol = DSHOT300
set failsafe_procedure = GPS-RESCUE
set vbat_min_cell_voltage = 260
set vbat_warning_cell_voltage = 280
set yaw_motors_reversed = ON
set small_angle = 180
set gps_provider = UBLOX
set gps_sbas_mode = AUTO
set gps_ublox_use_galileo = ON
set gps_set_home_point_once = ON
set gps_rescue_initial_alt = 40
set gps_rescue_descent_dist = 100
set gps_rescue_ground_speed = 1500
set gps_rescue_throttle_max = 1800
set gps_rescue_ascend_rate = 300
set gps_rescue_throttle_hover = 1600
set gps_rescue_sanity_checks = RESCUE_SANITY_FS_ONLY
set gps_rescue_min_sats = 5
set gps_rescue_min_dth = 50
set gps_rescue_allow_arming_without_fix = ON
set gps_rescue_alt_mode = FIXED_ALT
set deadband = 5
set yaw_deadband = 5
set pid_process_denom = 2
set runaway_takeoff_prevention = OFF
set osd_warn_rssi = ON
set osd_vbat_pos = 2529
set osd_rssi_pos = 2522
set osd_link_quality_pos = 236
set osd_rssi_dbm_pos = 260
set osd_tim_1_pos = 2544
set osd_tim_2_pos = 2551
set osd_flymode_pos = 2489
set osd_throttle_pos = 2433
set osd_crosshairs_pos = 270
set osd_ah_pos = 2222
set osd_current_pos = 2535
set osd_mah_drawn_pos = 2503
set osd_gps_speed_pos = 2129
set osd_gps_lon_pos = 2097
set osd_gps_lat_pos = 2081
set osd_gps_sats_pos = 2512
set osd_home_dir_pos = 2510
set osd_home_dist_pos = 2135
set osd_flight_dist_pos = 2167
set osd_altitude_pos = 2120
set osd_warnings_pos = 2442
set osd_avg_cell_voltage_pos = 2497
set osd_battery_usage_pos = 8
set osd_rtc_date_time_pos = 392
set osd_core_temp_pos = 2113
set osd_efficiency_pos = 97
set osd_stat_tim_1 = ON
set osd_stat_max_dist = ON
set osd_stat_max_alt = ON
set osd_stat_bbox = OFF
set osd_stat_bb_no = OFF
set osd_stat_max_g_force = ON
set osd_stat_flight_dist = ON
set osd_gps_sats_show_hdop = ON
set debug_mode = GYRO_SCALED
set vtx_band = 5
set vtx_channel = 1
set vtx_power = 1
set vtx_low_power_disarm = UNTIL_FIRST_ARM
set vtx_freq = 5658
set gyro_1_align_yaw = 2700

profile 0

profile 0

set anti_gravity_gain = 10000
set iterm_relax_cutoff = 10
set p_pitch = 69
set i_pitch = 90
set d_pitch = 73
set f_pitch = 143
set p_roll = 63
set i_roll = 85
set d_roll = 67
set f_roll = 135
set p_yaw = 68
set i_yaw = 90
set f_yaw = 135
set level_limit = 35
set d_min_roll = 67
set d_min_pitch = 73
set simplified_pids_mode = OFF

profile 1

profile 2

restore original profile selection

profile 0

rateprofile 0

rateprofile 0

set rates_type = BETAFLIGHT
set roll_rc_rate = 110
set pitch_rc_rate = 110
set yaw_rc_rate = 170
set roll_expo = 10
set pitch_expo = 10
set yaw_expo = 5
set roll_srate = 72
set pitch_srate = 72
set yaw_srate = 75

rateprofile 1

rateprofile 2

rateprofile 3

rateprofile 4

rateprofile 5

restore original rateprofile selection

rateprofile 0

save configuration

save

Currently active IO resource assignments:
(reboot to update)
--------------------
A00: SERIAL_TX 4
A01: SERIAL_RX 4
A02: FREE
A03: SERIAL_RX 2
A04: FREE
A05: SPI_SCK 1
A06: SPI_MISO 1
A07: SPI_MOSI 1
A08: FREE
A09: SERIAL_TX 1
A10: FREE
A11: USB
A12: USB
A13: SWD
A14: LED 2
A15: LED_STRIP
B00: FREE
B01: FREE
B02: FREE
B03: SPI_SCK 3
B04: SPI_MISO 3
B05: SPI_MOSI 3
B06: I2C_SCL 1
B07: I2C_SDA 1
B08: FREE
B09: LED 1
B10: OSD_CS
B11: FREE
B12: FREE
B13: SPI_SCK 2
B14: SPI_MISO 2
B15: SPI_MOSI 2
C00: FREE
C01: SDCARD_CS
C02: GYRO_CS 1
C03: GYRO_EXTI
C04: ADC_CURR
C05: ADC_BATT
C06: MOTOR 1
C07: MOTOR 2
C08: MOTOR 3
C09: MOTOR 4
C10: SERIAL_TX 3
C11: FREE
C12: FREE
C13: BEEPER
C14: FREE
C15: FREE
D00: FREE
D01: FREE
D02: FREE
D03: FREE
D04: FREE
D05: FREE
D06: FREE
D07: FREE
D08: FREE
D09: FREE
D10: FREE
D11: FREE
D12: FREE
D13: FREE
D14: FREE
D15: FREE
E00: FREE
E01: FREE
E02: FREE
E03: FREE
E04: FREE
E05: FREE
E06: FREE
E07: FREE
E08: FREE
E09: FREE
E10: FREE
E11: FREE
E12: FREE
E13: FREE
E14: FREE
E15: FREE
F00: FREE
F01: FREE
F02: FREE
F03: FREE
F04: FREE
F05: FREE
F06: FREE
F07: FREE
F08: FREE
F09: FREE
F10: FREE
F11: FREE
F12: FREE
F13: FREE
F14: FREE
F15: FREE

Currently active Timers:
-----------------------
TIM1: FREE
TIM2:
    CH1: LED_STRIP
TIM3: FREE
TIM4: FREE
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM8:
    CH1: DSHOT_BITBANG 3
TIM9: FREE
TIM10: FREE
TIM11: FREE
TIM12: FREE
TIM13: FREE
TIM14: FREE

Currently active DMA:
--------------------
DMA1 Stream 0: FREE
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: FREE
DMA1 Stream 4: FREE
DMA1 Stream 5: LED_STRIP
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: ADC 1
DMA2 Stream 1: FREE
DMA2 Stream 2: DSHOT_BITBANG 3
DMA2 Stream 3: FREE
DMA2 Stream 4: FREE
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE



### Flight controller

Crazybeef4s and Matek F405CTR

### Other components

_No response_

### How are the different components wired up

_No response_

### Add any other context about the problem that you think might be relevant here

_No response_
@tn2009 tn2009 added the Template: Bug Set by auto_close_issue. label Mar 15, 2022
@haslinghuis
Copy link
Member

Please test with latest development firmware and report back.

@haslinghuis haslinghuis added BUG Bugs are excluded from automatically being marked as stale and removed Template: Bug Set by auto_close_issue. labels Apr 2, 2022
@tn2009
Copy link
Author

tn2009 commented Apr 3, 2022

Test latest development firmware and same. Communication with the receiver is constantly falling off.

@haslinghuis
Copy link
Member

Please provide information asked in Flight controller configuration

@haslinghuis
Copy link
Member

haslinghuis commented Apr 4, 2022

Please replace dump with diff as it's TL:DR
Also provide a resource show all

You can edit you're first comment for providing this information to keep this issue clean

@tn2009
Copy link
Author

tn2009 commented Apr 5, 2022

i update comment

@tn2009
Copy link
Author

tn2009 commented Apr 9, 2022

On BF 4.3 RC4 same issue!!!

@haslinghuis
Copy link
Member

haslinghuis commented Apr 9, 2022

Any information on the link in OSD?

Please test with #11509 which maybe will relax RX_LOSS.

https://dev.azure.com/Betaflight/Betaflight%20Nightlies/_build/results?buildId=6235&view=artifacts&pathAsName=false&type=publishedArtifacts

Select or detect your board in firmware flasher tab and use load firmware local button to select STM32F405 from the download.

@tn2009
Copy link
Author

tn2009 commented Apr 10, 2022

Installed about a minute later, the quadcopter began to beep. On OSD it is written "Rescue_SW"

Turning off and on the equipment does not help. Only disconnecting from the power supply of the quadcopter.

@haslinghuis
Copy link
Member

Rescue_SW indicates the rescue switch is in an unsafe position.
Please see this article for explanation of the beeping pattern: https://oscarliang.com/quad-arming-issue-fix/

@tn2009
Copy link
Author

tn2009 commented Apr 11, 2022

The switch is as it should be :) I repeat on 4.2.11 there are no problems. The problem is in firmware 4.3. I have a return home configured in case of disconnection with the receiver. I don't start the quadrocopter engines. I turn on the equipment, turn on the quadcopter. The equipment is connected to the quadrocopter receiver. I wait for about a minute and the signal breaks.

@ctzsnooze ctzsnooze changed the title BF4.3 RC3 communication with the equipment is constantly lost Flysky IBUS Flysky IBUS frequently loses Rx link after BF4.3 RC3 Apr 15, 2022
@ctzsnooze
Copy link
Member

ctzsnooze commented Apr 15, 2022

Please re-test with current master.
Configure the machine to not use GPS Return, ie set the Failsafe mode to Drop.
Test by looking out for 'RXLOSS' in the goggles, or the presence of a failsafe event.
You can arm on the ground with all the PIDs and antigravity set to zero, with props off, and spin the motors. If you get a failsafe then the motors will stop.
Please do not change any failsafe settings from default for this test.

@tn2009
Copy link
Author

tn2009 commented Apr 15, 2022

I tested latest dev version 15.04.2022. The same thing. The quadcopter is constantly losing communication. Only disconnecting and connecting the battery helps.

First I lost connect. Reconnected the battery, started and turned off the engine, after a few seconds the connection was lost and immediately restored. and after a few more seconds, connect got lost completely.

@tn2009
Copy link
Author

tn2009 commented Apr 15, 2022

So I tested the latest firmware again. On mobula 6 crazybeef4fs, the connection doesn't seem to be lost anymore. Nice!

As for the Matek F405CTR, what is the problem I found. I have an AI6B receiver and IBUS telemetry is enabled on the first port. Because of this, the connection is constantly lost. If I turn off IBUS telemetry, then everything seems to be fine with the connection and the problem does not repeat. On BF 4.2.11, the IBUS telemetry worked fine. Why then does IBUS telemetry not work on BF 4.3?

@haslinghuis haslinghuis changed the title Flysky IBUS frequently loses Rx link after BF4.3 RC3 Flysky IBUS telemetry does not work after BF4.3 RC3 Apr 15, 2022
@haslinghuis haslinghuis changed the title Flysky IBUS telemetry does not work after BF4.3 RC3 Flysky IBUS telemetry does not work on BF 4.3 Apr 15, 2022
@haslinghuis haslinghuis changed the title Flysky IBUS telemetry does not work on BF 4.3 Flysky IBUS telemetry does not work on 4.3 Apr 15, 2022
@klutvott123
Copy link
Member

klutvott123 commented Apr 15, 2022

I see. Looks like telemetry for IBUS is handled in the rx task. when telemetry is sent this would probably cause the task to take longer than expected to run
edit: not actual telemetry, but it uses telemetry to respond to requests of some sort

@klutvott123
Copy link
Member

@tn2009 Could you try this, please?
betaflight_4.3.0_STM32F405_norevision (2).zip

@haslinghuis haslinghuis added this to Bug Tracker in Finalizing Firmware 4.3 Release via automation Apr 15, 2022
@klutvott123
Copy link
Member

klutvott123 commented Apr 15, 2022

Looking at your diffs, it looks like you're using 1 wire communication. The port config looks a little strange.
I believe it should be

feature -TELEMETRY
serial 0 4160 115200 57600 115200 115200`

The difference when disabling telemetry output in the ports tab as you described is that it will not be using a shared port anymore for rx and telemetry. I bet if you look at the configuration tab you'll find that TELEMETRY is enabled. Try disabling it.
Can you provide the wiring information that was requested when you opened this issue?

@tn2009
Copy link
Author

tn2009 commented Apr 15, 2022

@tn2009 Could you try this, please? betaflight_4.3.0_STM32F405_norevision (2).zip

Same

@tn2009
Copy link
Author

tn2009 commented Apr 15, 2022

receiver ia6b one IBUS wire is connected to RX2 the second wire is connected to TX1.
it only works when telemetry is enabled in the configuration and there is an IBUS on the first port.
I don't understand why it worked fine on 4.2.11, but it doesn't work on 4.3.

@klutvott123
Copy link
Member

Reproduced. sort of. I'm using a flight controller with the rx/telemetry config just as yours with no receiver connected and it freezes on boot. In RC1 it works and RC2 freezes, so something went wrong there. I'll try narrowing it down further

@klutvott123
Copy link
Member

I have done some bisecting between RC1 and RC2 and this is the first bad commit it says 9bdf9c1

I have further narrowed it down to a call to rescheduleTask here

rescheduleTask(TASK_TELEMETRY, IBUS_TASK_PERIOD_US);

@klutvott123
Copy link
Member

The issue after the commit I referred to is that tasks is now uninitialized until tasksInit() runs at the end of init(). Everything else is initialized before that, including telemetry. In the check state function for IBUS there's the call to rescheduleTask which goes wrong since the tasks array hasn't been initialized yet.

@klutvott123
Copy link
Member

@tn2009 Hopefully this will work. Could you try it, please?
betaflight_4.3.0_STM32F405_norevision (3).zip

@tn2009
Copy link
Author

tn2009 commented Apr 16, 2022

@tn2009 Hopefully this will work. Could you try it, please? betaflight_4.3.0_STM32F405_norevision (3).zip

Finally!!! Fixed!
Within 10 minutes, there was not a single break in communication. Please add this fix to the main firmware of BF 4.3 RC6. Thank you very much!

@klutvott123
Copy link
Member

@tn2009 Great, thanks for testing!
I'll get a PR up to address this soon

@klutvott123
Copy link
Member

PR to fix this is up #11533

@tn2009 tn2009 closed this as completed Apr 16, 2022
Finalizing Firmware 4.3 Release automation moved this from Bug Tracker to Finished (Merged) Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Bugs are excluded from automatically being marked as stale
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants