Hi, I have been reading about this memory fragmentation thing since I started playing with Arduino and have been trying to avoid its use ever since.
But now that the required functionality works I can concentrate on the conversion and any problem will be resulting from the "optimizations" I try.
I will start by trying by myself, there is a lot to learn by trial and error.
Just as I did here, before coming to this forum for help I tried myself and your tip on
char* btPass = "\"2222\"";
was pivotal, I understood the HC-06 would require the qutes on the new pass although when you set AT+NAME: quotes are not required.
Engineers could have made things easier by requiring quotes either everywhere or nowhere.
Then I had problems dealing with the equivalent of the trim() on char arrays and decided to concentrate on my main problem to latter deal with optimization.
Well, thanks again for your support and patience.
Regards
Paulo Borges