APIX2 on EVO HW2.3 ID5/ID6 script fix

superwofy

Corporal
Jan 18, 2021
120
179
0
There's an issue on the Jacinto bootloader side that prevents APIX2 screens from working correctly on SPI/MII on EVO HW2.3 when flashed for ID5/6.

I have not been able to figure out exactly why. At first it appeared that the apix conf files are different and also the baud rate in spi1-apix2.cfg. I've played around with these extensively and was not able to pinpoint the issue to them - this is SPI that I am referring to.

I was not able to get MII to work and did not spend much time on it.

I was able to determine that multiple resets with binary "apixconfig" of the screen when in the "NO SIGNAL" state would bring it back.

This can be replicated by running commands (usually multiple times):

Code:
on -f hu-jacinto apixconfig -t 14 -w 2F 01

Or

on -f hu-jacinto apixconfig -f /etc/apix/hh-apix2-spi-long-out1.conf

Coding values I use are:

Code:
CID_APIX_MODE
    apix2
CID_COLOR_DEPTH
    24
CID_COM_MODE
    spi
APIX_LENGTH_CID
    long


To make it somewhat permanent I wrote a shell script and baked into the existing "/bin/start_screen.sh" on OMAP. It tracks the status of the screen and resets only as needed. Too many resets and you end up with "NO SIGNAL" also.

It's by no means pretty but it does seem to work. I've still got to investigate if black screen happens. I believe it might and additional tracking should be added.

Code:
mode_register=$(on -f hu-jacinto apixconfig -t 14 -r 2D)
apix_mode=$(echo "$mode_register" | tail -c 4)

if [[ -z "$apix_mode" ]]; then                                                                               ## Early in the boot process this command can fail.
   echo "[HW2.3 APIX2 fix] - Failed to check APIX mode. Will retry." > /dev/console
   sleep 2
   mode_register=$(on -f hu-jacinto apixconfig -t 14 -r 2D)
   apix_mode=$(echo "$mode_register" | tail -c 4)
fi

if [[ "$apix_mode" == "C0 " ]]; then                                                                         ## We're in APIX2 mode

   screen $*                                                                                                 ## Start screen and run fix
   echo "[HW2.3 APIX2 fix] - APIX2 mode detected. Begin status monitoring." > /dev/console

   while true; do
      ashell2_register=$(on -f hu-jacinto apixconfig -t 14 -r 45)
      ashell2_status=$(echo "$ashell2_register" | tail -c 4)
      first_digit=$(echo "$ashell2_register" | sed 's/.*DATA: \([0-9]\).*/\1/')
   
      if [[ $first_digit -eq 0 ]]; then                                                                      ## e.g 04 or 07
         #echo "[HW2.3 APIX2 fix] - CID is working. AShell: $ashell2_status" > /dev/console
         sleep 1.8
      elif [[ $first_digit -eq 1 ]]; then
         echo "[HW2.3 APIX2 fix] - CID not working, re-setting. AShell: $ashell2_status" > /dev/console
         on -f hu-jacinto apixconfig -f /etc/apix/hh-apix2-spi-short-out1.conf                               ## APIX2/SPI/24bit/short cable (0-3m)
      else
         echo "[HW2.3 APIX2 fix] - Unrecognized CID state. AShell: $ashell2_status" > /dev/console
         sleep 0.3
      fi
   
      sleep 0.2
   done
else
   echo "[HW2.3 APIX2 fix] - HU is not coded for APIX2. Mode register: $apix_mode" > /dev/console
   exec screen $*                                                                                            ## Start screen like BMW intended
fi


I attached my modified "start_screen". Tested with HU 6829104 18-03 and CID 6822626. Also tested with 23-07 I-level NBTevo_Y23236I.

Obvious disclaimers about bricking things apply...
Would welcome feedback.
 

Attachments

  • start_screen.sh.zip
    1.7 KB · Views: 6
Last edited:

zomboi09

New Member
Jun 25, 2024
5
0
0
I will have to delete the original file in HU with winscp and then replace the post's file there, it should work, right? , thanks
 

superwofy

Corporal
Jan 18, 2021
120
179
0
I will have to delete the original file in HU with winscp and then replace the post's file there, it should work, right? , thanks

These are the commands I would use:

Code:
mount -uw /fs/sda0 && \
cp /fs/usb0/start_screen.sh /bin/ && \
echo > /net/hu-jacinto/var/opt/sys/APIX_I2C_MONITORING_OFF && \
sleep 5 && \
mount -ur /fs/sda0 && sleep 5

Be careful and remember that you are responsible if you brick it - and this can happen since start_screen.sh is part of the early boot process. You can spam "steuern_rescue_mode", use serial or failing everything, recover the emmc directly.
 

zomboi09

New Member
Jun 25, 2024
5
0
0
Do you have any way to fix WDBI_PLAIN not being able to detect cafd when from id4 flash to id5 6? currently i'm stuck at this step, i can just edit each parameter and then write it down
These are the commands I would use:

Code:
mount -uw /fs/sda0 && \
cp /fs/usb0/start_screen.sh /bin/ && \
echo > /net/hu-jacinto/var/opt/sys/APIX_I2C_MONITORING_OFF && \
sleep 5 && \
mount -ur /fs/sda0 && sleep 5

Be careful and remember that you are responsible if you brick it - and this can happen since start_screen.sh is part of the early boot process. You can spam "steuern_rescue_mode", use serial or failing everything, recover the emmc directly.
 

superwofy

Corporal
Jan 18, 2021
120
179
0
Do you have any way to fix WDBI_PLAIN not being able to detect cafd when from id4 flash to id5 6? currently i'm stuck at this step, i can just edit each parameter and then write it down

No, never encountered that, sorry.