noiasca:
to be precise: it's not compliant.
Addresses 1 to 7 don't exist. They can't according to the i2c spec.
Look at the spec and timing and wave form created by attempting to use slave address 1 to 7.
The timing patterns on SDA for those "addresses" have special meaning and because of that, they can not be used to address a slave at those addresses.
That is how it is defined in the i2c spec.
If you are saying that addresses 1 to 7 exist, then you are saying that the SDA signals should be interpreted differently than what is in the i2c spec.
I can't prevent someone to set up a non compliant slave.
Can you?
Nobody can stop people from trying to violate the spec.
But that still doesn't make those addresses exist according to the I2C spec.
They can't exist according to the spec.
They only way they can "exist" is if both the master and the slave choose to interpret the SDA signal differently than how it is specified by the i2c spec.
No commercial product will use an address below 8. They just won't because those addresses don't exist according to the i2c spec. All the i2c slave addresses for devices are assigned and none are or will ever be assigned to 1-7
And this gives me reason why I want a scanner which identifies these non compliant slaves also.
But in order for it to work, you need more than a sketch that starts a scan loop at address 1
You also need a Wire h/w and s/w implementation that misbehaves on both the master and slave side that ignores the special functions created on SDA by the bit/timing patterns created by attempting to use these address
i.e. both master and slave must interpret the SDA signal differently than what the spec says to use and "see" these slave addresses.
Not all Wire h/w and s/w implementations choose to interpret the SDA signals differently than as defined by the spec in a way that allows using these lower slave addresses.
If you attempt to use these slave addresses, it can cause issues, including a lockup in certain environments since according the i2c spec, using these "addresses" creates special conditions on the bus rather than addressing a slave.
Yes, I believe the Wire library should be dealing with this and should have been from day 1.
The Wire library should immediately error off any attempt to use these low addresses since they don't exist and any attempt to use them ends up generating i2c special conditions on the bus.
It is only when the slave misinterprets SDA that these special conditions will be instead interpreted as slave addresses.
To start the loop at 1 is expecting that all the devices on the bus are misinterpreting the SDA signal the same way and in a way that ignores the special functions defined by the i2c spec and allows using the bit pattern as a slave address.
Not all implementations do this and any implementation that follows the spec will not do this.
--- bill