Zedeldi / epson-printer-snmp

Read information and reset waste ink counters on Epson printers, using SNMP.
GNU General Public License v3.0
23 stars 7 forks source link

Support for ET-2700 #3

Open adriadam10 opened 11 months ago

adriadam10 commented 11 months ago

Hi, this project seems the key to my printer, but i cannot get it working on my ET-2700. I have not understand well the readme, i have to obtain the oid from wicreset? If that's the case i'm in big problem, because i have already used my trial key, and i cannot get the log file from reading the counter.

I attach the error that the script outputs:

Traceback (most recent call last): File "/home/adriadam10/epson-printer-snmp/main.py", line 198, in pprint(printer.stats) ^^^^^^^^^^^^^ File "/home/adriadam10/epson-printer-snmp/main.py", line 52, in stats return { ^ File "/home/adriadam10/epson-printer-snmp/main.py", line 53, in method[4:]: self.session.getattribute(method)() for method in methods ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adriadam10/epson-printer-snmp/main.py", line 135, in get_serial_number for value in self.read_eeprom_many( ^^^^^^^^^^^^^^^^^^^^^^ File "/home/adriadam10/epson-printer-snmp/main.py", line 110, in read_eeprom_many return [self.read_eeprom(oid) for oid in oids] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adriadam10/epson-printer-snmp/main.py", line 110, in return [self.read_eeprom(oid) for oid in oids] ^^^^^^^^^^^^^^^^^^^^^ File "/home/adriadam10/epson-printer-snmp/main.py", line 99, in read_eeprom response = re.findall(r"EE:[0-9A-F]{6}", response)[0][3:]


IndexError: list index out of range
Zedeldi commented 11 months ago

Hi there,

The aim of using wicreset is to obtain the OIDs from the log that it creates, or by packet sniffing. Does it show an error if you try to use the trial key again? If so, have a look around your user AppData directories on Windows, or ~/.config on Linux, and look for logs. Otherwise, delete anything related to wicreset, then try again.

Once the OIDs have been obtained, waste counters can be reset without using wicreset again.

Thanks, Zack

adriadam10 commented 11 months ago

I found the file! It was in appdata/wicreset, and has the info of when I used the key! Where are the OID's that I need and where i have to put them in the program?

application.log

Cam-ak commented 11 months ago

Hey,

I am also having a bit of trouble following the readme instructions but I did manage to get almost to the end, so I'll help where I can.

I am using a different printer (Epson Photo Stylus TX800FW), but I will refer to the "application.log" file you uploaded to show you what I did. Also I will write the steps starting from the very beginning to help out any newbies.

  1. At the start you need to open and activate the wicreset program with the key "trial" , this will change the output of the log file so it is easier to read.
  2. After activating, DO NOT reset your waste ink counter just yet, the wicreset only lets you do it once and you can get alot of information from just reading the waste ink counter. So instead, after activating click "read waste counter" then exit the wicreset program.
  3. Go find the wicreset log file and open it.
  4. In the log file you will find a line like the following (the line below is from line 162 from the file you uploaded): EpsonCommonIONET::perform SNMP [SEND]: 1.3.6.1.4.1.1248.1.2.2.44.1.1.2.1.124.124.7.0.73.8.65.190.160.48.0

    The part of the line we need is : 1.3.6.1.4.1.1248.1.2.2.44.1.1.2.1.124.124.7.0.73.8.65.190.160.48.0

  5. You will notice that the segment of the line we extracted follows the same format as the line in the readme file for this github project: This one -> {eeprom_link}.124.124.7.0.{password}.65.190.160.{oid}.0 So we can extract the following variables from the line in the log file:
    {eeprom_link}.124.124.7.0.{password}.65.190.160.{oid}.0

    `1.3.6.1.4.1.1248.1.2.2.44.1.1.2.1.124.124.7.0.73.8.65.190.160.48.0`
    
    {eeprom_link} -> `1.3.6.1.4.1.1248.1.2.2.44.1.1.2.1`
    
    {password} ->  `73.8`
    
    {oid} -> `48`

Now this unfortunately, is where I am up to because after getting this info I am not sure what to do with the last part of the readme where it mentions resetting the waste ink values.