Getting back into all this...

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Getting back into all this...

Post by sry_not4sale »

walkercam wrote:Progress report:

Finally got the serial connection to open up. The problem was being caused by this section in Serial.py:

Code: Select all

        try:
            self._connection = conn = serial.Serial(
                s.port,
                baudrate    = s.baudrate,
                bytesize    = s.bytesize,
                parity      = s.parity,
                stopbits    = s.stopbits,
                timeout     = s.timeout,
                xonxoff     = s.xonxoff,
                rtscts      = s.rtscts,
            )

        except serialutil.SerialException, msg:
            raise comms.interface.CannotconnectException, msg
What I did was take it back to the most simple form of the serial.Serial command and changed it to serial.Serial(0). This worked. I slowly added back in the other operators until it shat itself. Turns out it doesn't like 's.port' for some reason. I hard coded it to be:

Code: Select all

        try:
            self._connection = conn = serial.Serial(
                0,
                baudrate    = s.baudrate,
                bytesize    = s.bytesize,
                parity      = s.parity,
                stopbits    = s.stopbits,
                timeout     = s.timeout,
                xonxoff     = s.xonxoff,
                rtscts      = s.rtscts,
            )

        except serialutil.SerialException, msg:
            raise comms.interface.CannotconnectException, msg
And now it works. I turned on the TA board and packets of data started popping up in the tuner window :P

Aaron - Any ideas as to why the tuner might be unhappy with the s.port operator? I assume it works fine in linux?

Cheers guys.
Hey mate,

I'm guessing it doesn't like the port number being cast as a string, which I imagine happens when it is loaded from the config file. I will look into the code :)
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Getting back into all this...

Post by sry_not4sale »

Hey mate,

This should be fixed in the devtrunk branch now ;)

Cheers,
Aaron
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Getting back into all this...

Post by Fred »

Good hacking Cam!! Good turn around time on the fix also :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Getting back into all this...

Post by Fred »

Cam, I believe the tuner is looking for an id of 261 not 301 for the datalog, grab the code from github (using git!) and get the compiler etc installed and build a pre-release of 0.0.20 to run against. You asked for me to send you mine, but that makes no sense in the medium term so you may as well get setup properly now. If not, I'll be emailing you binaries every few minutes at some point :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
slacker.cam
QFP80 - Contributor
Posts: 69
Joined: Sun Jan 27, 2008 10:25 pm

Re: Getting back into all this...

Post by slacker.cam »

Thanks guys. Your replies have been very helpful.

I'll get the compiler set up tonight and have another go at it :)
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Getting back into all this...

Post by Fred »

Sweet man, good to see you in on the action :-) Big things coming from this project, hard to remembr that good things take time though :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply