I’m trying to start writing code to control a BLE module via my phone and I wrote it so the serial should print something after the bleperipheral setup is done so I can see that it’s working but nothing prints. The only thing that prints is the first thing I set it to write before the bleperipheral setup.
You print something. You do a bunch of stuff. You try to print again. Nothing appears. Why do you jump to any conclusion about which of the many things you do between prints is the culprit?
Print, do something, print. Then, you KNOW which something causes the issue.
When you know WHAT the issue is, you can fix that specific issue.
In general, a begin() method asks the instance to do something that involves the hardware. If begin() fails to return, it is because it is still waiting for the appropriate reply from the hardware.
You will probably need to add more Serial.print() statements to the BLEPeripheral class, specifically in the begin() method, to find out where it stops and waits.
Do you know what a library is, as far as the Arduino IDE is concerned?
No binary files that you can't read. Nothing but header files and source files that need to be compiled as part of your project.
So, if you have problems with a class, you have all the source code for that class. It isn't even read-only. You are free to edit it, to add Serial.print() statements here and there, for debugging purposes or to correct errors in the library.