Giter Site home page Giter Site logo

BST (TBS Crossfire) about msrc HOT 30 CLOSED

dgatf avatar dgatf commented on July 17, 2024
BST (TBS Crossfire)

from msrc.

Comments (30)

dgatf avatar dgatf commented on July 17, 2024

No plans yet. I'll take a look though

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

If then please take a look also here: pkurucz/opentelem_to_bst_bridge#2

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Which board do you plan to use? What sensors are you going to attach?

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Telemetry seems to be limited to gps, battery and attitude

It seems that there are 2 protocols. One I2C and other serial. I plan to implement I2C, which is very similar to Spektrum XBUS

from msrc.

dgatf avatar dgatf commented on July 17, 2024

It is unclear how BST (I2C) protocol works. Whether sensors should be connected to I2C in slave or master mode. I expect them to be connected as slave and wait for a poll, not as master as seems to be in the link you posted

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I plan to use Arduino board with APM32F103C. For me it would be the Rx supplying battery voltage enough. Yes, BST I2C is ok. Probably the board should be a slave and Crossfire master.

from msrc.

dgatf avatar dgatf commented on July 17, 2024

What is the APM32F103C for?

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

This one: https://www.aliexpress.com/item/4000807291937.html?spm=a2g0s.9042311.0.0.5a134c4dOWpE5i

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Here is the branch with BST support

This first attempt is with I2C as slave

Flash as is. You need to connect BST SDA, SCL, and GND to arduino A4, A5 and GND respectively (don't connect Vcc between BST and Arduino as you will need to debug, so it will be feed from USB or USB-TTL, depending on your Arduino board). You don't need to connect any sensor yet. Debug is enabled. It will try to send telemetry for battery and gps. I'd be surprised if this works at first. Post the output of the arduino with a serial monitor at 115200

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

Thanks a lot, I will try it, but unfortunately the Ardu board still did not arrive. Then I will let you know.

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

Do you think it will work also on this board? https://www.banggood.com/Wholesale-ATMEGA328-328p-5V-16MHz-Pro-Mini-PCB-Module-Board-p-68534.html?rmmds=myorder&cur_warehouse=CN Two of them I have at home.

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Yes, that's a good choice (unless you plan to use a castle esc or esc serial + gps serial). It's cheap and light

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I checked it, but it seems it does not work. No new sensors in telemetry, only those from the Rx itself. I do not know, how to display output from Arduino with serial monitor, I am not familiar with Arduino IDE. I can only flash the board by it. Please, advice.
I plan to use this board with Arkbird FC, which GPS already has and I am using only simple ESC.
TBS Ardu
OpenTX

from msrc.

dgatf avatar dgatf commented on July 17, 2024

I'd suggest to solder angled pins for easy fashing and debug with serial monitor. See image. But be can try this without debugging

To confirm you are flashing the correct branch, please could you confirm that line 240 in msrc.cpp is DEBUG_SERIAL.println("BST");

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I do not understand to what I should connect the board - to the board FTDI232 with USB converter, which I used for flashing? Do not know for what are the wires on the picture...
Yes, I can confirm the right line 240 in msrc.cpp

from msrc.

dgatf avatar dgatf commented on July 17, 2024

I've made some fixes to the bst branch. There was a bug on the crc

Please try with the updated code

Let me know if it works. If it doesn't I'll change the code to broadcast as a master on the i2c

Yes, for debug you have to connect only two wires: arduino-tx to ftdi-rx and arduino-gnd to ftdi-gnd (as well as bst on the other side)

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I tried, but still only that old 10 sensors is there. The difference is, that the red LED on the Ardu board is not blinking now.
I can try to debug somehow. Please, send me the instructions, how to do.

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Ok. Then try with this branch bst_master

The telemetry is send by I2C master broadcast

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I am sorry, but still the same :-(

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

Daniel, any idea, how to proceed? In the Eagletree Vector project they are using pull-up resistors due to weak rise time at 328P. But do not understand, why are resistors connected to A2, A3 and not to Vcc. I tried A2, A3, but no change in behavior. Tomorrow I will check the signal by oscilloscope.

from msrc.

dgatf avatar dgatf commented on July 17, 2024

why are resistors connected to A2, A3 and not to Vcc

It would be the same. I believe it is used A2, A3 for easier soldering. To use A2, A3, it is needed to enable pins as output and set them high (lines 167-170, bst_telemetry.cpp)

Yes, you can try with external pull ups, either Vcc or analog pins, to discard signal issues

Another check would be to debug as explained

If I have some time, I'll check if the data send by msrc equals to the other project

from msrc.

dgatf avatar dgatf commented on July 17, 2024

There was an issue with the crc. Fixed. Now is sending same crc as bst_bridge project, but it is not aligned with betaflight crc. If this doesn't work I'm afraid I won't be working on it any more as this protocol is not well documented

I've updated the two branches, slave and master

Try both, hopefully it works

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

With the last (master) version it arrived signal on the outputs. With the previous versions not. But no new sensors in the telemetry, still only that old 10 from the receiver. Signals SCL, SDA on pictures:
SCL
SDA

Current setup:
Atmega328P_con

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Crc is correct (verified with betaflight) and it is emitting the same as bst bridge. Your circuit seems ok

As last attempt, I've made minor changes to bst_master. Try it

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

Still no new sensors:

Telemetry

When flashing I am opening file msrc.ino and program uses only 22% of memory. Is it ok?

Arduino IDE

Please, what should I launch and what should I see in the Arduino IDE, when I will connect it for debugging?

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Yes, program size is correct

You have to open Tools->Serial Monitor and set baud rate to 115200. Do not connect Vcc between programmer and arduino as is already powered from the receiver

You should see

V0.8.0
BST MASTER
8 0 7B 0 7B 0 0 0 0 86 
8 0 7B 0 7B 0 0 0 0 86

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I can confirm, it is like you described:

IDE_debug

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

I tried to use a Frsky receiver R-XSR and with S.PORT it is working well. But by Crossfire the lua script is still trying to connect:

Lua

Please, is the 0.8 version ok?
On your page you mention: The default sensor id is 10. Is it ok, if the current number of sensors for Crossfire is 10?

from msrc.

dgatf avatar dgatf commented on July 17, 2024

Lua script works with smartport only

from msrc.

Giorgo961 avatar Giorgo961 commented on July 17, 2024

ah, ok

from msrc.

Related Issues (20)

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.