title: What is the value of size to be provided for the getc method in xmodem protocol?
body: <p>I'm trying to transfer a file using the <strong>XMODEM</strong> protocol.</p>
  
  <p>I saw and did not understand the solution provided in: <a href="https://stackoverflow.com/questions/1834247/can-I-use-the-xmodem-protocol-with-pyserial">Can I use the xmodem protocol with PySerial?</a></p>
  
  <p>I saw <a href="http://pypi.python.org/pypi/xmodem" rel="nofollow noreferrer">xmodem package link</a>.</p>
  
  <ol>
  <li>What is the value of <code>size</code> to be provided for the <code>getc</code> method? It is not assigned with any value given in the <a href="https://stackoverflow.com/questions/1834247/can-I-use-the-xmodem-protocol-with-pyserial">first link</a>.</li>
  <li>When I use simple method as explained in the <a href="http://pypi.python.org/pypi/xmodem" rel="nofollow noreferrer">second link</a>, I end up getting the error: <code>No handlers could be found for logger "xmodem"</code>.</li>
  </ol>
  
  <p>Here is my code to send the file.</p>
  
  <pre><code>import serial
  from xmodem import XMODEM, CRC
  from time import sleep
  def getc(size, timeout=1):
      return port.read(size)
  def putc(data, timeout=1):
      port.write(data)
      sleep(0.001) # give device time to send ACK
  port = serial.Serial(port='COM10',parity=serial.PARITY_NONE,bytesize=serial.EIGHTBITS,stopbits=serial.STOPBITS_ONE,timeout=0,xonxoff=0,rtscts=0,dsrdtr=0,baudrate=9600)
  
  sleep(2) # give device time to handle command
  stream = open('..\\stream\\myfile.bin','rb')
  modem = XMODEM(getc, putc)
  modem.send(stream, quiet = 0)
  </code></pre>
  
  <p>I get the error: <code>No handlers could be found for logger "xmodem"</code>.</p>