QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

PSP OBDII Software for Cars

This is a discussion on PSP OBDII Software for Cars within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I'm interested in writing OBDII software for the PSP to pull and display date from my car. I know I ...

Reply
 
LinkBack Thread Tools
Old 11-08-2007, 07:56 AM   #1
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default PSP OBDII Software for Cars

I'm interested in writing OBDII software for the PSP to pull and display date from my car. I know I would need to build a serial adapter for my PSP. The only programming language I have time to write it in at the moment would be LUA. Would a program like this be possible to write? Or does LUA have too many limitations to read and interpret data from the PSP's serial port?
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:45 AM   #2
Enter Custom Title
 
SchmilK's Avatar
 
Join Date: Nov 2006
Posts: 1,664
Trader Feedback: 0
Default

Thats an idea..i know some company made a gameboy advance program called Delta Dash or something that has monitors on it for the Subaru WRX/STI and maybe others. (I have a WRX modded to stage 2)

what car are you planning on monitoring?
__________________
Quote:
Originally Posted by limneosgreen
Take my advice, don't try to install custom themes ... it's possible to brick ur psp.. why just don't change wallpaper
SchmilK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:47 AM   #3
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

I have a 2007 Mustang GT.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:55 AM   #4
Enter Custom Title
 
SchmilK's Avatar
 
Join Date: Nov 2006
Posts: 1,664
Trader Feedback: 0
Default

Just rolled on this link from my friend i showed.
http://forums.qj.net/f-psp-speculati...car-27595.html
__________________
Quote:
Originally Posted by limneosgreen
Take my advice, don't try to install custom themes ... it's possible to brick ur psp.. why just don't change wallpaper
SchmilK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:56 AM   #5
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default reply

I was just going to mention that one.
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:58 AM   #6
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

Yes, I've seen that thread also. But I haven't been able to find anybody that actually made anything.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 10:58 AM   #7
QJ's Nice-guy :)
 
Skyline34's Avatar
 
My Mood: Cheerful
Join Date: Mar 2006
Real First Name: Randy Andy
Location: UK
Just Played: Nazi Zombies
Posts: 4,189
Trader Feedback: 0
Default

I got a 1999 Nissan Skyline GT-R R34 V-Spec Nur

I won teh lottery
__________________
On Facebook?

JOIN MY MAFIA!
Skyline34 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 11:00 AM   #8
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

Quote:
Originally Posted by Skyline34
I got a 1999 Nissan Skyline GT-R R34 V-Spec Nur

I won teh lottery
Then your car already has a sweet little computer in the dash.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 11:05 AM   #9
QJ's Nice-guy :)
 
Skyline34's Avatar
 
My Mood: Cheerful
Join Date: Mar 2006
Real First Name: Randy Andy
Location: UK
Just Played: Nazi Zombies
Posts: 4,189
Trader Feedback: 0
Default

I know, fully computerised specs, temperature, G-Meter + more!
__________________
On Facebook?

JOIN MY MAFIA!
Skyline34 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 11:54 AM   #10
Enter Custom Title
 
SchmilK's Avatar
 
Join Date: Nov 2006
Posts: 1,664
Trader Feedback: 0
Default

I saw a skyline once in real life...very nice
__________________
Quote:
Originally Posted by limneosgreen
Take my advice, don't try to install custom themes ... it's possible to brick ur psp.. why just don't change wallpaper
SchmilK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 11:55 AM   #11
QJ's Nice-guy :)
 
Skyline34's Avatar
 
My Mood: Cheerful
Join Date: Mar 2006
Real First Name: Randy Andy
Location: UK
Just Played: Nazi Zombies
Posts: 4,189
Trader Feedback: 0
Default

I especially love the new Nissan GT-R, eats the competition
__________________
On Facebook?

JOIN MY MAFIA!
Skyline34 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 12:24 PM   #12
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default SkyLine

I have a friend that had one when he lived in Japan. He keeps wanting to buy it back and import it.

Anyway back to PSP/OBD software. Does anyone have any ideas?

Would be way cool.
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 12:26 PM   #13
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

I need to know if it can be done in Lua, if not I'm not going to bother.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:08 PM   #14
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default

Well I am no programer but it sounds possible to do it, I looked herehttp://www.lua.org/faq.html and it said that it was similar to C++. Some of the other OBD diagnostic softwares are done in JAVA or C, C++ and the like it really makes me thing that it should work. Of course you will have to deal with the hardware side of it. Taking the J type innterface and changing it to work with thePSP may be the biggest hurdle. I will look for some of the like I have for PC programs and interfaces. Some include free plans for the hardware.
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:16 PM   #15
QJ's Nice-guy :)
 
Skyline34's Avatar
 
My Mood: Cheerful
Join Date: Mar 2006
Real First Name: Randy Andy
Location: UK
Just Played: Nazi Zombies
Posts: 4,189
Trader Feedback: 0
Default

I'm still not sure how a Gameboy Advance could be used to monitor a WRX?!?
__________________
On Facebook?

JOIN MY MAFIA!
Skyline34 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:17 PM   #16
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default

I need to check and see if the 07 Mustang uses PWM, ISO, or VPW to communicate. Of course you can just make a generic box or just buy one.
-= Double Post =-
here is one place in the UK for you, http://www.cardiagnostic.co.uk/software.htm

Last edited by lanelander; 11-08-2007 at 01:25 PM.. Reason: Automerged Doublepost
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:28 PM   #17
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

I already have a hand held tuner that can do what I want, I can also connect it to my laptop. But I use my PSP in my car for movies/music so I figure this could be another use.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:31 PM   #18
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default

Whose tuner/ cable? is it serial or USB? Better if it is USB I would think.
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:32 PM   #19
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

I have a Diablosport Predator, but that doesn't matter. I'll be using the PSP serial connector to connect to the car.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:41 PM   #20
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default

You would need to connect the diable thing to your psp through the Serial connector.
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 01:43 PM   #21
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

Why couldn't I go straight to the car?
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 02:43 PM   #22
 
califrag's Avatar
 
Join Date: Dec 2005
Location: LBC
Posts: 516
Trader Feedback: 0
Default

Quote:
Originally Posted by lanelander
I need to check and see if the 07 Mustang uses PWM, ISO, or VPW to communicate. Of course you can just make a generic box or just buy one.
Quote:
As a rule of thumb, GM cars and light trucks use SAE J1850 VPW (Variable Pulse Width Modulation).

Chrysler products and all European and most Asian imports use ISO 9141 circuitry.

Fords use SAE J1850 PWM (Pulse Width Modulation) communication patterns.
http://www.obdii.com/connector.html
__________________
[fieldset="My Releases"][LIST][*][URL="http://forums.qj.net/showthread.php?t=105194"]warPSP: WarXing Suite[/URL][*][URL="http://forums.qj.net/showthread.php?t=121266"]skyPSP: Webcam Suite[/URL][/LIST][/fieldset]
califrag is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 09:42 PM   #23

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

I've yet to see someone say you can do definitely do this in Lua, so I'll say it. You can definitely do this in Lua. (by this, i mean write to/read from the serial port)

Check the LUa samples that come with Lua player, demonstrates SIO port usage. It's just as easy in C as in Lua, but Lua much faster for the on-the-fly debugging and portability.

Best of luck
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2007, 09:59 PM   #24
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

No it isn't possible in LUA, it should be, but unless it has been fixed the serial port has never worked correctly
since Shine stopped working on it.
If you try to recieve a string of characters from an external device you will only
end up capturing a small percentage of the bytes that were transmitted.
The keyboard example works because in computer terms, it takes a very long time between Human key presses.

That is why I needed to use a seperate microcontroller for my first GPS project.
The microcontroller as a go between retransmitted to the PSP the same thing it recieved from the GPS,
only a lot slower, and with more time between transmitted bytes.
Otherwise it couldn't have been done with PSP LUAplayer.
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2007, 05:55 AM   #25
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

Art, and SG57, thank you for answering my question.

Well, if it isn't possible in Lua, I'm probably going to abandon the whole idea for now. After seeing some sample code for simple PSP programs, I think it would take way too long for me to learn how to program for the PSP before anything productive started happening.

At least I didn't start spending money on cables for this yet.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2007, 01:17 PM   #26
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

It really is any more difficult in C.
I've written virtually the same program in both.
I don't know how you'd look at the LUA sample and understand it,
and then look at the C sample and not understand it.

I think LUA doesn't make use of any hardware FIFO buffer, and just waits for the
next byte it sees when serin is called.

Everything else about your idea is valid.
I have used the PSP to recieve data from the serial line that would be connected
to my car's trip computer (if it had one fitted).
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2007, 01:19 PM   #27
 
Join Date: Nov 2007
Posts: 161
Trader Feedback: 0
Default

I have no idea where to begin with C programming on the PSP. I've programmed in C before, but its been a while.
acascianelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2007, 02:15 PM   #28
 
califrag's Avatar
 
Join Date: Dec 2005
Location: LBC
Posts: 516
Trader Feedback: 0
Default

www.psp-programming.com
__________________
[fieldset="My Releases"][LIST][*][URL="http://forums.qj.net/showthread.php?t=105194"]warPSP: WarXing Suite[/URL][*][URL="http://forums.qj.net/showthread.php?t=121266"]skyPSP: Webcam Suite[/URL][/LIST][/fieldset]
califrag is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-09-2007, 02:52 PM   #29
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Is the C serial sample really harder to understand?
Although the LUA example is a bit more than just serial recieve in this case,
the serial stuff looks about the same to me, and if anything, the LUA example is more complicated,
and harder to modify.

You already know what you want to do. YOu could skip the "Hello World", and go straight to the
serial sample which will probably already do what you want when you match the baud rate,
and make the correct cable. There's little programming involved until you want to do something
with the data you receive.

Code:
/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * main.c - Basic sample to demonstrate the remote port sio.
 *
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 *
 * $Id: main.c 1095 2005-09-27 21:02:16Z jim $
 */
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspsdk.h>
#include <pspctrl.h>
#include <stdio.h>
#include <string.h>

PSP_MODULE_INFO("REMOTE", 0x1000, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(0);

int main(void)
{
	pspDebugScreenInit();

	sceCtrlSetSamplingCycle(0);
	sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
	
	/* Initialise SIO and install a kprintf handler */
	pspDebugSioInit();
	pspDebugSioInstallKprintf();

	/* Install a stdout handler */
	pspDebugInstallStdoutHandler(pspDebugSioPutData);

	Kprintf("Hi from %s!\n", "Kprintf");
	printf("Also hi from stdio\r\n");

	pspDebugScreenPrintf("Press X to exit, tap away on your terminal to echo\n");
	sceDisplayWaitVblankStart();

	while(1)
	{
		SceCtrlData pad;
		int ch;

		sceCtrlReadBufferPositive(&pad, 1);
		if(pad.Buttons & PSP_CTRL_CROSS)
		{
			break;
		}

		ch = pspDebugSioGetchar();
		if(ch >= 0)
		{
			pspDebugScreenPrintf("Received %d\n", ch);
			if(ch == '\r')
			{
				pspDebugSioPutchar('\r');
				pspDebugSioPutchar('\n');
			}
			else
			{
				pspDebugSioPutchar(ch);
			}
		}

		sceDisplayWaitVblankStart();
	}

	sceKernelExitGame();

	return 0;
}
Code:
function scroll(image, dx, dy)
	new = Image.createEmpty(image:width(), image:height())
	new:blit(dx, dy, image)
	return new
end

function printTerminal(text)
	for i = 1, string.len(text) do
		char = string.sub(text, i, i)
		if char == "\n" then
			terminalY = terminalY + 1
			terminalX = 0
		else
			terminal:print(terminalX * 8, terminalY * 8, char, green)
			terminalX = terminalX + 1
			if terminalX >= 60 then
				terminalX = 0
				terminalY = terminalY + 1
			end
		end
		if terminalY >= 34 then
			terminalY = 33
			terminal = scroll(terminal, 0, -8)
		end
	end
end

function normalizeLinefeed(text)
	-- terminal programs like Hyperterminal sends just a \r for return key, convert it
	result = ""
	for i = 1, string.len(text) do
		char = string.sub(text, i, i)
		if char == "\r" then char = "\n" end
		result = result .. char
	end
	return result
end

printTerminal("initializing SIO...\n");
System.sioInit(2400)
infoString = "starting echo...\n"
printTerminal(infoString);
System.sioWrite(infoString)
ping = 0
while true do
	text = normalizeLinefeed(System.sioRead())
	ping = ping + 1
	if ping == 60 then
		ping = 0
		text = text .. "."
	end
	printTerminal(text)
	System.sioWrite(text)
	screen:blit(0, 0, terminal, 0, 0, terminal:width(), terminal:height(), false)
	screen.waitVblankStart()
	screen:flip()
	if Controls.read():start() then break end
end
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-13-2007, 06:56 AM   #30
 
lanelander's Avatar
 
Join Date: Apr 2007
Posts: 13
Trader Feedback: 0
Default

Ok Sorry I was gone so long. I found that page I was lookng for. This site not only shows hardware, software but also information on the handshake that happens in communication. Let me know if this helps.

http://obddiagnostics.com/
lanelander is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
cars , obdii , psp , software

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 10:29 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us