[Twisted-Python] Question : Failed to read gpsfake

Itamar Turner-Trauring itamar at itamarst.org
Thu Feb 23 05:49:58 MST 2012


On 02/23/2012 04:22 AM, bino oetomo wrote:
> Dear All ...
>
> I try to simulate a gps with gpsfake.
> gpsfake create virtual port at /dev/pts/4
>
> my code is posted at : http://pastebin.com/j2wn1aXh
>
> It's never reach the 'lineReceived' part.
> I Got no error msg.
>
> The log only said
>
> 2012-02-23 16:02:50+0700 [-] Log opened.
> 2012-02-23 16:02:50+0700 [-] twistd 11.1.0 (/usr/bin/python 2.6.6)
> starting up.
> 2012-02-23 16:02:50+0700 [-] reactor class:
> twisted.internet.pollreactor.PollReactor.
> 2012-02-23 16:02:50+0700 [-] debug : Serial Service start
>
>
> Kindly please give me any enlightment about this problem

By default LineReceiver assumes you are receiving lines that end with 
'\r\n'. Are you sure that's what the fake serial port is sending? 
Possibly you want to just use a custom protocol and override 
dataReceived to begin with.




More information about the Twisted-Python mailing list