Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent serial bridge #132

Open
probonopd opened this issue Jul 21, 2019 · 20 comments
Open

Transparent serial bridge #132

probonopd opened this issue Jul 21, 2019 · 20 comments

Comments

@probonopd
Copy link
Owner

probonopd commented Jul 21, 2019

Add a transparent serial bridge on port 2323 that would allow to interact with the printer as if it was connected to a serial port locally.

While a client is connected there, all other activity needs to be stopped, so that it does not interfere with the transparent serial bridge.

This should allow us to:

@probonopd
Copy link
Owner Author

#128 is insufficient because it does not stop all other activity while a client is connected.

@probonopd
Copy link
Owner Author

Tried to implement this but getting

me@host:~$ avrdude -DV -p atmega1284p -c arduino -P net:192.168.0.33:2323 -b115200 -U flash:r:factory.hex:i
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding

It seems that it understands that a connection is made and stops all other activity, but it does not seem to respond to the telnet client on port 2323 with what is coming from the printer's serial.

@probonopd probonopd reopened this Jul 25, 2019
@probonopd
Copy link
Owner Author

probonopd commented Jul 25, 2019

I managed to get the transparent serial bridge to work up to the point that I can

telnet 192.168.0.33 2323

and interactively issue commands and get back responses. I was hoping that this would be sufficient for using avrdude to flash firmware to the printer, but unfortunately I am getting

me@host:~$ avrdude -DV -p atmega1284p -P net:192.168.0.33:2323 -U flash:r:factory.hex:i -c stk500v1 -v -v -v -v -v 

avrdude: Version 6.3
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/me/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : net:192.168.0.33:2323
         Using Programmer              : stk500v1
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20] 

Preliminary PR: #128

Any help appreciated.

Do we need to reset the printer mainboard using its RESET pin? (It is broken out on the ICSP header)

@probonopd
Copy link
Owner Author

probonopd commented Jul 25, 2019

@GMagician
Copy link
Collaborator

Do we need to reset the printer mainboard using its RESET pin? (It is broken out on the ICSP header)

For mega2560 answer is yes, this is why Soc is reset when you activate usb connection.

@probonopd
Copy link
Owner Author

OK, so I manually reset the printer by grounding the reset pin on the ICSP header in the moment when uploading starts. I get a little further, but only to run into more errors. So I think the timing of the transparent serial bridge may not be sufficient for flashing?

me@host:~$ avrdude -DV -p atmega1284p -P net:192.168.0.33:2323 -U flash:r:factory.hex:i -c stk500v1 -v -v -v -v -v 

avrdude: Version 6.3
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/me/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : net:192.168.0.33:2323
         Using Programmer              : stk500v1
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10   128    0 no       4096    8      0  9000  9000 0xff 0xff
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      1
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               WRITE              31     VALUE      7      1
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
               LOADPAGE_LO        31     VALUE      7      1
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      1
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20     VALUE      4      0
                                  19     VALUE      3      0
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15     VALUE      7      0
                                  14     VALUE      6      0
                                  13     VALUE      5      0
                                  12     VALUE      4      0
                                  11     VALUE      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
               WRITEPAGE          31     VALUE      7      1
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      1
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10     VALUE      2      0
                                   9     VALUE      1      0
                                   8     VALUE      0      0
                                   7    IGNORE      7      0
                                   6    IGNORE      6      0
                                   5    IGNORE      5      0
                                   4    IGNORE      4      0
                                   3    IGNORE      3      0
                                   2    IGNORE      2      0
                                   1    IGNORE      1      0
                                   0    IGNORE      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65    10   256    0 yes    131072  256    512  4500  4500 0xff 0xff
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ_LO            31     VALUE      7      0
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23   ADDRESS     15      0
                                  22   ADDRESS     14      0
                                  21   ADDRESS     13      0
                                  20   ADDRESS     12      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               READ_HI            31     VALUE      7      0
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23   ADDRESS     15      0
                                  22   ADDRESS     14      0
                                  21   ADDRESS     13      0
                                  20   ADDRESS     12      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               LOADPAGE_LO        31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19    IGNORE      3      0
                                  18    IGNORE      2      0
                                  17    IGNORE      1      0
                                  16    IGNORE      0      0
                                  15    IGNORE      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
               LOADPAGE_HI        31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19    IGNORE      3      0
                                  18    IGNORE      2      0
                                  17    IGNORE      1      0
                                  16    IGNORE      0      0
                                  15    IGNORE      7      0
                                  14   ADDRESS      6      0
                                  13   ADDRESS      5      0
                                  12   ADDRESS      4      0
                                  11   ADDRESS      3      0
                                  10   ADDRESS      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
               WRITEPAGE          31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      1
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23   ADDRESS     15      0
                                  22   ADDRESS     14      0
                                  21   ADDRESS     13      0
                                  20   ADDRESS     12      0
                                  19   ADDRESS     11      0
                                  18   ADDRESS     10      0
                                  17   ADDRESS      9      0
                                  16   ADDRESS      8      0
                                  15   ADDRESS      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7    IGNORE      7      0
                                   6    IGNORE      6      0
                                   5    IGNORE      5      0
                                   4    IGNORE      4      0
                                   3    IGNORE      3      0
                                   2    IGNORE      2      0
                                   1    IGNORE      1      0
                                   0    IGNORE      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      1
                                  27     VALUE      3      1
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20     VALUE      4      0
                                  19     VALUE      3      0
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               WRITE              31     VALUE      7      1
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      1
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      1
                                  22     VALUE      6      1
                                  21     VALUE      5      1
                                  20    IGNORE      4      0
                                  19    IGNORE      3      0
                                  18    IGNORE      2      0
                                  17    IGNORE      1      0
                                  16    IGNORE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7     VALUE      7      1
                                   6     VALUE      6      1
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      1
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20     VALUE      4      0
                                  19     VALUE      3      0
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               WRITE              31     VALUE      7      1
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      1
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      1
                                  22     VALUE      6      0
                                  21     VALUE      5      1
                                  20     VALUE      4      0
                                  19     VALUE      3      0
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      1
                                  27     VALUE      3      1
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20     VALUE      4      0
                                  19     VALUE      3      1
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               WRITE              31     VALUE      7      1
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      1
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      1
                                  22     VALUE      6      0
                                  21     VALUE      5      1
                                  20     VALUE      4      0
                                  19     VALUE      3      1
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7     INPUT      7      0
                                   6     INPUT      6      0
                                   5     INPUT      5      0
                                   4     INPUT      4      0
                                   3     INPUT      3      0
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      1
                                  29     VALUE      5      0
                                  28     VALUE      4      1
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20     VALUE      4      0
                                  19     VALUE      3      1
                                  18     VALUE      2      0
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
               WRITE              31     VALUE      7      1
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      0
                                  27     VALUE      3      1
                                  26     VALUE      2      1
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      1
                                  22     VALUE      6      0
                                  21     VALUE      5      1
                                  20     VALUE      4      0
                                  19     VALUE      3      0
                                  18     VALUE      2      1
                                  17     VALUE      1      0
                                  16     VALUE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9    IGNORE      1      0
                                   8    IGNORE      0      0
                                   7     VALUE      7      1
                                   6     VALUE      6      1
                                   5     VALUE      5      1
                                   4     VALUE      4      1
                                   3     VALUE      3      1
                                   2     INPUT      2      0
                                   1     INPUT      1      0
                                   0     INPUT      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      1
                                  27     VALUE      3      0
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23    IGNORE      7      0
                                  22    IGNORE      6      0
                                  21    IGNORE      5      0
                                  20    IGNORE      4      0
                                  19    IGNORE      3      0
                                  18    IGNORE      2      0
                                  17    IGNORE      1      0
                                  16    IGNORE      0      0
                                  15    IGNORE      7      0
                                  14    IGNORE      6      0
                                  13    IGNORE      5      0
                                  12    IGNORE      4      0
                                  11    IGNORE      3      0
                                  10    IGNORE      2      0
                                   9   ADDRESS      1      0
                                   8   ADDRESS      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
             Memory Ops:
               Oeration     Inst Bit  Bit Type  Bitno  Value
               -----------  --------  --------  -----  -----
               READ               31     VALUE      7      0
                                  30     VALUE      6      0
                                  29     VALUE      5      1
                                  28     VALUE      4      1
                                  27     VALUE      3      1
                                  26     VALUE      2      0
                                  25     VALUE      1      0
                                  24     VALUE      0      0
                                  23     VALUE      7      0
                                  22     VALUE      6      0
                                  21     VALUE      5      0
                                  20    IGNORE      4      0
                                  19    IGNORE      3      0
                                  18    IGNORE      2      0
                                  17    IGNORE      1      0
                                  16    IGNORE      0      0
                                  15     VALUE      7      0
                                  14     VALUE      6      0
                                  13     VALUE      5      0
                                  12     VALUE      4      0
                                  11     VALUE      3      0
                                  10     VALUE      2      0
                                   9     VALUE      1      0
                                   8     VALUE      0      0
                                   7    OUTPUT      7      0
                                   6    OUTPUT      6      0
                                   5    OUTPUT      5      0
                                   4    OUTPUT      4      0
                                   3    OUTPUT      3      0
                                   2    OUTPUT      2      0
                                   1    OUTPUT      1      0
                                   0    OUTPUT      0      0

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude: Recv: . [14] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [03] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x03
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [10] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: Send: A [41] . [98]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [05] 
avrdude: Recv: . [10] 
         Hardware Version: 0
         Firmware Version: 0.0
avrdude: Send: A [41] . [84]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [85]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [03] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [86]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [03] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [87]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: A [41] . [89]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
         Vtarget         : 0.0 V
         Varef           : 0.3 V
         Oscillator      : 0.000 Hz
         SCK period      : 23925.8 us

avrdude: Send: A [41] . [81]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: A [41] . [82]   [20] 
avrdude: ser_recv(): read error: Connection reset by peer
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: B [42] . [82] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [01] . [00] . [10] . [00] . [00] . [02] . [00] . [00]   [20] 

@GMagician
Copy link
Collaborator

avrdude: Recv: . [14]
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

That's a little bit weird...received 14 and expected 14..

@probonopd
Copy link
Owner Author

Maybe received it too early or to late?

@GMagician
Copy link
Collaborator

avrdude: Send: A [41] . [80] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [14]

This is a wrong answer. It should respond 14, value, 10

@probonopd
Copy link
Owner Author

In any case, it's safe to say that my naive approach to it is not working. We'd probably need some magic along the lines of

but that is way over my head.

@GMagician
Copy link
Collaborator

GMagician commented Jul 26, 2019

jeelabs/esp-link#50

it seems like you get a 14 10 from previous query. because afer it you really get 14 3 10..Check if avrdude may increase timeout before resend command

Edit: I read more in above link and it says what I wrote above...not read all but that is what happens

@probonopd
Copy link
Owner Author

increase timeout before resend command

I don't think it can do it?

http://manpages.org/avrdude

@CraigHoffmann
Copy link

Have you tried using this wifi bridge to control the 3d printer using something like repetier host?
Repetier allows you to select TCP/IP connection with ip address and port.

@probonopd
Copy link
Owner Author

Yes, I had sent some codes and they worked.

@ithinkido
Copy link

ithinkido commented Aug 5, 2019

@probonopd
Copy link
Owner Author

Thanks, so ESPLink seems to be able to do it. Does someone have the time to port it over?

@ithinkido
Copy link

@probonopd
Copy link
Owner Author

Cool. How to best integrate into this firmware?

@gmag11
Copy link

gmag11 commented Jan 23, 2023

Thanks, so ESPLink seems to be able to do it. Does someone have the time to port it over?

Hi. I'm using plain ESPLink in my 3D printer together with socat in my server where Octoprint runs. It works normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants