ms_sensors_read_serial(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ms_sensors_read_serial(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for ms_sensors_read_serial β€” the serial number read function. she reads the serial number, and we’re obsessed. πŸ’…

🌸 NAME 🌸

ms_sensors_read_serial β€” serial number read function

✨ SYNOPSIS ✨

int ms_sensors_read_serial (struct i2c_client *client , u64 *sn );

πŸŽ€ ARGUMENTS πŸŽ€

  • client β€” pointer to i2c client
  • sn β€” pointer to 64-bits destination value

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is the generic i2c serial number read function for Measurement Specialties devices. it’s used for the TSYS02d, HTU21, and MS8607 chipset. refer to the datasheet: http://www.meas-spec.com/downloads/HTU2X_Serial_Number_Reading.pdf

the sensor raw MSB serial number format is literally:

[ SNB3, CRC, SNB2, CRC, SNB1, CRC, SNB0, CRC]

the sensor raw LSB serial number format is:

[ X, X, SNC1, SNC0, CRC, SNA1, SNA0, CRC]

and the resulting serial number is:

[ SNA1, SNA0, SNB3, SNB2, SNB1, SNB0, SNC1, SNC0]

πŸ’œ RETURN πŸ’œ

0 on success, negative errno otherwise. that’s it, bestie β€” no cap. ✨

🌈 SEE ALSO 🌈

Kernel file: ./drivers/iio/common/ms_sensors/ms_sensors_i2c.c


mwah πŸ’‹ that’s the whole page. source/version: ./drivers/iio/common/ms_sensors; date: October 2026; page: ms_sensors_read_serial(9). byeee 🫢

πŸ“¦ where this page comes from