Re: [RFC PATCH 4/5] gnss: ubx: add support for the reset gpio

From: Wolfram Sang
Date: Tue Jun 20 2023 - 05:41:46 EST



> But can you elaborate on the "disappearing" bit? How exactly does it
> "disappear" when the gnss0 device is *not* opened?

When you send an I2C message with the address of the device, it usually
ACKs it to say "Hi, I am here". When the ublox device is in reset state,
it does not ACK its address. So, tools like "i2cdetect" will not report
the device as "someone is listening there".

Here is the i2cdetect output with the GNSS device open:

# i2cdetect -y -r 15
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- 1d -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- 42 -- -- -- -- -- -- -- -- -- -- -- -- UU
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- 6b -- -- -- --
70: -- UU -- -- UU UU -- --

And with the device closed. Note address 0x42 disappearing:

# i2cdetect -y -r 15
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- 1d -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- 6b -- -- -- --
70: -- UU -- -- UU UU -- --

Attachment: signature.asc
Description: PGP signature