{"action":"created","issue":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1300","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1300/labels{/name}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1300/comments","events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1300/events","html_url":"https://github.com/cleanflight/cleanflight/issues/1300","id":105584834,"number":1300,"title":"Flight controller hangs using bluetooth","user":{"login":"histoplasmosis","id":14198255,"avatar_url":"https://avatars.githubusercontent.com/u/14198255?v=3","gravatar_id":"","url":"https://api.github.com/users/histoplasmosis","html_url":"https://github.com/histoplasmosis","followers_url":"https://api.github.com/users/histoplasmosis/followers","following_url":"https://api.github.com/users/histoplasmosis/following{/other_user}","gists_url":"https://api.github.com/users/histoplasmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/histoplasmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/histoplasmosis/subscriptions","organizations_url":"https://api.github.com/users/histoplasmosis/orgs","repos_url":"https://api.github.com/users/histoplasmosis/repos","events_url":"https://api.github.com/users/histoplasmosis/events{/privacy}","received_events_url":"https://api.github.com/users/histoplasmosis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cleanflight/cleanflight/labels/invalid","name":"invalid","color":"dddddd"},{"url":"https://api.github.com/repos/cleanflight/cleanflight/labels/support","name":"support","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-09T12:20:11Z","updated_at":"2015-09-10T07:57:48Z","closed_at":"2015-09-09T17:38:18Z","body":"While switching to a naze32 full board from multiwii and hooking up my hc-05 bluetooth adapter, I noticed weird hanging behavior using ez-gui set for cleanflight. I don't have a PC with bluetooth to test via cleanflight configurator.\r\n\r\nTo reproduce:\r\nHook up bluetooth via uart1 or uart2 power up quadcopter.  You can pair via bluetooth but will not receive any data unless flight controller is armed. If you try to pair while the flight controller is disarmed, the board will lock and you cannot re-arm via transmitter. All three lights come on the board red green and blue and stay lit.\r\n\r\nI've tried various baud rate settings for bluetooth (115200 - 9600) as well as uart1 vs uart2 and can recreate the problem consistently. My bluetooth dongle is known working and tested on a multiwii fc as well as sending and receiving AT commands to the device. GPS disconnected and enabled vs. disabled has no effect.\r\n\r\nAttached below is a full dump:\r\n\r\n# dump\r\n\r\n# version\r\n# Cleanflight/NAZE 1.9.0 May 31 2015 / 13:17:47 (98f7549)\r\n# dump master\r\n\r\n# mixer\r\nmixer QUADX\r\n\r\n\r\n# feature\r\nfeature -RX_PPM\r\nfeature -VBAT\r\nfeature -INFLIGHT_ACC_CAL\r\nfeature -RX_SERIAL\r\nfeature -MOTOR_STOP\r\nfeature -SERVO_TILT\r\nfeature -SOFTSERIAL\r\nfeature -GPS\r\nfeature -FAILSAFE\r\nfeature -SONAR\r\nfeature -TELEMETRY\r\nfeature -CURRENT_METER\r\nfeature -3D\r\nfeature -RX_PARALLEL_PWM\r\nfeature -RX_MSP\r\nfeature -RSSI_ADC\r\nfeature -LED_STRIP\r\nfeature -DISPLAY\r\nfeature -ONESHOT125\r\nfeature -BLACKBOX\r\nfeature VBAT\r\nfeature MOTOR_STOP\r\nfeature FAILSAFE\r\nfeature RX_PARALLEL_PWM\r\n\r\n\r\n# map\r\nmap AETR1234\r\n\r\n\r\n# serial\r\nserial 0 1 115200 57600 0 115200\r\nserial 1 2 115200 115200 0 115200\r\n\r\n\r\n# led\r\nled 0 15,15:ES:IA:0\r\nled 1 15,8:E:WF:0\r\nled 2 15,7:E:WF:0\r\nled 3 15,0:NE:IA:0\r\nled 4 8,0:N:F:0\r\nled 5 7,0:N:F:0\r\nled 6 0,0:NW:IA:0\r\nled 7 0,7:W:WF:0\r\nled 8 0,8:W:WF:0\r\nled 9 0,15:SW:IA:0\r\nled 10 7,15:S:WF:0\r\nled 11 8,15:S:WF:0\r\nled 12 7,7:U:WF:0\r\nled 13 8,7:U:WF:0\r\nled 14 7,8:D:WF:0\r\nled 15 8,8:D:WF:0\r\nled 16 8,9::R:3\r\nled 17 9,10::R:3\r\nled 18 10,11::R:3\r\nled 19 10,12::R:3\r\nled 20 9,13::R:3\r\nled 21 8,14::R:3\r\nled 22 7,14::R:3\r\nled 23 6,13::R:3\r\nled 24 5,12::R:3\r\nled 25 5,11::R:3\r\nled 26 6,10::R:3\r\nled 27 7,9::R:3\r\nled 28 0,0:::0\r\nled 29 0,0:::0\r\nled 30 0,0:::0\r\nled 31 0,0:::0\r\n\r\n\r\n# color\r\ncolor 0 0,0,0\r\ncolor 1 0,255,255\r\ncolor 2 0,0,255\r\ncolor 3 30,0,255\r\ncolor 4 60,0,255\r\ncolor 5 90,0,255\r\ncolor 6 120,0,255\r\ncolor 7 150,0,255\r\ncolor 8 180,0,255\r\ncolor 9 210,0,255\r\ncolor 10 240,0,255\r\ncolor 11 270,0,255\r\ncolor 12 300,0,255\r\ncolor 13 330,0,255\r\ncolor 14 0,0,0\r\ncolor 15 0,0,0\r\n\r\nset looptime = 3500\r\nset emf_avoidance = 0\r\nset mid_rc = 1500\r\nset min_check = 1100\r\nset max_check = 1900\r\nset rssi_channel = 0\r\nset rssi_scale = 30\r\nset rssi_ppm_invert = 0\r\nset input_filtering_mode = 0\r\nset min_throttle = 1150\r\nset max_throttle = 1850\r\nset min_command = 1000\r\nset servo_center_pulse = 1500\r\nset 3d_deadband_low = 1406\r\nset 3d_deadband_high = 1514\r\nset 3d_neutral = 1460\r\nset 3d_deadband_throttle = 50\r\nset motor_pwm_rate = 400\r\nset servo_pwm_rate = 50\r\nset retarded_arm = 0\r\nset disarm_kill_switch = 1\r\nset auto_disarm_delay = 5\r\nset small_angle = 25\r\nset flaps_speed = 0\r\nset fixedwing_althold_dir = 1\r\nset reboot_character = 82\r\nset gps_provider = 1\r\nset gps_sbas_mode = 2\r\nset gps_auto_config = 1\r\nset gps_auto_baud = 0\r\nset serialrx_provider = 0\r\nset spektrum_sat_bind = 0\r\nset telemetry_switch = 0\r\nset telemetry_inversion = 0\r\nset frsky_default_lattitude =  0.000\r\nset frsky_default_longitude =  0.000\r\nset frsky_coordinates_format = 0\r\nset frsky_unit = 0\r\nset frsky_vfas_precision = 0\r\nset hott_alarm_sound_interval = 5\r\nset battery_capacity = 0\r\nset vbat_scale = 110\r\nset vbat_max_cell_voltage = 43\r\nset vbat_min_cell_voltage = 33\r\nset vbat_warning_cell_voltage = 35\r\nset current_meter_scale = 400\r\nset current_meter_offset = 0\r\nset multiwii_current_meter_output = 0\r\nset current_meter_type = 1\r\nset align_gyro = 0\r\nset align_acc = 0\r\nset align_mag = 0\r\nset align_board_roll = 0\r\nset align_board_pitch = 0\r\nset align_board_yaw = 0\r\nset max_angle_inclination = 500\r\nset gyro_lpf = 42\r\nset moron_threshold = 32\r\nset gyro_cmpf_factor = 600\r\nset gyro_cmpfm_factor = 250\r\nset yaw_control_direction = 1\r\nset pid_at_min_throttle = 1\r\nset yaw_direction = 1\r\nset yaw_jump_prevention_limit = 200\r\nset tri_unarmed_servo = 1\r\nset servo_lowpass_freq = 400\r\nset servo_lowpass_enable = 0\r\nset failsafe_delay = 10\r\nset failsafe_off_delay = 200\r\nset failsafe_throttle = 1000\r\nset rx_min_usec = 985\r\nset rx_max_usec = 2115\r\nset acc_hardware = 0\r\nset mag_hardware = 0\r\nset blackbox_rate_num = 1\r\nset blackbox_rate_denom = 1\r\nset blackbox_device = 0\r\n\r\n# dump profile\r\n\r\n# profile\r\nprofile 0\r\n\r\n# aux\r\naux 0 1 0 1700 2100\r\naux 1 2 1 1700 2100\r\naux 2 0 0 900 900\r\naux 3 0 0 900 900\r\naux 4 0 0 900 900\r\naux 5 0 0 900 900\r\naux 6 0 0 900 900\r\naux 7 0 0 900 900\r\naux 8 0 0 900 900\r\naux 9 0 0 900 900\r\naux 10 0 0 900 900\r\naux 11 0 0 900 900\r\naux 12 0 0 900 900\r\naux 13 0 0 900 900\r\naux 14 0 0 900 900\r\naux 15 0 0 900 900\r\naux 16 0 0 900 900\r\naux 17 0 0 900 900\r\naux 18 0 0 900 900\r\naux 19 0 0 900 900\r\n\r\n# adjrange\r\nadjrange 0 0 0 900 900 0 0\r\nadjrange 1 0 0 900 900 0 0\r\nadjrange 2 0 0 900 900 0 0\r\nadjrange 3 0 0 900 900 0 0\r\nadjrange 4 0 0 900 900 0 0\r\nadjrange 5 0 0 900 900 0 0\r\nadjrange 6 0 0 900 900 0 0\r\nadjrange 7 0 0 900 900 0 0\r\nadjrange 8 0 0 900 900 0 0\r\nadjrange 9 0 0 900 900 0 0\r\nadjrange 10 0 0 900 900 0 0\r\nadjrange 11 0 0 900 900 0 0\r\n\r\n# servo\r\nservo 0 1020 2000 1500 30 -1\r\nservo 1 1020 2000 1500 30 -1\r\nservo 2 1020 2000 1500 100 -1\r\nservo 3 1020 2000 1500 100 -1\r\nservo 4 1020 2000 1500 100 -1\r\nservo 5 1020 2000 1500 100 -1\r\nservo 6 1020 2000 1500 100 -1\r\nservo 7 1020 2000 1500 100 -1\r\nservo 8 1020 2000 1500 100 -1\r\nservo 9 1020 2000 1500 100 -1\r\n\r\nset gps_pos_p = 15\r\nset gps_pos_i = 0\r\nset gps_pos_d = 0\r\nset gps_posr_p = 34\r\nset gps_posr_i = 14\r\nset gps_posr_d = 53\r\nset gps_nav_p = 25\r\nset gps_nav_i = 33\r\nset gps_nav_d = 83\r\nset gps_wp_radius = 200\r\nset nav_controls_heading = 1\r\nset nav_speed_min = 100\r\nset nav_speed_max = 300\r\nset nav_slew_rate = 30\r\nset alt_hold_deadband = 40\r\nset alt_hold_fast_change = 1\r\nset deadband = 0\r\nset yaw_deadband = 0\r\nset throttle_correction_value = 0\r\nset throttle_correction_angle = 800\r\nset default_rate_profile = 0\r\nset gimbal_flags = 1\r\nset acc_lpf_factor = 4\r\nset accxy_deadband = 40\r\nset accz_deadband = 40\r\nset accz_lpf_cutoff =  5.000\r\nset acc_unarmedcal = 1\r\nset acc_trim_pitch = 0\r\nset acc_trim_roll = 0\r\nset baro_tab_size = 21\r\nset baro_noise_lpf =  0.600\r\nset baro_cf_vel =  0.985\r\nset baro_cf_alt =  0.965\r\nset mag_declination = -860\r\nset pid_controller = 1\r\nset p_pitch = 40\r\nset i_pitch = 30\r\nset d_pitch = 23\r\nset p_roll = 40\r\nset i_roll = 30\r\nset d_roll = 23\r\nset p_yaw = 85\r\nset i_yaw = 45\r\nset d_yaw = 0\r\nset p_pitchf =  2.500\r\nset i_pitchf =  0.600\r\nset d_pitchf =  0.060\r\nset p_rollf =  2.500\r\nset i_rollf =  0.600\r\nset d_rollf =  0.060\r\nset p_yawf =  8.000\r\nset i_yawf =  0.500\r\nset d_yawf =  0.050\r\nset level_horizon =  3.000\r\nset level_angle =  5.000\r\nset sensitivity_horizon = 75\r\nset p_alt = 50\r\nset i_alt = 0\r\nset d_alt = 0\r\nset p_level = 90\r\nset i_level = 10\r\nset d_level = 100\r\nset p_vel = 120\r\nset i_vel = 45\r\nset d_vel = 1\r\nset yaw_p_limit = 500\r\n\r\n# dump rates\r\n\r\n# rateprofile\r\nrateprofile 0\r\n\r\nset rc_rate = 90\r\nset rc_expo = 65\r\nset rc_yaw_expo = 0\r\nset thr_mid = 50\r\nset thr_expo = 0\r\nset roll_rate = 0\r\nset pitch_rate = 0\r\nset yaw_rate = 0\r\nset tpa_rate = 0\r\nset tpa_breakpoint = 1500\r\n\r\n# \r\n"},"comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments/139152733","html_url":"https://github.com/cleanflight/cleanflight/issues/1300#issuecomment-139152733","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1300","id":139152733,"user":{"login":"histoplasmosis","id":14198255,"avatar_url":"https://avatars.githubusercontent.com/u/14198255?v=3","gravatar_id":"","url":"https://api.github.com/users/histoplasmosis","html_url":"https://github.com/histoplasmosis","followers_url":"https://api.github.com/users/histoplasmosis/followers","following_url":"https://api.github.com/users/histoplasmosis/following{/other_user}","gists_url":"https://api.github.com/users/histoplasmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/histoplasmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/histoplasmosis/subscriptions","organizations_url":"https://api.github.com/users/histoplasmosis/orgs","repos_url":"https://api.github.com/users/histoplasmosis/repos","events_url":"https://api.github.com/users/histoplasmosis/events{/privacy}","received_events_url":"https://api.github.com/users/histoplasmosis/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T07:57:48Z","updated_at":"2015-09-10T07:57:48Z","body":"Solved via configuring bluetooth module with AT+ENABLEIND=0\r\n"}}