Fedora Core 9 - serial (now working)

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Fedora Core 9 - serial (now working)

Post by jsmcortina »

I'm still stumped on this one.

Even running the app as root, the serial comms aren't working. I have write permissions and the port ( /dev/ttyUSB0 ) functions as confirmed by my util "can_scan". However, when running TS there isn't any serial activity and the app spits out locking error messages.

In the Miniterminal there is no port showing in the port downdrop and if I click on Open Port, the application segfaults.

As I test, I looked into the RXTX help pages, downloaded the latest version of that, fetched the latest JDK and built "SimpleWrite" as they suggest on their troubleshooting page. This claims to work correctly.
If I knew any Java I'd figure out how to make it read the signature string to be sure.

Any ideas?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12732
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Fedora Core 9 - no serial

Post by LT401Vette »

So SimpleWrite is working?
What sort of locking error? Does it look something like "Locking assertion failure"? That wasn't there last time I got your logs.
usually locking errors are if your user isn't in the uucp group, but as root I'm guessing you are?

How are you starting the app? If you already have RXTX installed, I would suggest trying without the sh file. Use a terminal and type:
java -jar TunerStudio.jar

I'll put together a simple terminal like the mini term for you to try as a standalone. See if that works.

One last question.. :) Which JDK are you using, sun or open java? Fedora seems to push toward open Java, which I have run the app on fine, but I'm not sure if I have ever tried connecting.

BTW, The CAN integration is getting close. I think you'll like it :)
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Fedora Core 9 - no serial

Post by jsmcortina »

I installed jdk-6u11-linux-i586-rpm.bin from Sun.

This is what I see in the launching terminal when I try to use the "miniterminal"

RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0623ba63, pid=14596, tid=3041094544
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing linux-x86)
# Problematic frame:
# V [libjvm.so+0x23ba63]
#
# An error report file with more information is saved as:
# /home/jsm/ts/hs_err_pid14596.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12732
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Fedora Core 9 - no serial

Post by LT401Vette »

James,
Your can_scan program doesn't look at lock files and RXTX does, and it appears you are having some sort of a lock file problem.

Here is a stand alone MiniTerm that uses the same drivers. The drivers aren't in here so you need RXTX installed, which you do.
See if this works or produces the same sort of errors.

http://www.efianalytics.com/TunerStudio ... talled.zip

It will probably be easier to debug from this more basic program.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Fedora Core 9 - no serial

Post by jsmcortina »

That miniterminal works just fine. I was testing as a normal user too.

I tried TunerStudio immediately afterwards and erm... it works? So I don't know what I was doing wrong before.

The miniterminal comes up differently too - previously it had selections at the bottom to open a port which caused the app to crash, now it doesn't and actually works.

I'll do some more testing and let you know if anything changes.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12732
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Fedora Core 9 - no serial

Post by LT401Vette »

Cool.
I did just fix MiniTerm to work when there was no project open in this last release.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Fedora Core 9 - no serial

Post by jsmcortina »

I think that the only change I made to get this working was to add myself as a member of the "lock" and "uucp" groups.


So, I've been using TS this evening while doing some MS2/Extra debugging. It is a little slow on my system. (2Ghz Celeron I think)

Some other things I've found
a. miniterminal doesn't show up config errors. It shows stuff when you've typed in a command, but not things that come out from the Megasquirt unannounced.
The standalone miniterminal is the same

tail -f /dev/ttyUSB0 worked

b. If there has been a signature clash on startup and you click to not ignore, then try to start a new project, it gets locking errors and the app hangs up.

c. the following line isn't equating the same as Megatune:
field = "!and every rotation of..", spk_config_resetcam, {(spk_config_trig2 & 0x3) == 0x2}

This is supposed to display if "dual wheel" is selected, but it remains greyed out, for ref:
spk_config_trig2 =bits, U08, 988, [2:3], "INVALID", "Single wheel with missing tooth", "Dual wheel", "Dual wheel with missing tooth"

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12732
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Fedora Core 9 - no serial

Post by LT401Vette »

I think that the only change I made to get this working was to add myself as a member of the "lock" and "uucp" groups.
That makes sense, I saw that Fedora doesn't add users to uucp or lock by default, but as root you should have been good.
It is a little slow on my system. (2Ghz Celeron I think)
This I would like more on? I would ask what dash and settings you are using, but with that class machine you should have plenty of cpu headroom no matter what you do. There seems to be an extra factor here. Any thing in particular that is slow (New project wizard, Dash, dialog opens...?)
a. miniterminal doesn't show up config errors. It shows stuff when you've typed in a command, but not things that come out from the Megasquirt unannounced.
The standalone miniterminal is the same
Nope, I didn't know that was a need. The MiniTerm doesn't get exclusive access to the Comm Port while the project is open, you may have noticed your dash keeps going and you can open other tuning dialogs still, so If it gets all incoming traffic it would get pretty messy. Perhaps I should put some sort of exclusive mode option.
The Standalone or if no project is open I would think would be different, it should be listening to everything.
b. If there has been a signature clash on startup and you click to not ignore, then try to start a new project, it gets locking errors and the app hangs up.
I'll have to look into that, it's ok on windows, but I'll check into the Linux.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Fedora Core 9 - no serial (working)

Post by jsmcortina »

It is a little slow on my system. (2Ghz Celeron I think)
This I would like more on? I would ask what dash and settings you are using, but with that class machine you should have plenty of cpu headroom no matter what you do. There seems to be an extra factor here. Any thing in particular that is slow (New project wizard, Dash, dialog opens...?)[/quote]
Just all round a sluggish, here's some specs and version info that may(?) help.

[jsm@jsm2 ms2extra]$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Celeron(R) CPU 3.06GHz
stepping : 9
cpu MHz : 3058.974
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 3
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pebs bts pni monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 6117.94
clflush size : 64
power management:

[jsm@jsm2 ms2extra]$ free
total used free shared buffers cached
Mem: 1024540 599556 424984 0 4184 130068
-/+ buffers/cache: 465304 559236
Swap: 2031608 161152 1870456

[jsm@jsm2 ms2extra]$ uname -a
Linux jsm2.jsm-net.demon.co.uk 2.6.27.7-53.fc9.i686 #1 SMP Thu Nov 27 02:29:03 EST 2008 i686 i686 i386 GNU/Linux

[jsm@jsm2 ms2extra]$ java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)


System is fully up to date running gnome desktop.

The miniterminal needs to have exclusive access - the config error reporting is _probably_ all a typical user will use it for anyway?

James

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12732
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Fedora Core 9 - serial (now working)

Post by LT401Vette »

James,
I'm not sure what to say on all around sluggish, that machine should be way more than needed :?:
I can tell you a few specific performance items on my list:
File Dialogs - they are slow.
The Table Editor under tools menu, it is pretty much a piece of junk. It is read only and slow as heck. As it is a developer only thing and I don't know if it is being used at the moment anyway so I haven't fixed it yet. If you think it will help you to make it work right or do anything more than the one in MT, just let me know I can raise it up the list.

On the config errors... Those only come back after the controller cycles, right? I'm thinking we can do something a bit nicer than mini term. Perhaps I can screen the port and set a dashboard indicator, or put it on the Diagnostics tab with the tooth logger?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Fedora Core 9 - serial (now working)

Post by jsmcortina »

LT401Vette wrote:James,
I'm not sure what to say on all around sluggish, that machine should be way more than needed :?:
Well, yes. Something to do with java? Or X ?
The Table Editor under tools menu, it is pretty much a piece of junk. It is read only and slow as heck. As it is a developer only thing and I don't know if it is being used at the moment anyway so I haven't fixed it yet. If you think it will help you to make it work right or do anything more than the one in MT, just let me know I can raise it up the list.
Seems to work ok as it is, I wouldn't worry about changing it in a hurry.
The only thing I use it for in Megatune is to force a read of the trigger/tooth log pages to dump to a comm.log. Not sure if TS can do that yet? A visual logger is far more use in any case.
On the config errors... Those only come back after the controller cycles, right? I'm thinking we can do something a bit nicer than mini term. Perhaps I can screen the port and set a dashboard indicator, or put it on the Diagnostics tab with the tooth logger?
There should already be a dashboard indicator - the text is required in addition though.

As a test, choose toothed wheel and set a silly number of teeth e.g. 17.
Reboot and you'll get a config error.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Post Reply