Spark Logic

Hacking the GD32 based ‘Autool X50 OBD2 Monitor and diagnostic Display’

carl0s

Hi!

I’m Carl

My first project with STM32 will hopefully be to get some code onto this GD32F103 board, and drive the LCD. I first need to figure out what the driver is. It appears to be using 17 pins.. Hopefully the ILI9341.

I will then use this as a screen / controller for my vehicle datalogger that I have already built on an Adafruit Feather M0.

Here’s the thing I want to hack..

Note that the mini-USB on the back here is actually for a vehicle OBD connection, and will be expecting +12v as well as K-Line, L-Line, CAN-Hi/CAN-Lo, etc.. It’s *not* a Mini-USB connection!

(in most web browsers, you can right-click on the images below and choose Open Image in New tab, to view at full resolution).

Image

Image

Image

Image

Image

Replies20

carl0s Wed Apr 25, 2018 11:09 am

I have done a thorough search. There’s some interesting stuff for character based LCDs. I think I’m going to have to work it out myself.

sheepdoll Wed Apr 25, 2018 9:52 pm

I have the first chunk of the file figured out. The font mask is on a 24×24 grid each glyph is 72 bytes.

Here is the first few languages starting at byte 0 plotted on a 25×25 grid. I decided to leave the mask inverted, The white background pixels in between each mask is not part of the file. These were drawn with the postscript ‘Imagemask’ operator, with interpolation true. part of the Type3 (bitmap) font machinery.

cobd18424C.jpg
cobd18424C.jpg (117.96 KiB) Viewed 263 times

ahull Thu Apr 26, 2018 3:55 am

Excellent work :D I had sort of figured out there were 72 bytes per glyph, but you seem to have solved the rest of the puzzle.

The postscript code to dump the fonts is about 200 or so lines. If there is interest I can post it to my git or upload it here (probably in a separate thread.)

Yes, i would be interested to see how that works.

RogerClark Thu Apr 26, 2018 4:00 am

Guys

When I get time I’m going to split an move this thread

it started as a new user post, but seems to about a “car computer” so it would be better if I (somehow) split the initial few posts from the rest of the the thread and make a new topic called something like GD32 Car Computer

ahull Thu Apr 26, 2018 4:06 am

[RogerClark – Thu Apr 26, 2018 4:00 am] –
Guys

When I get time I’m going to split an move this thread

it started as a new user post, but seems to about a “car computer” so it would be better if I (somehow) split the initial few posts from the rest of the the thread and make a new topic called something like GD32 Car Computer

Good move, maybe “Hacking the GD32 based ‘Autool X50 OBD2 Monitor and diagnostic Display’ (and close relatives)”
That should contain enough keywords to cover the topic I think.

RogerClark Thu Apr 26, 2018 4:31 am

Thanks Andy,

I’ll backup the DB now and then try that !

RogerClark Thu Apr 26, 2018 4:39 am

Actually

Look at the thread, I’m going to move the whole lot and change the title as the first post has loads of formation and photos

Edit. Whole topic moved to Projects

Note. I can’t do a batch change the titles of the replies, so I’ve just changed a few of them manually e.g. the posts at the start of this thread and the ones on this page

RogerClark Thu Apr 26, 2018 4:45 am

BTW.

I wonder since that display worked with the GD32, perhaps some recent changes to the SPI or ILI9341 libs now would allow my GD32 boards to work with an ILI9341 display

When I get some time I will wire one up and see if it works

sheepdoll Thu Apr 26, 2018 7:54 am

[ahull – Thu Apr 26, 2018 3:55 am] –
Excellent work :D I had sort of figured out there were 72 bytes per glyph, but you seem to have solved the rest of the puzzle.

The postscript code to dump the fonts is about 200 or so lines. If there is interest I can post it to my git or upload it here (probably in a separate thread.)

Yes, i would be interested to see how that works.

It is pretty late now So I will probably clean up the code and post it tomorrow. I have identified all the offsets to the fonts. There are quite a few the whole first part of the flash. First there is the page I uploaded then there is one more of box draw. Some blank space then 10 pages of Chinese fonts.
Then this whole sequence repeats in bold face (thicker lines.)
After that things get messy. These are the standard fonts Roman sans serif in progressively larger sizes.
The part I am currently working on is the 10 large numbers. This is the only part where there is data 0x78 between each glyph. There is also a large minus sign, which does not align.

After the 10 digits are the icons. Then the text starts. I am currently working on the icons. Having trouble finding the start byte do to the unlined section after the 10 digits. It looks like they are 32 bits across, they may differ in height. (it is after midnight so I am going to call it a day.)

ahull Thu Apr 26, 2018 9:17 am

The tool ahull has been using can probably also be used to extract the glyphs, now that we know they are 24 x 24 x 1 bit.
Actually it does manage to extract a large number of the glyphs as individual .png files
If anybody wants to try this for themselves, the magic incantation is…
convert -depth 1 -size 24x24 gray:autool-x50-16mbit.bin out2.png

zmemw16 Thu Apr 26, 2018 11:26 am

when i was at work, now awhile back i ran into the Sweetscape 010 Editor.
Doing a lot of decomposing data file structures, wondering if it might be of use/interest.
There are binaries for all platforms and i seem to recall it being unlimited, maybe a little upgrade nagging :(

i got my own copy as i was using it at/for work, work istr bought a copy as well.

stephen

carl0s Thu Apr 26, 2018 12:11 pm

[RogerClark – Thu Apr 26, 2018 4:45 am] –
BTW.

I wonder since that display worked with the GD32, perhaps some recent changes to the SPI or ILI9341 libs now would allow my GD32 boards to work with an ILI9341 display

When I get some time I will wire one up and see if it works

I don’t know if this is normal, and remember I was on SPI2, with: SPIClass mySPI(2);

ahull Thu Apr 26, 2018 12:44 pm

That might be a bug, but I will defer to the experts.

BTW here is a bit of font fun… the first 1410 glyphs from the fonts.

I would include all 29128 of them in a single GIF, but there is a size limit on the files I can upload here, so I skipped all the Chinese ones and the later fonts.

convert -delay 10 -loop 0 out2-{1..1410}.png Fonts.gif

carl0s Thu Apr 26, 2018 12:45 pm

[ahull – Thu Apr 26, 2018 12:44 pm] –
That might be a bug, but I will defer to the experts.

BTW here is a bit of font fun… the first 1410 glyphs from the fonts.

I would include all 29128 of them in a single GIF, but there is a size limit on the files I can upload here, so I skipped all the Chinese ones and the later fonts.

Fonts.gif

There is something slightly mesmerising about watching them all flash past. ;)

LOL you guys are crazy :-) Yes it is mesmerising!

ahull Thu Apr 26, 2018 12:51 pm

@ carl0s the next trick is going to be getting some of those fonts to display on your LCD.. :D
Box drawing characters, full colour and reverse video. Sounds like a trip back to the 1980s ;)
I’m sure there is space in that flash for a full PETSCII character set.
We already have a 6502 Commodore emulator. -> viewtopic.php?f=19&t=433
Now you can go the whole hog and emulate all the extended character ROMs too. :lol:

Image Image

I’ve put both font glyph gifs on Google Images, they may or may not be visible above.
Google Images is a little quirky that way.
Inverse video anybody?

Fonts3.gif
Fonts3.gif (76.79 KiB) Viewed 530 times

ahull Thu Apr 26, 2018 2:11 pm

If you are wondering what those 1. 2. etc and the numbers in brackets/circles characters are for, they are probably intended for use in this kind of menu.

Image

They let you draw two or three characters for the price of one as it were. :lol:

These things were important back in the day..

carl0s Thu Apr 26, 2018 2:34 pm

[ahull – Thu Apr 26, 2018 2:11 pm] –
If you are wondering what those 1. 2. etc and the numbers in brackets/circles characters are for, they are probably intended for use in this kind of menu.

Image

They let you draw two or three characters for the price of one as it were. :lol:

These things were important back in the day..

Aw yeah, cool :-)

I used to run a BBS by the way. Bit more modern than those though. PCBoard. Ami-X style. Used to write PPE modules.. uploader .diz extractors etc. and nice menu systems.

Well.. I am fed up of waiting for the round gauge style Autool X60 to come from China. I ordered one for £18 at the beginning of this whole thread.

I just checked Amazon, and it’s now available from Prime, at double the price. So I just ordered one. Will be here tomorrow :-)
https://www.amazon.co.uk/Multi-function … autool+x60

It is definitely a different screen though :o

Image

ahull Thu Apr 26, 2018 3:06 pm

Different, but very similar.

The descriptions are very similar. For example..

X50 – > 32-bit ARM CORTEX-M3 CPU, with 72MHz maximum operating frequency, in support of multiple high speed automotive communication protocols
X60 -> CPU based on 32 bit ARM CORTEX-M3 kernel; Maximum operating frequency: 72MHz; Support multiple high speed auto communication protocols.

Which in itself raises a question, the STM32F103 runs at “72MHz maximum operating frequency” but the GD part will run quite a bit faster, i.e. up to 80MHz (and we have even overclocked it to 120MHz).

The descriptions suggest the original design may actually have been based on the ST part, then later changed to the GD one.

It will be interesting to see what display the new one uses. I presume the firmware will be locked against prying eyes, but there is no harm in trying to take a peek at that too. My money is on the hardware being almost identical, save for the screen.

If we were *really* serious about accessing the firmeware on the GD32 part, and money was no object, then decapping it and connecting to the piggybacked flash chip would be my favoured option. :twisted:

Image

carl0s Thu Apr 26, 2018 3:09 pm

[ahull – Thu Apr 26, 2018 3:06 pm] –
Different, but very similar.

The descriptions are very similar. For example..

X50 – > 32-bit ARM CORTEX-M3 CPU, with 72MHz maximum operating frequency, in support of multiple high speed automotive communication protocols
X60 -> CPU based on 32 bit ARM CORTEX-M3 kernel; Maximum operating frequency: 72MHz; Support multiple high speed auto communication protocols.

Which in itself raises a question, the STM32F103 runs at “72MHz maximum operating frequency” but the GD part will run quite a bit faster, i.e. up to 80MHz (and we have even overclocked it to 120MHz).

The descriptions suggest the original design may actually have been based on the ST part, then later changed to the GD one.

It will be interesting to see what display the new one uses. I presume the firmware will be locked against prying eyes, but there is no harm in trying to take a peek at that too. My money is on the hardware being almost identical, save for the screen.

If we were *really* serious about accessing the firmeware on the GD32 part, and money was no object, then decapping it and connecting to the piggybacked flash chip would be my favoured option. :twisted:

Yes I expect it to be identical except for the screen. I just hope we (you? :) ) can identify the screen!

I have mine running at 128MHz by the way. It didn’t take to 120MHz. It’s not overheated or frozen yet. That’s about 80% clock speed increase over the stm32f103.

The official GD spec is “up to 108MHz”, i.e. 50% faster that stm32f103.

carl0s Fri Apr 27, 2018 9:35 am

[ahull – Thu Apr 26, 2018 3:06 pm] –
Different, but very similar.

The descriptions are very similar. For example..

X50 – > 32-bit ARM CORTEX-M3 CPU, with 72MHz maximum operating frequency, in support of multiple high speed automotive communication protocols
X60 -> CPU based on 32 bit ARM CORTEX-M3 kernel; Maximum operating frequency: 72MHz; Support multiple high speed auto communication protocols.

Which in itself raises a question, the STM32F103 runs at “72MHz maximum operating frequency” but the GD part will run quite a bit faster, i.e. up to 80MHz (and we have even overclocked it to 120MHz).

The descriptions suggest the original design may actually have been based on the ST part, then later changed to the GD one.

It will be interesting to see what display the new one uses. I presume the firmware will be locked against prying eyes, but there is no harm in trying to take a peek at that too. My money is on the hardware being almost identical, save for the screen.

If we were *really* serious about accessing the firmeware on the GD32 part, and money was no object, then decapping it and connecting to the piggybacked flash chip would be my favoured option. :twisted:

Hey going back to the square screen..

Well, I found online that the same driver (ST7789) also supports different resolutions, and there are panels for sale at 240*240 with ST7789. ILI9341_STM32 allows you to set TFTWIDTH and TFTHEIGHT in the .h file too.

Also, I found that the A202 model of this device, also has a square screen…

So i’m feeling hopeful!

My round version (X60) has just arrived in the Amazon locker so I can pick it up on my way into work now but I won’t be able to do anything other than open it up and take photos until later in the weekend.

Sign in to reply