There are a lot of not-very-good descriptions of Bluetooth on the web. The G7 and, IRC, the G6 use “BLE” (Bluetooth Low Energy). Eventually I found this quite complete and believable description:
That, just that page, is almost enough to have a pretty good idea how the G6 and G7 transmitters work. There are a lot more details in the rest of the document, the other pages; enough to tell a hardware engineer or a software programmer how to make it all work.
This post is very long. Bits are well known but many parts are hypothetical so I attempt to explain my reasoning. For the techies out there try reading the Silicon Labs documentation and working out how it could work first. For everyone else, TL;DR.
The Dexcom “slots”
Both the G6 and the G7 use a “slot” concept. This is nothing to do with Bluetooth; it’s about the software inside the transmitters. The G6 supports two “slots”. Originally slot 1 was used by the Dexcom receiver and slot 2 by the Dexcom SmartPhone app. With the advent of insulin pump integration slot 1 was also used by the pump, allowing the app to keep working. However each slot can only be used by one device at a time (this is a feature of the Dexcom design) so with an insulin pump the Dexcom receiver becomes useless.
This is how the “timeout” issue arose with the G6. People who tried to swap a smartphone on a running Dexcom transmitter, e.g. as a result of a 'phone upgrade, found it didn’t work. After some experiment it was suggested that if the old phone is turned off for sufficient time the new phone can connect. Figures ranged around half an hour, I used an hour and never had any problems. @Tnyc 's figure of 15 minutes, meaning three missed readings, is consistent with this. That’s the only figure I can remember where anyone timed the process.
The Dexcom G7 changed things very much but it seems the Dexcom software remained substantially unchanged:
- The G7 adds a slot, “slot 3” for SmartWatches.
- The G7 integrates the transmitter and the sensor, now the transmitter only lasts 10 days not 90 or more (up to 115 for the G6 IRC). Each new G7 sensor requires receivers to pair to a new transmitter.
- The G7 eliminates the need to “start” a sensor and along with that the need to start the transmitter either. The G7 starts when it is inserted; no other action is required.
- The G7 also does not need to be “stopped”. Indeed I know that it never stops until the cell that powers it runs out of juice and I hypothesise that it cannot be stopped.
I think the above is all pretty clear. The slot stuff has been stated many times by many different people and the G6/G7 differences are, I believe, self evident.
The remainder of this is my hypothesis of how this is implemented and of how the implementation can fail in such a way as to leave the O5 or xDrip+ (in my case) hanging for hours. I can’t explain any difference between the G6 and G7 beyond the obvious that the G6 is only changed every 90+ days whereas the G7 gets changed every 10 days.
The new transmitter
For the G7 this also means a new sensor, for the G6 I really do mean a new transmitter, not a new sensor.
The G6 powers up when it is connected to the first sensor, the G7 powers up when it comes out of the inserter (the inserter contains a small but powerful magnet to make this happen).
At this point the transmitter starts Advertising. I suggest it does this continuously through maybe it backs off if there is no connection for a while; I haven’t tested either of these hypotheses though it’s pretty easy if I remember when I swap to a new G7.
Anything that is Scanning sees the Advert but attempts to connect through the standard Android or iOS mechanism fail; try it on an expired G7, it still appears every 5 minutes.
The Dexcom receiver, the O5 and other insulin pumps however known how to make a connection. The Dexcom app and xDrip+ will also initiate scanning on the 'phone and make the connection.
At this point the G6/G7 is a “peripheral device”:
Peripheral devices advertise and wait for connections.
The Dexcom receiver, the insulin pumps and the Dexcom app and xDrip+ are all “central device[s]”:
Central devices scan for other devices, and initiate connection.
The peripheral (previously referred to as the “slave”) has to be advertising and the central (previously referred to as the “master”) has to be scanning, both at exactly the same time.
In my experience this happens rapidly, within a few seconds. There is no significant delay. The process is also extremely reliable. I’ve seen it fail once recently requiring a few more minutes to get everything set up but apart from that the only other problems were caused by sensors that started out failed.
BG readings
The transmitter transmits new BG readings and probably sensor errors every five minutes. It’s difficult to be sure how this is done in BLE terms but I’m pretty certain that it happens as follows:
- The transmitter powers down after the first connection has been established and only powers up when a new BG reading is available; about once every 5 minutes/300s.
- At this point the transmitter opens a connection to each paired device and transmits the new information to each device. I think it also accepts requests from the device for extra information such as backfilled glucose data (from readings the device missed) and battery (cell) voltages.
- I suspect that while it is powered up it also Advertises and handles new connection requires from additional devices, precisely as above.
If this is correct the connections to the paired devices are initiated by the transmitter so it is the “Central/Master” device; the roles have been swapped. It’s still a Peripheral/Slave when it Advertises of course. The roles are connection, not device specific.
It is possible to conceive of a way in which the various paired receiver devices wake up every 5 minutes in lock-step with the transmitter and establish a connection but that’s complicated, error prone, and requires the transmitter to be powered on for longer, waiting for an incoming connection. That doesn’t make sense to me.
The second connection
After the first connection has been made the transmitter seems to go into a new mode of operation where it only accepts additional connections every few minutes; this is explained by the transmitter only Advertising when it is powered on to deliver new BG readings.
Dexcom say that a connection may take “up to 10 minutes”, that’s two successive connections, but if one or both of those connections are missed it would take longer.
The Dexcom Receiver and the Omnipod and probably other insulin pumps regard this as a high priority task so are unlikely to miss connections because they are busy elsewhere! The same cannot be said of a SmartPhone, what if your mother calls?
However there is another more serious issue which I have seen. If there is another Dexcom transmitter active in the immediate vicinity it will be Advertising every 5 minutes as well. The receiver can tell the Advertisement is from a Dexcom transmitter; the BlueTooth ID starts “DXCM”, but it doesn’t have enough information to know that this isn’t the transmitter it needs to connect to.
I have seen xDrip+ do this; it connects to an old G7 and goes through the whole “authorization” process (which fails) and by the time that has completed it has missing the Advertisment of the new sensor. This does not happen, or hardly ever happens, for the first connection because then the G7 is Advertising much more often.
This particular instance of the problem may be xDrip+ specific and might be fixed (see the new “DexPairKeeper” messages in the events log.)
Reading the QR code might help with this; it might give the full DXCM bluetooth ID. Knowing the bluetooth ID of the old transmitter certainly should help, that’s the most likely transmitter to still be around (particularly with the G6). Knowing the MAC of the new device should help a lot. Yet it seems tricky because the Advertising data is limited:
The slot problem
Regardless of whether there are problems in reliably connecting a second or subsequent device to the transmitter the Dexcom slots create their own problem.
A single slot is dedicated to a single device. At some point a connecting device has to state what slot they want and if it is in use the Dexcom software itself fails the pairing attempt. It’s not a connection problem to the transmitter itself; the BLE connection has to occur anyway for the new receiver to see the Advertising data!
It would be easy enough for Dexcom to have allowed a new receiver to take over a slot. That would not decrease security because the pairing code is still required. It’s not clear why they didn’t allow that but it is clear that they don’t.
It’s also not clear why the Omnipod PDM requires the serial number, but maybe having the serial number allows the new Omnipod to take over slot 1 from the old one.
Maybe the old pod explicitly disconnects from slot 1 when it fails/expires or when the PDM tells it to for a new pod. Maybe the PDM stores some “secret” that allows the new pod to take over from the old pod.
There are many, many, possibilities here but it seems from @Dave26 and @SherryAnn 's experiences that the “takeover” process is more reliable than the connection to a new transmitter! The new pod certainly does not seem to have to wait for the slot 1 connection to time out.
The reliability could simply be because the old pod and therefore the PDM know the precise 5 minute interval when the transmitter wakes up. On its own that is sufficient to avoid most false Advertisments however the old pod also knows the exact Bluetooth ID (all 6 characters of DXCMxy) and maybe the serial number is in the Advertising data too (clearly the pairing code is not 
Knowing when to connect is particularly important in an app which must otherwise “scan” for Advertisements continuously. This requires continuous foreground activity; the actual connection from a Dexcom transmitter only lasts for a second or so. Android at least is notoriously nasty to apps which do this.
The timeout
The G6 timeout is very short; even if it is more than 15 minutes it is almost certainly less than one hour. Dexcom transmitters frequently time out and at that point anything with the pairing code and a good guess at the slot (1 or 2) can connect to the transmitter.
What does having a timeout, as opposed to allowing connection with the pairing code regardless, achieve? The G6 timeout is so short that I don’t believe it achieves anything compared to just allowing connection at any time.
Does the G7 even have a timeout? If it doesn’t the security and safety of the system increases quite a lot. A connected device cannot accidentally lose a connection for good. If the timeout is hours rather than minutes that helps too because that is longer than the typical alarm time for a missed connection. Why allow a slot to be taken over before the user has been notified of the dropped connection and had adequate time to fix it?
However it doesn’t matter for this topic because the problem is with new transmitters.