Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ======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 have got the latest updates you should run the following commands : <code bash> sudo apt-get update sudo apt-get upgrade sudo apt-get install i2c-tools </code> Activate I2C on your Raspberry Pi. <code bash> sudo raspi-config </code> Choose **8-Advanced Options** -> **A7 I2C** answer **Yes** and press enter -> **Ok** -> **Yes** -> **Ok** Reboot system <code bash> sudo reboot </code> ==== Test I2C interface ==== Power up the Pi and run the following command : <code bash> sudo i2cdetect -y 1 </code> <WRAP center round important 60%> If you are using a Rev 1 you will need to use : **“sudo i2cdetect -y 0”** </WRAP> <code bash> 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:~ $ </code> 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. <WRAP center round important 60%> Exemplary content. </WRAP> <code bash> i2cdump -y 1 0x57 i </code> <code bash> 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 </code> /* Accès avec Python: <code bash> sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev </code> <code bash> sudo apt-get install python-setuptools </code> <code bash> sudo apt-get install git </code> <code bash> sudo git clone https://github.com/bivab/smbus-cffi.git </code> <code bash> cd smbus-cffi/ sudo python setup.py install </code> <code bash> sudo nano test-i2c.py </code> <code bash> from smbus import SMBus bus = SMBus(1) addr = 0x50 try: print bus.read_i2c_block_data(addr,15) except IOError, err: print err </code> */ en/lecture_numero_serie.txt Last modified: 2020/07/05 17:13(external edit)