EDIT 2: OK everything is under control now! We can stream data from our processor to the phone.
For future reference, as I said I am using CoolTerm. To enter CMD mode, connect P2_0 to 3.3V (Still doesn't make sense to me), remove any CR/LF as ric said and send the $$$. However, any subsequent command needs LF so we have to reenable LF before sending anything else. We then set SS,40 for transparent UART which makes the module acts as a data pipe to the phone. To stream data, disconnect P2_0 and don't connect it anywhere. I believed it is internally pulled high but I am not sure now. Lastly, there shouldn't be any program on the processor if using the TTL/terminal way to communicate with the module.
In any case, thanks for the help guys!
OK this is very very strange. I connected P2_0 to 3.3V and now I can enter CMD mode by sending $$$ for some reason. I believed P2_0 had to be low to enter command mode? I need to explore this further as it doesn't make sense, unless I confused the terminology...
a few thoughts
1. do you have Tx and Rx the correct way around? have you checked the signals with an oscilloscope?
2. could you have enabled hardware flow control (off by default) or fast data mode?
I had similar problems with a RN4678 PictialPlus board which has hardware flow control enabled by default.
Sometimes $$$ would not work and no data was displayed on Teraterm. For initial evaluation found that grounding CTS fixed the problem.
Thank you for the ideas. RX/TX are correct, I double check by swapping them around and testing it with no success but haven't tried the oscilloscope. I will look into the hardware flow control or fast data mode but I doubt it as the modules were soldered on the PCB as received. I will try manually grounding CTS and see, thank you.
Make sure you are NOT sending a CR/LF straight after the "$$$".
Often you need a one second period of no serial activity before and after that string.
I've observed that the XC8 puts() function always adds a newline character after the string, whereas cputs() does not. Whatever compiler you are using for this unnamed "processor" may do the same.
Thank you for the reply. Our processor is STM32L496RET6 but it is not currently used to send any commands to the RN4871. It is however connected to it, do you think that might affect it? I am currently using a TTL cable and CoolTerm to communicate with the module. CoolTerm did have CR+LF enabled, I disabled them but still no success. I am starting to think that the fact the processor is connected to the module might affect but it shouldn't.
post edited by christodoulos - 2019/11/12 04:19:17