View unanswered posts | View active topics It is currently Mon Dec 17, 2018 2:06 am



Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Getting back into all this... 
Author Message
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
After a motivational 'get off your arse and do some testing' speal from Fred I have attempted to get back up to speed with FreeEMS development. As I am one of the few people with hardware (specifically the TA board) I can be of help with testing of both embedded and PC software.

So my goal for tonight was to get my hardware unpacked (i've moved house recently), get the tools i need installed on my PC (both the python tools for the tuner and hcs12mem, etc for loading the firmware), run the most up-to-date software, and hopefully get the TV board to talk to the PC.

Well I achieved most of this but it all fell apart right at the end. Once I had modified my batch file for loading the firmware to deal with the paged flash I finally managed to get 'freeems-0.0.19-NipponDenso.s19' loaded into the uC. I'm relatively sure this worked at the user LED is flashing away nicely. I also grabbed the required python files to get the tuner software running on windows. The tuner software runs just fine.

BUT.... when i click 'connect' in the tuner software nothing happens. To be honest I'm not even sure if anything is meant to happen?

Things I tired:
1) i tired to get the firmware version as i figured this is probably one of the features that would be present (if any are) but nothing appears in the 'Payload' column.
2) i had a poke around and it appeared from the debug info that it was trying to connect to the uC via port 0. well funnily enough i dont have a port 0 so i set this to 1 in the config file, but this still did not help.

What am I missing guys? Fred - what .s19 file should I be using. Aaron - what (if anything) do i need to do to get your tuning software running on windows?

Cheers guys


Debug info:
Code:
System:
--------------------
Platform: win32
Python version: 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
Python path: ['C:\\Documents and Settings\\Owner\\Desktop\\freeems\\srynot4sale-freeems-tuner-22d8383d516976bf7d5c04187430a7a40fdfe07a', 'C:\\WINDOWS\\system32\\python26.zip', 'C:\\Python26\\DLLs', 'C:\\Python26\\lib', 'C:\\Python26\\lib\\plat-win', 'C:\\Python26\\lib\\lib-tk', 'C:\\Python26', 'C:\\Python26\\lib\\site-packages', 'C:\\Python26\\lib\\site-packages\\win32', 'C:\\Python26\\lib\\site-packages\\win32\\lib', 'C:\\Python26\\lib\\site-packages\\Pythonwin', 'C:\\Python26\\lib\\site-packages\\wx-2.8-msw-unicode']
wxPython version: 2.8.10.1

FreeEMS:
--------------------
Tuner version: r20090904230053
Comms plugin: comms.Test.connection
Protocol plugin: IFreeEMS.Vanilla (v0.0.1)
Data directory: C:\Documents and Settings\Owner\Desktop\freeems\srynot4sale-freeems-tuner-22d8383d516976bf7d5c04187430a7a40fdfe07a/data/

Config:
--------------------
[Logging]
to_terminal = False
enable_gui_diagnostics = False
verboseness = DEBUG
log_queues = False
to_file = False

[UI_Settings]
win.main.size.w = 600
win.main.size.h = 800
win.main.pos.y = 145
win.main.pos.x = 110

[Comms]
default = Test

[Comms_File]
path = test_input.bin

[Protocol]
default = IFreeEMS_Vanilla
default_version = v0_0_1

[Comms_Serial]
parity = ODD
baudrate = 115200
bytesize = 8
xonxoff = Off
rtscts = Off
timeout = 0
stopbits = 1
port = 1


Wed Sep 30, 2009 11:03 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
Quote:
Comms plugin: comms.Test.connection

It's simply a configuration error :) You are using the Test (fake) connection at the moment.

To enable and configure the Serial connection:

Create a config file in the data directory called my_config.ini with the following contents:
Code:
[Comms]
default = Serial

[Comms_Serial]
port = 0


0 = the first serial port, 1 = the second, etc

Creating a config gui has taken a bit of back seat to other dev work atm, so it can be a bit tricky to set up atm :(

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Wed Sep 30, 2009 9:26 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
Just noticed you edited config.default.ini in the root directory. That's fine, but it's probably a better idea to create the my_config.ini and put any changes in there. The tuner loads config.default.ini and data/my_config.ini, but settings in my_config.ini take precedence :)

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Wed Sep 30, 2009 9:30 pm
Profile WWW
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
sry_not4sale wrote:
Quote:
Comms plugin: comms.Test.connection

It's simply a configuration error :) You are using the Test (fake) connection at the moment.


Ah ha! Yeah i saw that and i wasn't sure if that meant test as in 'test the connection' or test as is in 'fake'.... I'll change the config tonight and try again. I agree the gui shouldn't be high on the priority list atm.

sry_not4sale wrote:
Just noticed you edited config.default.ini in the root directory. That's fine, but it's probably a better idea to create the my_config.ini and put any changes in there. The tuner loads config.default.ini and data/my_config.ini, but settings in my_config.ini take precedence :)


Yeah i did. By that stage i was just opening any file that looked as if it might enable me to make it work. It was a brute force approach :)

Will report back once I've tried this tonight.


Wed Sep 30, 2009 9:41 pm
Profile
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
Ok, I did what you suggested but now I am getting another error:

Code:
Exception in thread comms.default:
Traceback (most recent call last):
  File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
    self.run()
  File "C:\Documents and Settings\Owner\Desktop\freeems\srynot4sale-freeems-tuner-22d8383d516976bf7d5c04187430a7a40fdfe07a\comms\Serial.py", line 160, in run
    self._connect()
  File "C:\Documents and Settings\Owner\Desktop\freeems\srynot4sale-freeems-tuner-22d8383d516976bf7d5c04187430a7a40fdfe07a\comms\Serial.py", line 103, in _connect
    raise comms.interface.CannotconnectException, msg
CannotconnectException: could not open port 0: (2, 'CreateFile', 'The system cannot find the file specified.')


Help? :(


Thu Oct 01, 2009 6:11 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
Looks like it is saying serial port 0 doesn't exist, try incrementing the number?

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Thu Oct 01, 2009 8:43 am
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15204
Location: Home sweet home!
I'm totally stoked to see this thread here! :-)

I hope you get it working soon!

As for which s19, the nippon one is fine, but for your purposes, they are all the same. What i will do at some point is add a test decoder that reads and adc and outputs rpm in a fake manner. That way bench assistants will have something they can reasonably use with oonly analog inputs. A jimstim would mean that you have two sort of working choices right now though. In summary, use nippon for now, but it doesn't really matter for what you are donig.

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!


Thu Oct 01, 2009 10:30 am
Profile WWW
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
sry_not4sale wrote:
Looks like it is saying serial port 0 doesn't exist, try incrementing the number?


That was the first thing that i thought of so i tried that. No joy unfortunately.


Thu Oct 01, 2009 10:36 am
Profile
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
Fred wrote:
I'm totally stoked to see this thread here! :-)


No worries dude. I just hope I can be of some assistance. Once my Silvia is on the road I'll start building an engine frame for the 4AGE so that will be a real-life test bed. You'll be home by then so'll get to help with all that no doubt!

Don't forget that i do have a Jimstim too :)


Thu Oct 01, 2009 10:46 am
Profile
QFP80 - Contributor

Joined: Sun Jan 27, 2008 10:25 pm
Posts: 68
Progress report:

Finally got the serial connection to open up. The problem was being caused by this section in Serial.py:
Code:
        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:
        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

Attached is the screenshot of this data. Unfortunately it looks like the data is not in the right format so now I'm stuck at the next barrier.

Image

Fred - Can you please send me your .s19 file and the tuner software that you are currently using so that we can both get on the same page. Alternatively, why do you think we may be getting this bogus data? As I don't know the intimate details of the comms setup this is a little over my head now.

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.


Sat Oct 03, 2009 1:45 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.