Dec 17, 2025 Replies: 3 Hi all, Here is a simple mod of the excellent @wonder Generic Gamepad Support. It offers the possibility to convert a DJI motion controller (used for my Avata drone) into a "regular joystick" Difficulty was only to convert the "raw" controller's values into a regular yaw/pitch/roll control. See all the story here : DJI motion controller used as a regular joystick Now what I am looking for is a way to embed the same code into an ESP32-S3 device acting with USB host capacbilities (currently the HID library crashes when connecting the motion controller) To test my joystick "outside the Android phone", I wondered if it would be possible, using B4A to expose a BLE joystick ? I have searched the forum but didn't find such a program. Click to expand...
Hi all, Here is a simple mod of the excellent @wonder Generic Gamepad Support. It offers the possibility to convert a DJI motion controller (used for my Avata drone) into a "regular joystick" Difficulty was only to convert the "raw" controller's values into a regular yaw/pitch/roll control. See all the story here : DJI motion controller used as a regular joystick Now what I am looking for is a way to embed the same code into an ESP32-S3 device acting with USB host capacbilities (currently the HID library crashes when connecting the motion controller) To test my joystick "outside the Android phone", I wondered if it would be possible, using B4A to expose a BLE joystick ? I have searched the forum but didn't find such a program.
freedom2000 Well-Known Member Licensed User Longtime User Dec 17, 2025 #2 I even added a UDP transmission of computed angles yaw/pitch/roll + trhottle to an ESP32 using UDP. The ESP32 exposes a BLE joystick (I don't know how to do this with B4A...) Then this joystick is visible by Windows (but not by my Phoenix Simulator) So final flowchart is (over engineered !) control : DJI MotionController (IMU high accuracy) connection : USB host process : Android (Raw data conversion). network : UDP Unicast with broadcast discovery (zero config, minimal latency). Payload : JSON (compacted) Output : ESP32 BLE Gamepad decoding : PC USB HID virtual joystick (details here : https://hackaday.io/project/204638-a-bluetooth-joystick-for-tx16s-radio-or-others) running: PhoenixRC launcher flying : Phoenix RC controlled by the eggplant ! Last edited: Dec 18, 2025
I even added a UDP transmission of computed angles yaw/pitch/roll + trhottle to an ESP32 using UDP. The ESP32 exposes a BLE joystick (I don't know how to do this with B4A...) Then this joystick is visible by Windows (but not by my Phoenix Simulator) So final flowchart is (over engineered !) control : DJI MotionController (IMU high accuracy) connection : USB host process : Android (Raw data conversion). network : UDP Unicast with broadcast discovery (zero config, minimal latency). Payload : JSON (compacted) Output : ESP32 BLE Gamepad decoding : PC USB HID virtual joystick (details here : https://hackaday.io/project/204638-a-bluetooth-joystick-for-tx16s-radio-or-others) running: PhoenixRC launcher flying : Phoenix RC controlled by the eggplant !
Erel B4X founder Staff member Licensed User Longtime User Dec 18, 2025 #3 Very impressive! freedom2000 said: The ESP32 exposes a BLE joystick (I don't know how to do this with B4A...) Click to expand... Do you want the android device to act as a BLE HID device? Not sure that it is possible.
Very impressive! freedom2000 said: The ESP32 exposes a BLE joystick (I don't know how to do this with B4A...) Click to expand... Do you want the android device to act as a BLE HID device? Not sure that it is possible.
freedom2000 Well-Known Member Licensed User Longtime User Dec 18, 2025 #4 Erel said: Very impressive! Do you want the android device to act as a BLE HID device? Not sure that it is possible. Click to expand... Thanks @Erel and yes I wanted to try this to avoid this long chain with the ESP32 in the middle ! But I haven't found this in the B4A forum !
Erel said: Very impressive! Do you want the android device to act as a BLE HID device? Not sure that it is possible. Click to expand... Thanks @Erel and yes I wanted to try this to avoid this long chain with the ESP32 in the middle ! But I haven't found this in the B4A forum !