Troubleshooting MMI 3G
#31
AudiWorld Junior Member
Thread Starter
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
@drgertol cat should work all the same for this. However I don't think you can simply read that device to dump the data, there's a whole pile of "components" multiplexed behind that named pipe, the MMI EEPROM being just one of them. First a request needs to get written to that file, perhaps there's some session-initialization required too.
Found documentation for the protocol https://github.com/DSIHarman/DSI/blo...cification.pdf but there's nothing audi-specific in there, . (Still have no idea what "DSI" means, AppleTalk had a layer called "DSI" but doesn't seem to be related at all.)
@AudiAllTheWay If I can't get the original MMI module to boot I may need to desolder that chip just to read it with a programmer, but that's a bit easier than putting it back![Smile](https://www.audiworld.com/forums/images/smilies/smile.gif)
One thing I still haven't checked is if the old HDD is OK, probably been a decade since I've seen a PATA connector in person. It was cheaper to get the whole replacement MMI unit than a ATA drive, maybe I'll try transplanting the HDD to try and revive the old MMI...
Found documentation for the protocol https://github.com/DSIHarman/DSI/blo...cification.pdf but there's nothing audi-specific in there, . (Still have no idea what "DSI" means, AppleTalk had a layer called "DSI" but doesn't seem to be related at all.)
@AudiAllTheWay If I can't get the original MMI module to boot I may need to desolder that chip just to read it with a programmer, but that's a bit easier than putting it back
![Smile](https://www.audiworld.com/forums/images/smilies/smile.gif)
One thing I still haven't checked is if the old HDD is OK, probably been a decade since I've seen a PATA connector in person. It was cheaper to get the whole replacement MMI unit than a ATA drive, maybe I'll try transplanting the HDD to try and revive the old MMI...
#32
AudiWorld Member
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
@sm87 -- "cat /dev/dsi/data > file.dat" returns a zero-byte file and message "/dev/dsi/data: Resource busy" (which I half expected). Later H-B MIB systems appear to have a command-line tool/binary (pc) for this purpose: https://rennlist.com/forums/991/1049...l#post16053504
Knowledge of the related Engineering Screen Definition data field specs (e.g., name space & key/address) is useful here (found in directory /mnt/efs-system/engdefs).
Re the HDD in MMI3G systems, it is not needed for the QNX system to start & run -- the HDD in the original main unit is likely OK. You need a QNX VM to inspect the drive partitions -- I describe the process here: https://www.vwvortex.com/threads/mmi...post-115975309 --g
Knowledge of the related Engineering Screen Definition data field specs (e.g., name space & key/address) is useful here (found in directory /mnt/efs-system/engdefs).
Re the HDD in MMI3G systems, it is not needed for the QNX system to start & run -- the HDD in the original main unit is likely OK. You need a QNX VM to inspect the drive partitions -- I describe the process here: https://www.vwvortex.com/threads/mmi...post-115975309 --g
#33
AudiWorld Junior Member
Thread Starter
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
Later H-B MIB systems appear to have a command-line tool/binary (pc) for this purpose: https://rennlist.com/forums/991/1049...l#post16053504
The java binary is at /j9/bin/j9 which is a symlink to /mnt/ifs-root/j9/bin/j9, however that physical file appears to be inaccessible
![Frown](https://www.audiworld.com/forums/images/smilies/frown.gif)
(Script running with "set -x" - the "+" lines are the actual commands ksh is running)
Code:
JAVA_HOME is /j9 PATH is /j9/bin:/proc/boot:/bin:/sbin:/usr/sbin:/usr/bin:/j9/bin:/mnt/sdcard10t12/bin + ls -ovR /j9 /j9: total 0 dr-xr-xr-x 2 root 0 Jan 01 00:01 bin /j9/bin: total 15 lrwxrwxrwx 1 root 23 Jan 01 00:01 j9 -> /mnt/ifs-root/j9/bin/j9 lrwxrwxrwx 1 root 36 Jan 01 00:01 java.properties -> /mnt/ifs-root/j9/bin/java.properties lrwxrwxrwx 1 root 35 Jan 01 00:01 libiverel23.so -> /mnt/ifs-root/j9/bin/libiverel23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9bcv23.so -> /mnt/ifs-root/j9/bin/libj9bcv23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9dyn23.so -> /mnt/ifs-root/j9/bin/libj9dyn23.so lrwxrwxrwx 1 root 33 Jan 01 00:01 libj9gc23.so -> /mnt/ifs-root/j9/bin/libj9gc23.so lrwxrwxrwx 1 root 39 Jan 01 00:01 libj9hookable23.so -> /mnt/ifs-root/j9/bin/libj9hookable23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9jit23.so -> /mnt/ifs-root/j9/bin/libj9jit23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9jpi23.so -> /mnt/ifs-root/j9/bin/libj9jpi23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9prf23.so -> /mnt/ifs-root/j9/bin/libj9prf23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9prt23.so -> /mnt/ifs-root/j9/bin/libj9prt23.so lrwxrwxrwx 1 root 34 Jan 01 00:01 libj9thr23.so -> /mnt/ifs-root/j9/bin/libj9thr23.so lrwxrwxrwx 1 root 33 Jan 01 00:01 libj9vm23.so -> /mnt/ifs-root/j9/bin/libj9vm23.so lrwxrwxrwx 1 root 35 Jan 01 00:01 libj9zlib23.so -> /mnt/ifs-root/j9/bin/libj9zlib23.so lrwxrwxrwx 1 root 39 Jan 01 00:01 libjclfoun10_23.so -> /mnt/ifs-root/j9/bin/libjclfoun10_23.so + ls -ovR /java /java: total 1 lrwxrwxrwx 1 root 28 Jan 01 00:01 resources -> /mnt/ifs-root/java/resources + ls -ovR /mnt/ifs-root/j9/bin/j9 ls: No such file or directory (/mnt/ifs-root/j9/bin/j9) + ls -ovR /j9/bin/j9 lrwxrwxrwx 1 root 23 Jan 01 00:01 /j9/bin/j9 -> /mnt/ifs-root/j9/bin/j9 + pwd
Code:
<Process> <Number>63</Number> <Name>/lsd/lsd.sh</Name> <Args/> <ResArgs/> <Prio>10</Prio> <StartParam>BACKGROUND</StartParam> <OnTerminate>IGNORE_ALL</OnTerminate> <Shutdown>IGNORE</Shutdown> <ProvidesInterface/> <RequiresInterface>10</RequiresInterface> <RequiresInterface>56</RequiresInterface> <RequiresEnvironment>0</RequiresEnvironment> <RequiresEnvironment>1</RequiresEnvironment> <RequiresEnvironment>2</RequiresEnvironment> </Process>
#34
AudiWorld Member
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
@sm87 -- You discovered the next mystery of Harman-Becker's MMI3G/QNX implementation: that is, the case of the disappearing binaries.
After a few minutes of run-time, we find that certain binary files are no longer visible in the flash filesystem /mnt/ifs-root, including MMI3GApplication (and others in /usr/apps, /usr/bin/vdev-logvolmgr, and /j9/bin/j9 (and likely others).
Shell script /mnt/ifs-root/lsd/lsd.sh called by /mnt/ifs-root/etc/mmi3g-srv-starter.cfg is started relatively early in the start-up process -- inspection of the syslog shows the j9 process is started at around 5 seconds. A shell script run early enough (say, between 90 and 120 seconds of initial start) will show these binaries; after 3 minutes, they disappear from the filesystem. I don't know (yet) where this "feature" is described in the legacy QNX 6.3 docs.
Now, you can find the j9 JRE binary in the ifs-root.ifs image directly (extracted ZIP files listed here: https://www.audizine.com/forum/showt...1#post14904929). The JRE j9 binary is small enough to run from the SD card bin directory -- I would be curious to see if your "Hello, World" java class can be run from an SD card shell script (maybe rename j9 to j9jre so the QNX system doesn't try to make it disappear, too).
BTW, my initial motivation to poke at /mnt/ifs-root/lsd/lsd.sh and the MMI3GP J9 environment is described here: https://www.vwvortex.com/threads/mmi...roken.9520918/
I since found a fellow in PL who still had 3G mobile data access and a working myAudi account to collect some syslog information for a working HTTPS handshake and on-line destination download from the myAudi service -- work on this remains on my to-do list. --g
After a few minutes of run-time, we find that certain binary files are no longer visible in the flash filesystem /mnt/ifs-root, including MMI3GApplication (and others in /usr/apps, /usr/bin/vdev-logvolmgr, and /j9/bin/j9 (and likely others).
Shell script /mnt/ifs-root/lsd/lsd.sh called by /mnt/ifs-root/etc/mmi3g-srv-starter.cfg is started relatively early in the start-up process -- inspection of the syslog shows the j9 process is started at around 5 seconds. A shell script run early enough (say, between 90 and 120 seconds of initial start) will show these binaries; after 3 minutes, they disappear from the filesystem. I don't know (yet) where this "feature" is described in the legacy QNX 6.3 docs.
Now, you can find the j9 JRE binary in the ifs-root.ifs image directly (extracted ZIP files listed here: https://www.audizine.com/forum/showt...1#post14904929). The JRE j9 binary is small enough to run from the SD card bin directory -- I would be curious to see if your "Hello, World" java class can be run from an SD card shell script (maybe rename j9 to j9jre so the QNX system doesn't try to make it disappear, too).
BTW, my initial motivation to poke at /mnt/ifs-root/lsd/lsd.sh and the MMI3GP J9 environment is described here: https://www.vwvortex.com/threads/mmi...roken.9520918/
I since found a fellow in PL who still had 3G mobile data access and a working myAudi account to collect some syslog information for a working HTTPS handshake and on-line destination download from the myAudi service -- work on this remains on my to-do list. --g
#35
AudiWorld Junior Member
Thread Starter
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
Alright, so after a bunch more trial-and-error I finally managed to run some of my own java code on the MMI!
- Copy /j9/bin/* to the SD card.
-Copy lsd.jxe to the SD card. (EDIT: This is not necessary, can use the existing /mnt/ifs-root/lsd/lsd.jxe)
- Compile your .java code with "-target 1.4 -source 1.4" which requires an older JDK like Java SE 5 (JSE 6 or 7 might work)
- Run it like so (changing "HelloWorld" to your entry class):
Figuring out "-Xbootclasspath:/mnt/ifs-root/lsd/lsd.jxe" was the tricky part, the entire JRE is packed onto that .jxe file starting from java.lang.Object and building on up. (I initially tried using rt.jar and friends from my local JDK but j9 seg faulted with those.)
Here are the options supported by the JVM:
And so evidently /dev/dsi/data is part of the disappearing file conspiracy, hmm...
- Copy /j9/bin/* to the SD card.
-
- Compile your .java code with "-target 1.4 -source 1.4" which requires an older JDK like Java SE 5 (JSE 6 or 7 might work)
- Run it like so (changing "HelloWorld" to your entry class):
Code:
$SDPATH/j9/bin/j9 -Xbootclasspath:/mnt/ifs-root/lsd/lsd.jxe -cp ${SDPATH}/bin HelloWorld
Here are the options supported by the JVM:
Code:
[INFO] Running /mnt/sdcard10t12/j9/bin/j9 -h... Licensed Materials - Property of IBM J9 - VM for the Java(TM) platform, Version 2.3 (c) Copyright IBM Corp. 1991, 2006 All Rights Reserved Target: 20060208_05219_lHdFGq (QNX 6.3.2 sh4) JIT - 20060207_1800_r8 IBM is a registered trademark of IBM Corp. Java and all Java-based marks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. Usage: /mnt/sdcard10t12/j9/bin/j9 [options] classname [args...] Usage: /mnt/sdcard10t12/j9/bin/j9 [options] -jxe:<jxeFile> [args...] Usage: /mnt/sdcard10t12/j9/bin/j9 [-jxe] [options] <jxeFile> [args...] [options] -classpath <path> -cp <path> set classpath to <path>. -jxe:<jxeFile> run the named jxe file. -jxe <jxeFile> places jxeFile on the classpath and executes the startup class found in jxeFile. -jxespace:<physicalAddr>,<size>,<logicalAddr> map memory region for jxes, (values are in hex). -jxeaddr:<logicalAddr> run a jxe directly from memory, (address is in hex). -D<prop>=<val> set the value of a system property. -debug:<options> enable debug, JDWP standard <options>. -jcl:<config>[:options] specify which JCL DLL to use (e.g. cdc, cldc, ...). -verbose[:class,gc,stack,sizes] enable verbose output (default=class). -verify enable class file verification. -X print help on non-standard options. [INFO] Running /mnt/sdcard10t12/j9/bin/j9 -X... The following options are non-standard and subject to change without notice. -Xbootclasspath:<path> set bootstrap classpath to <path> -Xbootclasspath/p:<path> prepend <path> to bootstrap classpath -Xbootclasspath/a:<path> append <path> to bootstrap classpath -Xrun<library>[:options] load native agent library (deprecated in favor of -agentlib) -Xint run interpreted only (equivalent to -Xnojit -Xnoaot) -Xnojit disable the JIT -Xnoaot do not run precompiled code -Xquickstart improve startup time by delaying optimizations -Xfuture enable strictest checks, anticipating future default -verbose[:{class|gcterse|gc|dynload|sizes|stack|debug}] Arguments to the following options are expressed in bytes. Values suffixed with "k" (kilo) or "m" (mega) will be factored accordingly. -Xmca<x> set RAM class segment increment to <x> -Xmco<x> set ROM class segment increment to <x> -Xmn<x> set initial/maximum new space size to <x> -Xmns<x> set initial new space size to <x> -Xmnx<x> set maximum new space size to <x> -Xmo<x> set initial/maximum old space size to <x> -Xmos<x> set initial old space size to <x> -Xmox<x> set maximum old space size to <x> -Xmoi<x> set old space increment to <x> -Xms<x> set initial memory size to <x> -Xmx<x> set memory maximum to <x> -Xmr<x> set remembered set size to <x> -Xmrx<x> set maximum size of remembered set to <x> -Xmso<x> set OS thread stack size to <x> -Xiss<x> set initial java thread stack size to <x> -Xssi<x> set java thread stack increment to <x> -Xss<x> set maximum java thread stack size to <x> -Xmine<x> set minimum size for heap expansion to <x> -Xmaxe<x> set maximum size for heap expansion to <x> Arguments to the following options are expressed as a decimal from 0 to 1. A value of 0.3 represents a request of 30% -Xminf<x> minimum percentage of heap free after GC -Xmaxf<x> maximum percentage of heap free after GC Arguments to the following options are expressed a decimal numbers. -Xgcthreads<x> set number of GC threads -Xnoclassgc disable dynamic class unloading -Xclassgc enable dynamic class unloading -Xalwaysclassgc enable dynamic class unloading on every GC -Xnocompactexplicitgc disable compaction on a system GC -Xcompactexplicitgc enable compaction on every system GC -Xcompactgc enable compaction -Xnocompactgc disable compaction -Xdbg:<options> enable debug, JDWP standard options -Xrunjdwp:<options> enable debug, JDWP standard options -Xdbginfo:<symbol file path> enable debug info server -Xrdbginfo:<host>:<port> enable remote debug info server [INFO] Launching /mnt/sdcard10t12/bin/HelloWorld.class... + /mnt/sdcard10t12/j9/bin/j9 -Xbootclasspath:/mnt/sdcard10t12/j9/lib/lsd.jxe -cp /mnt/sdcard10t12/bin HelloWorld Java program is running! Reading System.getProperties()... Found 52 system properties: java.runtime.name=J9 - VM for the Java(TM) platform java.vm.version=2.3 com.ibm.oti.configuration=foun10 java.vm.vendor=IBM Corporation java.vendor.url=http://www.ibm.com/ path.separator=: java.vm.name=J9 com.ibm.oti.system.class.path=/mnt/sdcard10t12/j9/lib/lsd.jxe console.encoding=UTF8 user.dir=/mnt/sdcard10t12 java.vm.specification.name=Java Virtual Machine Specification java.runtime.version=2.3 java.fullversion=IBM J9 2.3 QNX sh4-32 (JIT enabled) J9VM - 20060208_05219_lHdFGq JIT - 20060207_1800_r8 GC - 20060119_AA os.arch=sh4 com.ibm.vm.bitmode=32 java.io.tmpdir=/tmp line.separator= com.ibm.util.extralibs.properties= java.vm.specification.vendor=Sun Microsystems Inc. user.variant= os.name=QNX java.library.path=.:/proc/boot:/lib:/lib/dll:/usr/lib:/usr/lib/dll:/mnt/sdcard10t12/j9/bin:/lsd:/mnt/sdcard10t12/j9/lib jxe.current.romimage.version=9 com.ibm.oti.vm.bootstrap.library.path=/mnt/sdcard10t12/j9/bin/ com.ibm.cpu.endian=little java.specification.name=J2ME Foundation Specification java.class.version=47.0 os.version=6.3.2 com.ibm.oti.vm.library.version=23 user.home=/ user.timezone=GMT file.encoding=UTF8 java.specification.version=1.0 com.ibm.oti.configuration.dir=jclFoundation10 enableVersionLabel= user.name=root java.class.path=/mnt/sdcard10t12/bin com.ibm.oti.vm.exe=/mnt/sdcard10t12/j9/bin/j9 java.vm.specification.version=1.0 java.home=/mnt/sdcard10t12/j9 com.ibm.oti.jcl.build=20060208_1150 user.language=en java.specification.vendor=Sun Microsystems Inc. java.vm.info=IBM J9 2.3 QNX sh4-32 (JIT enabled) J9VM - 20060208_05219_lHdFGq JIT - 20060207_1800_r8 GC - 20060119_AA my_custom_property=my_custom_value java.version=J2ME Foundation Specification v1.0 java.ext.dirs=/mnt/sdcard10t12/j9/lib/ext jxe.lowest.romimage.version=9 java.vendor=IBM Corporation file.separator=/ java.compiler=j9jit23 user.region=US Checking file /dev/dsi/data... Exists: true Length: 0 Can Read: true Can Write: true Last Modified: 70000 Opening FileInputStream... java.io.FileNotFoundException: /dev/dsi/data at java.io.FileInputStream.<init>(Unknown Source) at HelloWorld.main(Unknown Source)
And so evidently /dev/dsi/data is part of the disappearing file conspiracy, hmm...
Last edited by sm87; 01-03-2024 at 08:32 AM. Reason: Updated -Xbootclasspath instructions.
#36
AudiWorld Member
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
...
And so evidently /dev/dsi/data is part of the disappearing file conspiracy, hmm...
Code:
Code:... Checking file /dev/dsi/data... Exists: true Length: 0 Can Read: true Can Write: true Last Modified: 70000 Opening FileInputStream... java.io.FileNotFoundException: /dev/dsi/data at java.io.FileInputStream.<init>(Unknown Source) at HelloWorld.main(Unknown Source)
Code:
J9=${SDBIN}/j9 export J9 $J9 -Xbootclasspath:/lsd/lsd.jxe -cp myjavaclass ...
#37
AudiWorld Junior Member
Thread Starter
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
I've yet to find anything that hosts an endpoint that we could talk to - if you have any pointers let me know. They definitely have facilities to mock various devices as TCP services, including replacing QNXTransport (which reads/writes /dev/data/dsi) with a SocketTransport, but that's for test/dev environments and doesn't help us. In case there's nothing existing available it seems possible to inject our own service/listener objects as part of the "startup bundle" to expose an endpoint.
#38
AudiWorld Member
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
Interesting that you suggest that. Someone over on an a5oc forum just shared a "custom" HN+R_EU firmware that appears to be used to enable nav map display on certain A6/7/8 instrument cluster display units. The lsd.jxe blob has been "hacked" from the original HN+R_EU_AU_K0942 ifs-root.ifs image file (the custom JXE is about 8 MB smaller than the production version produced by H-B). But hacking the production JXE shouldn't be necessary if the listener object/service can be added as a separate JAR and added to the initial j9 configuration in /mnt/efs-system/lsd/lsd.sh. --g
#39
AudiWorld Junior Member
Thread Starter
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
Interesting that you suggest that. Someone over on an a5oc forum just shared a "custom" HN+R_EU firmware that appears to be used to enable nav map display on certain A6/7/8 instrument cluster display units. The lsd.jxe blob has been "hacked" from the original HN+R_EU_AU_K0942 ifs-root.ifs image file (the custom JXE is about 8 MB smaller than the production version produced by H-B). But hacking the production JXE shouldn't be necessary if the listener object/service can be added as a separate JAR and added to the initial j9 configuration in /mnt/efs-system/lsd/lsd.sh. --g
Anyway, lsd.jxe has this /resources/bundles.properties file that bootstraps the startup routine:
Code:
Bundle.Name.53=AppDevelopment Bundle.Activator.53=de.audi.tghu.development.Activator Bundle.Startup.Autostart=52,0 Bundle.Name.0=ATIPImpl Bundle.Activator.0=de.audi.atip.base.Framework ...
Code:
Class activatorType = Class.forName(this.activator); // this.activator is value of Bundle.Activator.# this.bundleActivator = (BundleActivator)(activatorType.newInstance()); this.bundleActivator.start(this);
- Implement org.osgi.framework.BundleActivator interface - just start() and stop() - which spin up a service endpoint for us to use later. (Just ServerSocket is available so implementation would be pretty low level, but no big deal)
- Make the compiled .jar/.class files available to runtime, lsd.sh adds a "-Djava.library.path=.:/proc/boot:/lib:/lib/dll:/usr/lib:/usr/lib/dll:/j9/bin:/lsd" option so copying it to one of those dirs ought to be fine (since the type will be late-bound)
- Another option is to hijack /lsd/TestServer.jar or /lsd/xEventRecorder.jar file paths which the script already probes (it also checks /lsd/DSITracer.jar which seems to exist).
- Update bundles.properties:
- Either update lsd.jxe/resources/bundles.properties (a text file in a zip archive - easy).
- Uncomment/add this line in lsd.sh #VMOPTIONS="$VMOPTIONS -Dlsd.bundles=$BASEDIR/bundles.properties" which will take precedence over the embedded resource. Since lsd.sh does not initialize the VMOPTIONS variable possibly set VMOPTIONS="-Dlsd.bundles=$BASEDIR/bundles.properties" at the system level.
The following users liked this post:
drgertol (01-06-2024)
#40
AudiWorld Member
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
@sm87 -- Check out this thread from one of the forums on a5oc: https://www.a5oc.com/threads/upgradi...imedia.180005/
This fellow fromRomania Lithuania put together a big system patch to convert an MMI3G High (HNav) system into the functional equivalent of an MMI3G Plus (HN+) system.
No word yet if his patch can be applied to HNav_US systems, but this is potentially a very-big-deal, IMO. --g
This fellow from
No word yet if his patch can be applied to HNav_US systems, but this is potentially a very-big-deal, IMO. --g
Last edited by drgertol; 02-17-2024 at 08:31 AM.
The following users liked this post:
sm87 (01-21-2024)