The MP3car.com Store The MP3car.com Blog    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-10-2006, 08:03 AM   #361
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
Thanks a lot Vicne You're GREAT! Your solution is more faster that the Girder!

Now i will test it and report the feedback! See later
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------
slimmegane is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 03-10-2006, 08:09 AM   #362
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
Excuse me vicne, how istall this release?
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------
slimmegane is offline   Reply With Quote
Old 03-10-2006, 09:46 AM   #363
Variable Bitrate
 
Join Date: Apr 2005
Location: Belgium
Posts: 325
Quote: Originally Posted by slimmegane
Excuse me vicne, how istall this release?

Err, like the other ones :-) :

In very brief, unzip, check config and double click the bat file

If it fails,
- make sure you have RxTxSerial.dll in the path (JDK bin dir or windows\system32), just like you did with the dll of the first release,
- double check settings in TLCDEmu.properties
- ask here :-)

Long howto :
http://tlcdcemu.sourceforge.net/howto.html

Last edited by Vicne; 03-10-2006 at 09:50 AM.
Vicne is offline   Reply With Quote
Old 03-10-2006, 09:49 AM   #364
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
I've copied the RxTxSerial.dll in Java path (C:\Programmi\Java\jre1.5.0_06\bin) but when I lunch the .bat it start after more time on my desktop PC. Now I will try in Car.
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------
slimmegane is offline   Reply With Quote
Old 03-10-2006, 09:53 AM   #365
Variable Bitrate
 
Join Date: Apr 2005
Location: Belgium
Posts: 325
Quote: Originally Posted by slimmegane
I've copied the RxTxSerial.dll in Java path (C:\Programmi\Java\jre1.5.0_06\bin) but when I lunch the .bat it start after more time on my desktop PC. Now I will try in Car.

Note that most of the starting time is caused by the GUI Plugin. It's useful for debugging, but for normal operation, I would advise to remove it from the plugin list in TLCDCEmu.properties as it's a memory and CPU hog.
Hopefully in a few days the only plugin we'll need is the ExecutorPlugin or its dll equivalent (plus maybe the "router" I already talked about).
Vicne is offline   Reply With Quote
Old 03-11-2006, 05:13 AM   #366
Constant Bitrate
 
Join Date: Feb 2006
Posts: 113
Working circuit with optocouplers

Here's a revised circuit using optocouplers that actually works:



The disadvantage of this circuit is that, if the rs232 connector is disconnected, the program will think that the HU is on, but that's not really a problem (in fact I could probably do away with the HU detection and simply retry until I have an answer).
This even works with the inverter but I found that my inverter is putting out some tough ****: even with all cables disconnected (so no possible ground loop possible) from time to time the serial adapter "disappears".
One interesting thing to note is that the HU doesn't really care that the sequence number is incrementing: I tried just toggling it between 0 and 1 and it worked just fine, so the HU only checks that a sequence number is different than the previous one.
Attached is the modified python program (the changes are to detect the HU is on with DSR low instead of high and some little cleaning of the input buffer).
You invoke it with the name or number of the serial port, e.g.:

Code:
python cdc.py 1 python cdc.py /dev/ttyUSB0

if you want more verbose output add "verbose"

Code:
python cdc.py /dev/ttyUSB0 verbose

It shuld be easy to extend and adapt.
Attached Files
File Type: txt cdc.py.txt (5.3 KB, 124 views)
pippolippi is offline   Reply With Quote
Old 03-11-2006, 08:51 AM   #367
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
Hi pippolippi,
good work! very simple and clear, a question: what is the working differences between your circuit and the Vicne's circuit whit MAX232?

The python script is more clear! I've undestand and I don't know any programming language

Good works!
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------
slimmegane is offline   Reply With Quote
Old 03-11-2006, 10:17 AM   #368
Constant Bitrate
 
Join Date: Feb 2006
Posts: 113
Quote: Originally Posted by slimmegane
Hi pippolippi,
good work! very simple and clear, a question: what is the working differences between your circuit and the Vicne's circuit whit MAX232?

The pc is completely isolated from the hu. I needed it because, as soon as I connected the inverter to power my laptop, the laptop shut off, probably due to some ground loop.
If the pc gnd is already connected to the car/hu gnd then the optocouplers are not necessary. In that case you can use the circuit with the max232 or the simpler one I posted earlier:



keep in mind that the fact it works here it doesn't mean it is well designed, so maybe it doesn't work with your serial port (though I think it should).

Quote:
The python script is more clear! I've undestand and I don't know any programming language

Good works!

Great, even though I prefer pascal, python is pretty good for many things. Head to python.org, there are some good tutorials there if you want to learn.
pippolippi is offline   Reply With Quote
Old 03-11-2006, 10:28 AM   #369
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
I've tested the new version whit exec.exe command but i wasn't able to work, I've update RR to last version (03mar) and I've copy bin directory to C:\ I've set the ExecutorPlugin.properties like this:

[code]
# Warning : always use double backslash as separator.
# e.g. C:\\Windows\\Notepad.exe readme.txt

EVENT_NEXT=C:\\bin\\exec.exe NEXT
[\CODE]

But when I press next button from HU they don't change anything, only track on display, the Java program receive the command and write NEXT pressed (or similar) the sound go off for 1 second but RR still play the some track.

If I from CMD run "exec.exe NEXT" RR change the track.

If I set: EVENT_NEXT=C:\\bin\\exec.exe C:\\windows\\notepad.exe nothing appear.

Where I wrong?

P.S. If I press a button from 1 to 6 from HU (Disc select) the sound go off and I must change source and return to fake CDC to sound go on

P.S.2. In car the TLCEmu startup fast, I think there is the Antivirus on Desktop PC that run slow. How remove the GUI Plugin? Is sufficent to remove the

"Plugins=org.tlcdcemu.plugin.gui.GUIPlugin,org.tlc dcemu.plugin.logical.LogicalPlugin"

string in "TLCDCEmu.properties" file?
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------

Last edited by slimmegane; 03-11-2006 at 11:02 AM.
slimmegane is offline   Reply With Quote
Old 03-11-2006, 01:35 PM   #370
Constant Bitrate
 
Join Date: Feb 2006
Posts: 113
Quote: Originally Posted by pippolippi
(in fact I could probably do away with the HU detection and simply retry until I have an answer).

Attached is a version that does just that, so the upper optocoupler (and the corresponding resistors) can be omitted.
It also contains what I think is the correct meaning of packet 93: HU on (it is sent only when the HU has just been switched on, not when the communication is established with the HU already on).
Attached Files
File Type: txt cdc-noremote.py.txt (5.2 KB, 91 views)
pippolippi is offline   Reply With Quote
Old 03-11-2006, 02:40 PM   #371
Variable Bitrate
 
Join Date: Apr 2005
Location: Belgium
Posts: 325
Quote: Originally Posted by slimmegane
when I press next button from HU they don't change anything, only track on display, the Java program receive the command and write NEXT pressed (or similar) the sound go off for 1 second but RR still play the some track.

Oops, I think I didn't update the TLCDCEmu.properties in the zip file. It should look like
Code:
DebugLevel=3 SerialDriverClass=gnu.io.RXTXCommDriver SerialPortName=COM1 Plugins=org.tlcdcemu.plugin.gui.GUIPlugin,org.tlcdcemu.plugin.executor.ExecutorPlugin # org.tlcdcemu.plugin.logical.LogicalPlugin

Quote:
P.S. If I press a button from 1 to 6 from HU (Disc select) the sound go off and I must change source and return to fake CDC to sound go on

Yes, this is a known issue. I'll fix that.
Quote:
P.S.2. In car the TLCEmu startup fast, I think there is the Antivirus on Desktop PC that run slow. How remove the GUI Plugin? Is sufficent to remove the

"Plugins=org.tlcdcemu.plugin.gui.GUIPlugin,org.tlc dcemu.plugin.logical.LogicalPlugin"

string in "TLCDCEmu.properties" file?

The line Plugins contains multiple values, separated by a ",". All are optional.
Vicne is offline   Reply With Quote
Old 03-11-2006, 04:27 PM   #372
Variable Bitrate
 
Join Date: Apr 2005
Location: Belgium
Posts: 325
Quote: Originally Posted by slimmegane
Hi pippolippi,
good work! very simple and clear, a question: what is the working differences between your circuit and the Vicne's circuit whit MAX232?

Pippolippi's circuit also has the great advantage of being self-powered, I mean you don't need any extra wires to get the 5V power from the PC.
Finally, it also has one more feature in that it sends to the PC the information whether the head unit is on or off (Remote wire).
The only (small) drawback I can see is that two output wires (RTS & DRT) are used to provide voltage levels to the optocouplers, so you need 2 more wires between the serial port and the adapter (but you already need 4 including remote, so it's not a big deal) and you cannot use those signals for another purpose.
Currently, the Java emulator version you have doesn't set these signals to the correct levels so it won't work as is but I'll change that right now.

Honestly, as soon as I have a bit of time, I think I'm gonna build Pippolippi's interface as well and use that one.
Vicne is offline   Reply With Quote
Old 03-11-2006, 04:59 PM   #373
Constant Bitrate
 
Join Date: Feb 2006
Posts: 113
Quote: Originally Posted by Vicne
Finally, it also has one more feature in that it sends to the PC the information whether the head unit is on or off (Remote wire).

But that's not really necessary (see above post #370)

Quote:
Honestly, as soon as I have a bit of time, I think I'm gonna build Pippolippi's interface as well and use that one.

Since you don't need the isolation you could also use the simpler one (only 2 transistors).
pippolippi is offline   Reply With Quote
Old 03-11-2006, 05:03 PM   #374
Variable Bitrate
 
Join Date: Apr 2005
Location: Belgium
Posts: 325
Quote: Originally Posted by pippolippi
But that's not really necessary (see above post #370)

True. I hadn't read your post carefully.
Quote:
Since you don't need the isolation you could also use the simpler one (only 2 transistors).

Yes, but I like the idea of optical isolation, and I might change the PC one day and forget about that, so...
Vicne is offline   Reply With Quote
Old 03-12-2006, 04:41 AM   #375
Variable Bitrate
 
slimmegane's Avatar
 
Join Date: Feb 2005
Location: Italy/Lecce
Posts: 230
Quote:
Oops, I think I didn't update the TLCDCEmu.properties in the zip file. It should look like

Ok, I will try now

Yesterday I've test the system and I've see when HU go OFF while the PC sound it continue to sound, this is a good work for me, because the HU is OFF but the sound is still ON and this is good for my battery.

But when I power on HU the CDC don't appear in Source List. I must close TLCEmu and re-run.

This is only a report of my test, this isn't a criticism!

Bye and Thanks!
__________________
--------------------------------
ITALIANI: DISPONIBILI MODULI OEM GPS:

http://www.mp3car.com/vbulletin/show...214#post639214
--------------------------------
slimmegane is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are Off


All times are GMT -5. The time now is 04:51 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics