Coder Social home page Coder Social logo

blheli-passthrough's Introduction

BlHeli-Passthrough

Arduino Library and Examples for BlHeli Passtrough with RP2040, ESP32 or Atmega328P (Arduino UNO, Pro Mini, ...)

Sketch for BlHeli Passthrough without Flight Controller Just for BlHeli32 or AM32 and all other imARM_BLB ESC's

ESP32

  • Default Servo Signal Pin: GPIO16
  • Please edit the #define ESC_RX in ESC_Serial.cpp to choose another Pin

needed Libraries for ESP32 use

all Libraries are available in Arduino Library Manager

RP2040

  • You can set up to 8 pins for 8 ESCs, the usage is documented in rp2040.ino
  • I found this core to be the best for the RP2040, but others will likely work too without modification
  • No external libraries needed

Atmega328P

  • Default Pins: Servo RX = GPIO11; Servo TX = GPIO 10

  • connect Servo Signal to Servo RX (11)

  • connect 1k Resistor between Servo RX (11) and Servo TX (10)

  • Please edit the #define ESC_RX and ESC_TX in ESC_Serial.cpp to choose other Pins

You have to Change SoftwareSerial RX Buffer Size in:

  • Windows: C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\libraries\SoftwareSerial\src
  • MaxOS: /Users/{username}/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/SoftwareSerial/src

Change #define _SS_MAX_RX_BUFF 64 to 300 in SoftwareSerial.h

BlHeli Configurator Firmware Flashing doesn't work (Keep Alive Bug in Configurator) -> should be fixed already

ESC

blheli-passthrough's People

Contributors

bastian2001 avatar brushlesspower avatar ericlangel avatar theely avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

blheli-passthrough's Issues

issue with ble_comm and device initflach

deviceinitflash:

Rx_Buf[8] == Success -> sometime it can be Byte 9

if(RX_Buf[RX_Size-1] == brSUCCESS){
//ESC_OK = true;
buf[5] = RX_Buf[5]; // Device Signature2?
buf[6] = RX_Buf[4]; // Device Signature1?
buf[7] = RX_Buf[3]; // "c"?
buf[8] = imARM_BLB; // 4-Way Mode: ARMBLB = 0x04
buf[9] = ACK_OK; // ACK

sometime i have the problem that
if((ble_rx[0] == 0x2F) && (ble_rx_counter == ble_buffer_len))
is not true....but it is

error: ble_rx_counter is set to 0
why?
should be investigated

Cannot Connect to blheli_s?

Hey, I'm having trouble getting this to work. I'm using BLHeli_s ESCs, which I don't see mentioned as supported, but if you're doing passthrough they should be the same right? I tried both an ESP32 with CP210x and an Arduino Nano with CH340. Arduino version is 1.8.12

The Arduino Nano works with the blheli 4 way firmware, so I know the arduino and drivers are good. I followed all the instructions in the readme. When I hit connect in BLHeliSuite, I get the error Connect to Flightcontroler failed! ESC-Configurator.com is also not able to connect.

The ESP-32 I am able to connect, but it throws the error Failed to set interface to appropriate mode!. If I hit Read Setup, it is able to detect that there is an ESC connected, but cannot read the firmware version or any details. In ESC-Configurator.com, I am similarly able to connect but not read any ESC data. Here's the log:

2022/02/08 05:10:12: Port selected
2022/02/08 05:10:13: Opened serial port
2022/02/08 05:10:14: MSP command failed: Timed out after 1000ms
2022/02/08 05:10:14: Port already in use by another application - try re-connecting
2022/02/08 05:10:14: TX: cmd_InterfaceExit - 0x0 
2022/02/08 05:10:49: Opened serial port
2022/02/08 05:10:49: MultiWii API version received: 1.42.0
2022/02/08 05:10:49: Flight controller info, identifier: BTFL version: 4.1.0
2022/02/08 05:10:49: Running firmware released on:  
2022/02/08 05:10:49: Board: BPMC, version: 0
2022/02/08 05:10:49: Unique device ID received - 0x0000
2022/02/08 05:10:51: MSP command failed: Timed out after 1000ms
...
2022/02/08 05:10:57: MSP command failed: Timed out after 1000ms
2022/02/08 05:10:59: Trying to read 1 ESCs
2022/02/08 05:10:59: TX: cmd_DeviceInitFlash - 0x0 
2022/02/08 05:10:59: Failed processing command cmd_DeviceInitFlash after 0 retries. 
2022/02/08 05:10:59: Failed reading ESC 1
2022/02/08 05:10:59: Error: Message not OK 

Any ideas? I'll give BLHeli_32 ESCs a try when they arrive.

4-W DeviceReset -> ESC Response

4Way Command DeviceReset

send's 0x00 0x00 0x00 0x00 to the ESC
normally there should be no response from ESC

But....
if you use BlHeli_32 Suite with AM32 Firmware you get C1 (unknown command) from AM32 ESC

so there should be a buffer clean

RP2040 porting issues

I am trying to port the ESP code (minus BLE) over to an RP2040 so I can configure ESCs through my own FC. I am using the Programmable IO hardware of the RP2040. I wrote some code (pioWrite, pioRead and pioEnableTX) to make the pin do proper halfduplex UART at 19200 Baud. I verified my code works correct within a basic Serial passthrough, but when I use the same functions in SendESC and GetESC, I cannot get any response from the ESC. Is there anything special about the halfduplex serial? I am getting an "unkwown error" by BLHeliSuite32 when I try to read the settings from the ESC (connecting works well):
grafik
grafik

BLHeliSuite32 Flashing doesn't seem to work

Using BLHeliSuite32 32.9.0.3 or above, attempting to flash gives an error - "Checked Verify function: FAILED"

Not sure what to make of it, as the verify function is in fact there (albeit just returning success no matter what)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.