I am having trouble using the bluetooth DIP module connecting to my AVR. Everything has been set up correctly (or seems to be, but it is having trouble sending data. Here are my connections:
DIP CTS → DIP RTS
AVR TX → DIP RX
AVR RX → DIP TX
With these connections, neither zterm (i am using osx) nor screen will connect to the port. HOWEVER (and this is the weird part) if I disconnect the AVR TX from the DIP RX, I am able to establish a connection and open a port. After I have established a connection, if I then CONNECT the AVR TX to the DIP RX (disconnected at startup), I start receiving the data that I am supposed to! Then, it stops sending data for a while…
The AT command documentation says not to stream data into the BT module from the UART side until a connection is established, because it will overflow the command parser buffer and essentially crash the module.
So either wait for the connection-established PIO line to go high (easier on the DIP than on the smirf, lucky for you) or watch for “CONNECT” to come from the module before sending your data.
I’m also seeing the periodic loss of data problem; I’m going to properly implement the hardware handshaking (instead of bridging rts and cts) and determine if that makes any difference.
Edit: oh, you can also configure the BT module to ignore UART data when not connected if you don’t need/can’t implement the extra logic. On the DIP that’s fine as you can access the reset pin if you get locked out of command mode; on my bluesmirf if I was foolish enough to set that up and also startup in Fast Mode I’d have to do some nasty mutilation of the module in order to get it back into command mode again…