title: Read from gpsd/gpsfake with python-gps
body: <p>I've been trying very hard to get gpsfake to work with python-gps for the last days.
  I execute gpsfake with the following example sentences, which I found on the internet:</p>
  
  <pre><code>gpsfake test_data.log
  </code></pre>
  
  <p>test_data.log:</p>
  
  <pre><code>$PMGNST,05.40,2,T,961,08.3,+04583,00*4C
  $GPGLL,5036.9881,N,00707.9142,E,125412.480,A*3F
  $GPGGA,125412.48,5036.9881,N,00707.9142,E,2,04,20.5,00269,M,,,,*17
  $GPRMC,125412.48,A,5036.9881,N,00707.9142,E,00.0,000.0,230506,00,E*4F
  $GPGSA,A,2,27,04,08,24,,,,,,,,,20.5,20.5,*12
  $GPGSV,3,1,10,13,81,052,,04,58,240,39,23,44,064,,24,43,188,36*75
  $GPGSV,3,2,10,02,42,295,,27,34,177,40,20,21,113,,16,12,058,*7F
  $GPGSV,3,3,10,08,07,189,38,10,05,293,,131,11,117,,120,28,209,*76
  </code></pre>
  
  <p>Once it's running, I execute a Python script I found <a href="http://blog.perrygeo.net/2007/05/27/python-gpsd-bindings/" rel="nofollow">here</a>:</p>
  
  <pre><code>import gps
  import os
  import time
  
  if __name__ == '__main__':
      session = gps.gps(verbose=1)
  
  while 1:
      os.system('clear')
      session.next() 
      # a = altitude, d = date/time, m=mode,  
      # o=postion/fix, s=status, y=satellites
  
      print
      print ' GPS reading'
      print '----------------------------------------'
      print 'latitude    ' , session.fix.latitude
      print 'longitude   ' , session.fix.longitude
      print time.strftime("%H:%M:%S")
  
      print
      print ' Satellites (total of', len(session.satellites) , ' in view)'
      for i in session.satellites:
          print '\t', i
  
      time.sleep(3)
  </code></pre>
  
  <p>I gets a connection, but then it gets locked in class gpscommon, method read() on line 80:</p>
  
  <pre><code>frag = self.sock.recv(4096)
  </code></pre>
  
  <p>which tells me that no data is received or even sent.</p>
  
  <p>When I try to connect over the terminal with</p>
  
  <pre><code>connect 127.0.0.1 2947
  </code></pre>
  
  <p>the only response is</p>
  
  <pre><code>{"class":"VERSION","release":"3.4","rev":"3.4","proto_major":3,"proto_minor":6}
  </code></pre>
  
  <p>and nothing else.</p>
  
  <p>Does anyone have an idea how to get the correct data? I tried various NMEA log files, so I think that's not the reason.</p>