======Read serial number of the SvxLink Card====== To enable to store information, an EEPROM is installed at the rear of the SvxLink Card. She programmable and a capacity of 16 kbps. It also contains the serial number of your card. =====Wiring==== {{ :fr:documents:24c64-connection.png?nolink&300 | Connexion de l'EEPROM de 16 kbits }} ====I2C activation==== In order to ensure you ha€™ve got the latest updates you should run the following commands : sudo apt-get update sudo apt-get upgrade sudo apt-get install i2c-tools Activate I2C on your Raspberry Pi. sudo raspi-config Choose **8-Advanced Options** -> **A7 I2C** answer **Yes** and press enter -> **Ok** -> **Yes** -> **Ok** Reboot system sudo reboot ==== Test I2C interface ==== Power up the Pi and run the following command : sudo i2cdetect -y 1 If you are using a Rev 1 you will need to use œ: **“sudo i2cdetect -y 0”** pi@raspberrypi:~ $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- pi@raspberrypi:~ $ Il s'agit dans notre exemple d'une EEPROM 24C16 qui contient 8 pages de 256 bits chacune.Nous avons équipé la carte d'une eeprom avoir une empreinte numérique de la carte et connaitre la version de la carte par interrogation logiciel. Merci de reserver la page 8 (57) pour l'utilisation SVXLink Card. Vous pourrez utiliser la place disponible pour vos enregistrements personnels. This is our example of 24C16 EEPROM that contains 8 pages of 256 bits each.We have mounted a EEPROM on the board to save a numerical serial number, it's possible obtain this number with software interrogation . Thank you to reserve page 8 (57) for use SvxLink Card. You can use the space available for your personal records. Exemplary content. i2cdump -y 1 0x57 i 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff 39 39 39 39 39 39 39 39 ........99999999 /* Accès avec Python: sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev sudo apt-get install python-setuptools sudo apt-get install git sudo git clone https://github.com/bivab/smbus-cffi.git cd smbus-cffi/ sudo python setup.py install sudo nano test-i2c.py from smbus import SMBus bus = SMBus(1) addr = 0x50 try: print bus.read_i2c_block_data(addr,15) except IOError, err: print err */