Files
abonnel-www/f99ab6c7-db3a-4eea-be14-593a7eb183ba/index.md
T
2026-05-16 15:15:04 +02:00

169 lines
7.3 KiB
Markdown

# Imprimante Ricoh SP C252DN
Cet article couvre deux opérations sur la Ricoh SP C252DN sous Linux : l'installation du fichier PPD pour exploiter toutes les fonctionnalités de l'imprimante, et la reprogrammation des puces de toner pour réinitialiser les niveaux d'encre.
## Installation du fichier PPD sous Linux
Un fichier PPD (PostScript Printer Description) décrit les capacités d'une imprimante : résolutions disponibles, options de finition, polices intégrées, etc. Les systèmes Linux s'appuient sur ce descripteur pour exposer les options d'impression avancées au système et aux applications.
### 1. Ajouter l'imprimante via JetDirect
Lors de l'ajout de l'imprimante, sélectionner le protocole **JetDirect**.
![Sélection du protocole JetDirect](20230313-201028.png)
### 2. Choisir un pilote générique temporaire
Choisir `Generic` > `Generic PDF Printer`. Ce pilote servira de base avant l'installation du PPD spécifique.
![Choix du pilote Generic PDF Printer](20230313-201303.png)
### 3. Télécharger le PPD Ricoh
Télécharger le fichier **PPD** depuis le dépôt suivant :
[https://git.abonnel.fr/cedricAbonnel/richo_c250dn_c252dn/src/branch/main/ppd](https://git.abonnel.fr/cedricAbonnel/richo_c250dn_c252dn/src/branch/main/ppd)
### 4. Installer le PPD
Dans la liste des imprimantes, ouvrir l'imprimante nouvellement ajoutée, cliquer sur l'icône `Paramètres` (![roue crantée](20230313-202024.png)) puis sur `Informations sur l'imprimante`.
![Informations sur l'imprimante](20230313-201543.png)
Cliquer sur `Installer le fichier PPD`, sélectionner le fichier téléchargé, ajuster le nom et l'emplacement si besoin.
![Installation du PPD](20230313-201400.png)
Fermer la fenêtre avec la croix.
![Fenêtre de confirmation](20230313-201855.png)
### 5. Vérifier les options d'impression
L'imprimante apparaît désormais avec ses options avancées dans la boîte de dialogue d'impression de n'importe quelle application.
![Options d'impression disponibles](20230313-201923.png)
![Aperçu des options détaillées](20230313-201933.png)
---
## Reprogrammation de la puce de toner
Les cartouches de toner Ricoh Aficio SP C250SF / SP C250DN / C250e / C252DN intègrent une puce EEPROM qui signale les niveaux d'encre au firmware. Reprogrammer cette puce permet de réinitialiser ces niveaux après un rechargement physique du toner.
### Matériel et port de communication
L'opération se fait via un Arduino communiquant en I²C avec la puce. Les images ci-dessous montrent le port de communication de la cartouche et le câblage à réaliser.
![Port de communication de la puce](20230919-225855.png)
![Vue détaillée du connecteur](20230919-225945.png)
![Câblage Arduino — vue 1](20230919-230131.png)
![Câblage Arduino — vue 2](20230919-230139.png)
![Montage final](20230919-230155.png)
### Code Arduino
Adapter la valeur de `EEPROM_I2C_ADDRESS` selon la couleur de la puce à reprogrammer :
- `83` — noir (K)
- `82` — cyan (C)
- `81` — magenta (M)
- `80` — jaune (Y)
```cpp
// This code updates Ricoh toner chips for Ricoh Aficio SP C250SF, SP C250DN, C250e, etc.
// Update EEPROM_I2C_ADDRESS to the chip you want to reprogram:
// 83 = K (black), 82 = C (cyan), 81 = M (magenta), 80 = Y (yellow)
#define EEPROM_I2C_ADDRESS 83
#include <Wire.h>
// Blank data for K, C, M and Y chips (128 bytes each), dumped from replacement chips.
byte KChipData[]={168,0,1,3,18,1,1,255,100,0,52,48,55,53,52,51,20,9,65,66,22,0,22,38,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,100,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
byte CChipData[]={168,0,1,3,14,2,1,255,100,0,49,49,49,53,52,54,20,2,65,66,23,0,7,1,255,255,255,255,255,255,255,255,88,48,56,54,80,52,48,49,50,48,56,0,68,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,1,85,0,18,0,40,0,5,184,230,50,0,128,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
byte MChipData[]={168,0,1,3,14,3,1,255,100,0,49,49,49,53,52,54,20,2,65,66,24,0,7,16,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,100,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
byte YChipData[]={168,0,1,3,14,4,1,255,100,0,49,49,49,53,52,55,20,2,65,66,25,0,3,7,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,100,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0};
void setup() {
// Select the correct data array based on the chip address.
byte WriteData[128];
switch (EEPROM_I2C_ADDRESS) {
case 83: memcpy(WriteData, KChipData, 128 * sizeof(byte)); break;
case 82: memcpy(WriteData, CChipData, 128 * sizeof(byte)); break;
case 81: memcpy(WriteData, MChipData, 128 * sizeof(byte)); break;
case 80: memcpy(WriteData, YChipData, 128 * sizeof(byte)); break;
default: memcpy(WriteData, KChipData, 128 * sizeof(byte)); break; // Fallback to K.
}
// Initialise I2C and serial buses.
Wire.begin();
Serial.begin(9600);
delay(100);
Serial.println("Start");
Serial.println(" ");
// Write 128 bytes to the chip.
Serial.println("Write 128 bytes:");
byte wordaddress;
for (byte i = 0; i < 128; i++) {
wordaddress = i;
i2cwrite((byte)wordaddress, (byte)WriteData[i]);
Serial.print(wordaddress);
Serial.print(":");
Serial.print(WriteData[i]);
Serial.print(" ");
}
// Read back the 128 bytes to verify.
Serial.println(" ");
Serial.println("Read 128 bytes:");
for (byte i = 0; i < 128; i++) {
byte readVale = i2cread(i);
Serial.print(i);
Serial.print(":");
Serial.print(readVale);
Serial.print(" ");
}
Serial.println(" ");
Serial.println("End");
}
void loop() {
}
void i2cwrite(byte address, byte data) {
Wire.beginTransmission(EEPROM_I2C_ADDRESS);
Wire.write((byte)address);
Wire.write((byte)data);
Wire.endTransmission();
delay(20);
}
byte i2cread(byte address) {
byte rData = 0;
Wire.beginTransmission(EEPROM_I2C_ADDRESS);
Wire.write((byte)address);
Wire.endTransmission();
Wire.requestFrom(EEPROM_I2C_ADDRESS, 1);
while (Wire.available()) {
rData = Wire.read();
return rData;
}
}
// Utility: scan the I2C bus to identify the address of a connected chip.
void WhatI2CAddress() {
for (int i = 0; i < 128; i++) {
Wire.requestFrom(i, 1);
Serial.print(i);
Serial.print(":");
while (Wire.available()) {
byte c = Wire.read();
Serial.print(c); // If data exists, print it — that's the chip address.
}
Serial.println(" ");
delay(5);
}
}
```