schoolpost / BlueMagic32

Arduino ESP32 Library for connecting to Blackmagic Cameras using Bluetooth Low Energy.
GNU Lesser General Public License v2.1
93 stars 17 forks source link

No reconnect! #20

Open Adrian-Hilmmer opened 5 months ago

Adrian-Hilmmer commented 5 months ago

Hey guys,

as mentioned by others in older treads I have also noticed more problems with BlueMagic32. I can just establish the first connection between my controler(atom lite or atom S3 lite) and everything works fine, but after power loss the controller and bmpcc4K do not reconnect.

Also I have no idea where I can download the old version of the ESP32 library, to test if this is causing problems. From what I have read there are also people that have the same problem even with 1.0.4 / 1.0.5 so I think this is not the trigger.

Would there be a fix? Will BlueMagic32 still be developed? @schoolpost any news?

schoolpost commented 5 months ago

Hi @Adrian-Hilmmer,

I am unable to commit the time necessary to address the various issues that have accumulated over time. This paired with the fact that Blackmagic is also constantly updating the way their API functions / behaves makes it difficult to maintain a stable / bug free experience.

I do not rely upon the functionalities of this code nearly as much as I once did in the past, I understand for some that may not be the case and Bluemagic32 has been a helpful addition to their workflows.

In the past number of years that this project has been available, there have basically been no contributions by the community to address any issues.

If you or a group of others want to sponsor my time to investigate and to do more development, that may be an avenue I can consider... otherwise, the state development is what it is, for the moment.

spusuf commented 1 month ago

You can force a reconnect by changing your setup to contain:

void setup()
{
  Serial.begin(115200);
  BMDConnection.begin("BlueMagic32");
  BMDConnection.clearPairing();
  BMDControl = BMDConnection.connect();
}

The clearPairing line resets the remembered bluetooth connection somewhere within the memory, but you will need to pair again. This is with the latest ESP Library and latest Arduino IDE

Adrian-Hilmmer commented 1 month ago

Thanks for the reply @spusuf,

the problem is that the first established connection is not remembered. I dont want to clear the connection I would like the arduino to reconnect to the cam as it did a while ago. Without this line "BMDConnection.clearPairing();" the connection should be remembered but after power loss on the arduino or ca there is no reconnect. I need to connect the PC and connect via the serial print panel. This makes the controller completly useless. When I compiled my script before with the old libraries it worked fine, but with the new ESP Library it does not.

Have you disconnected the power of you arduino and reconnected it? Do it automatically reconnect to the cam?

You can force a reconnect by changing your setup to contain:

void setup()
{
  Serial.begin(115200);
  BMDConnection.begin("BlueMagic32");
  BMDConnection.clearPairing();
  BMDControl = BMDConnection.connect();
}

The clearPairing line resets the remembered bluetooth connection somewhere within the memory, but you will need to pair again. This is with the latest ESP Library and latest Arduino IDE

spusuf commented 1 month ago

the problem is that the first established connection is not remembered. I dont want to clear the connection I would like the arduino to reconnect to the cam as it did a while ago.

Yes, I understand but it seems to be the only way to get this library working for the time being. I'll continue trying to understand the library to get functions working again, but I'm not that fluent in C++ so don't expect magic.

On the brighter side the identifiers, "characteristics", and connection mechanism are all standard BLE and you can connect to it using a BLE viewer app to view the parameters.

I might just pivot into making a flutter app instead of a controller.