Hi,
i am experimenting with the MSP430F5438A + PAN1326 + Android Phone + Bluetopia + SPPDemo
everything works fine so far with the debug-console and i already implemented some adoptions to the code:
i managed autopairing, store/read a link-key to flash memory and so on...
now i tried to run some commands automatically one after each other, but i cannot solve the problem:
i entered a new command "test" at the debug-console to open a new method:
void Test(){
ClientMode();
ReadKeyFromFlashToSystem();
OpenRemoteServer();
Write();
CloseRemoteServer();}
i hope it is clear what this program should do:
change to client mode, read the stored linkkeys, open the port to the server, write a string and finally close the server!
when i run those methods step by step at the debug-console everything works fine!!! no problems!
but when the comands shall be called automatically by my method it throws an error...
i think i already found out the problem with debugging:
it seems to me, that no event-callbacks occur between the commands!?
so it tries to write the string before the etPort_Open_Confirmation - Event is called.
i also tried to put delays between the commands, but this doesnt help!?
i also tried to put a while(connected!=true), but this loops forever, because the Event never comes...
so the question is, where shall i place the code, or how shall i call those methods that there is time in between for the events?!? interrupts? the scheduler?
thanks for your help!