Another frustrating late night. It was mostly working for a while, but tapping the serial port between the RN4020 and the PIC32, caused the RN4020 initialization data not to be transferred, consistently. I can only suspect that the 6 inch wire to the RS232-USB converter is causing the problem.
It was the most stable with the PICKit3 attached. Which is a change from previous testing. One item I am becoming more convinced about is the issue is related to order of execution and/or timing. The PICKit3 effect (good or bad) is an indication of timing. I have been looking very carefully at order of execution. One item I noticed is that I was trying to send debug info through the USB connection, before there was a connection. In the PIC18F implementations, this was not a problem, since the executive loop did not execute that portion until the USB was connected. That is now fixed. But I suspect there are still other order of execution issues and timing issues.
Finally there are issues with decoding the BT commands. For whatever reason the RN4020 is assigning different handles to the different characteristics. I need to go back and review all of the BT products and see what handles were assigned to what characteristics.
No comments:
Post a Comment