Fixing Prixton P1282GA sound or wifi issues

Emilio Moretti
6 min readApr 14, 2022

I got a very old WM8505 machine for 2€ in a flea market and started to play around with the firmware, since it was busted anyway. After some googling around I found I own the V3 of this motherboard, which is not compatible with any Android version because they are all prepared to be installed on a NAND, which this device doesn’t have.

However there is a wide range of WinCE 6.0 versions to choose from, none of them fully working.

First I installed a version that seemed to work, but didn’t have sound. Later I installed a Russian version which had sound, but had no WiFi. Then a version for the Sylvanian brand of these machines, which didn’t have WiFi nor Spanish keyboard. And I started to get annoyed.

This article is short, I will walk you through the scriptcmd and rescriptcmd files, which are the ones that tell WinCE about your hardware to make it work properly.

As a first step, download from the internet any version that has the Spanish keyboard, or whatever keyboard you want. First check that it works, installing it as usual: place the script folder in an SD card, plug the SD card, boot the machine and wait until it finishes resetting the system.

Then we have to prepare the initialization commands for this particular hardware.

You will need:

  • Ubuntu, with u-boot-tools
  • scriptcmd.txt
  • rescriptcmd.txt

For the Prixton P1282GA, here is scriptcmd.txt

setenv rescript 1
setenv lcdparam 1,30000,8,800,480,48,40,40,3,29,13,d8110508|10,d8110504|10,d8110500|10
setenv pwmparam 0,5,599,449,539,299,30,0,27
setenv regop D8110064|C,D811008C|C,D81100B4&~4,D81100B4|8,D8130054|1
setenv SHOW_LOGO 1
setenv LCD_ENABLE 1
setenv LCD_ID 1
setenv BMP_ADR 3C00000
setenv LCDC_FB 7600000
setenv CxScreen 320
setenv CyScreen 1E0
setenv LOGO_STRING Loading OS Image …
setenv X_LTEXT 116
setenv Y_LTEXT 166
saveenv

fatload mmc 0 ${BMP_ADR} script/Kernel/logo.bmp

setenv LOGO_STRING WLoad and UBoot update
logo show

textout 60 30 “WLoad and UBoot update after 3 seconds” ff0000
sleep 1

textout 60 30 “WLoad and UBoot update after 2 seconds” ff0000
sleep 1

textout 60 30 “WLoad and UBoot update after 1 seconds” ff0000
sleep 1

fatload mmc 0 0 script/wload.bin
erase FFFF0000 +10000
cp.b 0 FFFF0000 10000

fatload mmc 0 0 script/uboot.bin
erase FFF80000 +50000
cp.b 0 FFF80000 50000

textout 60 30 “WLoad and UBoot update successful, Auto reset!” ffff00
sleep 2

reset

sleep 100

And this is rescriptcmd.txt

setenv lcdparam 1,30000,8,800,480,48,40,40,3,29,13,d8110508|10,d8110504|10,d8110500|10
setenv board_name WM8505_V3_PRIXTON
setenv TouchIC 0
setenv NoBootProgressBar 0
setenv NoBootInformation 0
setenv battery.ic
setenv battvoltlist 6445,7195,7375,7485,7555,7625,7725,7825,7905,7975,8275
setenv bLowVoltShutdown 1
setenv audio.recordselect MicIn
setenv audio.gpio 3
setenv audio.ic VT1613
setenv audio.recordgain 15
setenv pwmparam 0,5,599,449,539,299,30,0,27
setenv EthernetIC 1
setenv WIFIGPIO 2
setenv LowVoltConfig 12
setenv gpiostate 3
setenv FakeBattDetect 4
setenv fakeadcpercent 0
setenv ThreshholdCnt 510000
setenv regop D8110064|C,D811008C|C,D81100B4&~4,D81100B4|8,D8130054|1
setenv raminfo
setenv rominfo
setenv cpuinfo

setenv rescript

randommac

setenv wince_system_disk_start_mb 40
setenv wince_system_disk_end_mb 100
setenv wince_flash_disk_start_mb 100
setenv wince_flash_disk_end_mb ffffffff

setenv flash_safeaddr 2000000
setenv flash_bmpaddr 3E00000

setenv bootdelay 1

setenv SHOW_LOGO 1
setenv LCD_ENABLE 1
setenv LCD_ID 1
setenv BMP_ADR 3C00000
setenv LCDC_FB 7600000
setenv CxScreen 320
setenv CyScreen 1E0
setenv LOGO_STRING Loading OS Image …
setenv X_LTEXT 116
setenv Y_LTEXT 166

setenv usblogocmd lcdinit\;textout 278 358 \”${LOGO_STRING}\” ffffff\;usbinit\;fatload usb 0:2 ${BMP_ADR} logo.bmp
setenv usblogocmd2 fatload usb 0:6 ${BMP_ADR} logo.bmp
setenv nandlogocmd nand readblob ${BMP_ADR} ${flash_bmpaddr}
setenv logocmd run usblogocmd\;run usblogocmd2\;run nandlogocmd\;logo show

setenv usbbootcmd fatload usb 0:2 100000 normal_nk.nb0
setenv usbbootcmd2 fatload usb 0:6 100000 normal_nk.nb0
setenv nandbootcmd nand readblob 100000 0
setenv bootcmd run usbbootcmd\;run usbbootcmd2\;run nandbootcmd\;go 100000

setenv usbsafecmd textout 278 358 \”Loading Safe Mode …\” ffffff\;fatload usb 0:2 100000 safe_nk.nb0
setenv usbsafecmd2 fatload usb 0:6 100000 safe_nk.nb0
setenv nandsafecmd nand readblob 100000 ${flash_safeaddr}
setenv safecmd run usbsafecmd\;run usbsafecmd2\;run nandsafecmd\;go 100000

setenv this_job_desc System_Update
lcdinit
fatload mmc 0 ${BMP_ADR} script/Kernel/logo.bmp
logo show
sleep 1
cleanlcd

textout 60 30 “${board_name} ${this_job_desc} after 5 seconds” ff0000
sleep 1
textout 60 30 “${board_name} ${this_job_desc} after 4 seconds” ff0000
sleep 1
textout 60 30 “${board_name} ${this_job_desc} after 3 seconds” ff0000
sleep 1
textout 60 30 “${board_name} ${this_job_desc} after 2 seconds” ff0000
sleep 1
textout 60 30 “${board_name} ${this_job_desc} after 1 seconds” ff0000
sleep 1
cleanlcd

textout 60 30 “${board_name} ${this_job_desc} running…” ff0000
setenv this_job_desc
saveenv

textout 60 130 “0. Erasing nand flash …” ffff00
nand erase all
textout 60 160 “……Erase nand flash successful!” 00ff00

textout 60 190 “1. Upgrading logo …” ffff00
fatload mmc 0 20000 script/Kernel/logo.bmp
nand writeblob 20000 ${flash_bmpaddr} ${filesize}
textout 60 220 “……Upgrade logo successful!” 00ff00

textout 60 250 “2. Upgrading normal mode …” ffff00
fatload mmc 0 FFFF8 script/Kernel/normal_nk.nb0
nand writeblob FFFF8 0 ${filesize}
textout 60 280 “……Upgrade normal mode successful!” 00ff00

textout 60 310 “3. Upgrading safe mode …” ffff00
fatload mmc 0 FFFF8 script/Kernel/safe_nk.nb0
nand writeblob FFFF8 $(flash_safeaddr) ${filesize}
textout 60 340 “……Upgrade safe mode successful!” 00ff00

sleep 1
go 100000
sleep 1

Once you create those two files it’s time to create the binaries that will be picked up by U-Boot from your SD.

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n “Prixton_V3_by_DC740” -d rescriptcmd.txt rescriptcmd
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n “Prixton_V3_by_DC740” -d scriptcmd.txt scriptcmd

Now you will have two new files ready to replace the ones in the “script” folder in your SD. Reinstall the system and you will finally get sound and wifi.

If you want to know why these work with the Prixton, but not the ones on the WinCE version you downloaded, the key parameters are in rescriptcmd. In short: the audio.* and WIFIGPIO parameters are need to be changed for the Prixton P1282GA.

Here is a description I found on the internet about some valid commands for this modded u-boot:

setenv — setting variable parameters (setenv “name” “parameter”)
printenv — output variable parameters
mmcinit — initialization of SD / MMC card reader
usbinit — initialization of the USB subsystem
usb tree — output tree of USB devices
usb info [dev] — display available USB devices
lcdinit — screen initialization
Before using the ‘lcdinit’ command, you must specify ‘lcdparam’ and ‘pwmparam’. If this is not done, U-Boot uses the default LCD and PWM parameters.
LCD default parameters: 1.25000,8,800,480,48,40,40,3,29,13
PWM default parameters: 0,319,1000,750
lcdparam: version, pixclock, bpp, xres, yres, hpw, hbp, hfp, vpw, vbp, vfp, pwm_pcp, register (& | =) value
Decryption:
version: should be 1
pixclock: LCD Clock (KHz)
bpp: 5: RGB565, 6: RGB666, 8: RGB888. It is the current version of the RGB888.
xres: pels on X axis
yres: pels on Y axis
hpw: hsync pulse width
hbp: hsync back porch
hfp: hsync front porch
vpw: vsync pulse width
vbp: vsync back porch
vfp: vsync front porch
register (& | =) value: register & value or register | value or register = value
(2) pwmparam: no, scalar, period, duty
Decryption:
no: PWM no. Range: 0 ~ 3. PWM to control LCD backlight
scalar: PWM scalar. Range: 1 ~ 1024
period: PWM period. Range: 1 ~ 4096
duty: PWM duty. Range: 1 ~ 4096
cleanlcd — screen cleaning
sdwaitins — waiting for removal / insertion of an SD card
sdwaitins 0 — pending withdrawal
sdwaitins 1 — waiting for insertion
nand device [dev] — output or set the current device
nand info [dev] — output available Nand devices
nand bad — show broken sectors
nand writeblob mem_addr nand_off size — Insert an 8-byte header to the memory contents and write it to nand
nand readblob mem_addr nand_off — reading the contents of nand, deleting the 8-byte header and writing the contents to memory.
sleep N — execution delay for N seconds (N is an integer !!!)
msleep N — execution delay for N milliseconds (N is an integer !!!)

And if you are looking into valid parameters for the Audio chipset, I only know of these two.

For the Prixton:

setenv audio.recordselect MicIn
setenv audio.gpio 3
setenv audio.ic VT1613
setenv audio.recordgain 15

For others

setenv audio.recordselect LineIn
setenv audio.gpio 3
setenv audio.ic ES8328
setenv audio.dacpcmvol 15

For the record, there are other parameters that can be set, like this one, that may help get the battery status working. I don’t have the battery anymore so it had no sense to enable it for me, but it may work for you

setenv battery.ic cs7146

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Emilio Moretti
Emilio Moretti

No responses yet

Write a response