Hello, I have a couple of questions about the RN-42 Bluetooth module.
Context:
I am currently making an application which has to be placed on several Micro controllers, each of which has RN-42 module in SPP. Every now and then this application has to “broadcast” through the RN-42 certain information to all other RN-42’s around. I am doing this by making an inquiry, collecting the list of addresses and then connecting to each of them separately and sending the information.
Questions:
- Is there a substantial difference between the RN-42 with and without HID?
- I have several units from both types, but I need only the SPP capabilities they have and I do not care about HID.
- Can I update the firmware of the RN-42?
- Currently I have several devices some of which have version 4.77 and others 6.10. I noticed some differences in the AT command sets in the different versions. I would like to have them all at the same version so that I can use the same code with all of them.
- How can I find out what is the bluetooth address of the RN-42 that I am currently connected to?
-
In the command reference there is a command GF, which is supposed to give me either the address of the currently or most recently connected device. However this command seems to always return 000000000000 no matter what.
-
There is also the command GR, which gives me the current remote address, but this value is only set when I am the initiator of the connection and this approach won’t work when I am trying to figure out who is sending me data.
-
Of course I could always send the address as part of the data, but I was hoping to be able to use some of the integrated commands in order to reduce the size of the packets that I am sending.
- Can I put a timeout on the attempt of the RN-42 to connect?
-
I want to make an inquiry every once in a while and cache the addresses of my neighbors so that I don’t have to make an inquiry every time I want to send data, because that takes too long. However one of those addresses may not be available anymore when I try to connect to it. In those cases the RN-42 tries to connect for about 10 seconds before it gives up, which is too long when considering that I need to connect to all of my neighbors one by one. This is why I would like to have some timeout on the connection attempt.
-
I noticed that if I send an additional command for connection while already trying to connect, the RN-42 immediately says “Connection failed” and stops trying, but this seems like a bit of a hack.
I hope my questions were clear, but if they aren’t I’d be happy to clarify.
Regards.