I sincerely appreciate the help, and I have spent untold tens of hours reading and rereading the hookup guide and Roving Networks RN-42 Advanced Users Guide. I have 6 modules for testing! I can enter command mode and change values, I can get the two modules to talk back and forth (one is connected to Serial1 of Mega 2560, and the other to AltSoftSerial on Arduino Pro Mini 8Mhz 3.3V) at 9600 bps.
The master on the MEGA needs no low power - powered 24x7. The slave on the Pro Mini is battery powered and I am very power conscious. My messages are short message, maybe 4 to 6 bytes, 9600bps is fine, and I can make the header 0xFF 0xFE so in case I lose a char due to the thing waking up. The master needs to be able to send unsolicited messages, and the slave needs to be able to send unsolicited messages.
I have turned authentication off, bonding on, put the remote address of each other using SR, turned inquiry off, set the transmit power down to 0dB, but what’s left is to actually put the slave to sleep.
The slave arduino has two “modes of operation”. The first is running, in which the master and slave exchange messages where the slave sends the master a message every 3 or 4 seconds, and the master may send the slave a message every maybe 20 seconds. The second is sleeping, in which the slave is doing nothing but waiting for the master to wake it up and tell it to go into running mode.
I have set SW to 0x8000 | 0x100 for a sniff mode on the slave, and SW of 0x100 on the master.
Here are my questions: The slave never seems to go to sleep. Someone said somewhere that CTS has to be toggled EVEN THOUGH the manual says that it will go to sleep and wake up on receive of char in the UART. Can someone confirm?
I wanted to put the slave in and out of different modes by going into command mode with $$$ and exiting with — but I read it should be configured with $$$ and then rebooted. I don’t see how I can get it to sleep and wake up when I want and connect/disconnect when I want if I can’t issue the C and K commands as-needed.
I would appreciate any enlightenment on the these two major issues, or if it looks like I’m doing something stupid (likely) or missing something. THANK YOU VERY MUCH!
Cheers,
Jeff