Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to differentiate between Kobo Touches: kobo_trilogy #421

Closed
Markismus opened this issue Dec 28, 2013 · 26 comments
Closed

How to differentiate between Kobo Touches: kobo_trilogy #421

Markismus opened this issue Dec 28, 2013 · 26 comments
Labels

Comments

@Markismus
Copy link
Member

On the mobileread forum xping found a kobo touch that had ABS_X and ABS_Y swapped. This is to be expected from lines 365-366 of input.lua:

                -- FIXME some touch models should be treated as the other models,
                -- depending on board revision

After I asked him for more info, it is clear that function Device:getModel() and thus kobo_config.sh do not provide enough info to differentiate between versions.

kobo_config.sh:

#!/bin/sh
PCB=`ntx_hwconfig -s -p /dev/mmcblk0 PCB`
case $PCB in
        E60610D*) echo trilogy;;
        E606B*) echo kraken;;
        E5061*) echo pixie;;
        E606C*) echo dragon;;
        E606F*) echo phoenix;;
        *) echo trilogy;;
esac

Running the relevant command on Kobo Aura:

[root@(none) bin]# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v1.7 , size=39 bytes :
[0] PCB='E606F0B'
[1] KeyPad='FL_Key'
[2] AudioCodec='No'
[3] AudioAmp='No'
[4] Wifi='WC121A2'
[5] BT='No'
[6] Mobile='No'
[7] TouchCtrl='ektf2132'
[8] TouchType='C-Type'
[9] DisplayCtrl='MX508+TPS65185'
[10] DisplayPanel='6" Bottom EPD'
[11] RSensor='G Sensor'
[12] MicroP='MSP430'
[13] Customer='9'
[14] Battery='1500mA'
[15] Led='TYPE1'
[16] RamSize='256MB'
[17] IFlash='eMMC'
[18] ExternalMem='Micro SD'
[19] RootFsType='Ext4'
[20] SysPartType='TYPE3'
[21] ProgressXHiByte=0x01
[22] ProgressXLoByte=0x68
[23] ProgressYHiByte=0x02
[24] ProgressYLoByte=0xE4
[25] ProgressCnts=0x00
[26] ContentType=0x00
[27] CPU='mx50'
[28] UIStyle='Customer UI'
[29] RAMType='K4X2G323PC'
[30] UIConfig='Normal'
[31] DisplayResolution='1024x758'
[33] CPUFreq='1G'
[34] HallSensor='TLE4913'
[35] DisplayBusWidth='8Bits'
[36] FrontLight_Flags=BootON:OFF,TABLE1X:OFF
[37] PCB_Flags=NO_KeyMatrix:ON,FPC_Touch:OFF,LOGO_LED:OFF
[38] FrontLight_LEDrv='SY7201'

So the trilogy already uses all info available in field PCB

Has anybody an idea how to find the info xping gave:

Product no:N905-KBO-B
S/N: N905K342***** -B
@Markismus
Copy link
Member Author

Maybe we could differentiate based on displaycontroller.

Could people dump their ntx_hwconfig -s -p /dev/mmcblk0 output? Could especially those with a Kobo Touch also give their product and serial numbers?

@Markismus
Copy link
Member Author

For my mother's Kobo Glo:

[root@(none) ~]# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v1.3 , size=35 bytes :
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
[0] PCB='E606B0'
[1] KeyPad='FL_Key'
[2] AudioCodec='No'
[3] AudioAmp='No'
[4] Wifi='WC121A2'
[5] BT='No'
[6] Mobile='No'
[7] TouchCtrl='neonode_v2'
[8] TouchType='IR-Type'
[9] DisplayCtrl='MX508+TPS65185'
[10] DisplayPanel='6" Bottom EPD'
[11] RSensor='No'
[12] MicroP='MSP430'
[13] Customer='9'
[14] Battery='1000mA'
[15] Led='TYPE1'
[16] RamSize='256MB'
[17] IFlash='Micro SD'
[18] ExternalMem='Micro SD'
[19] RootFsType='Ext4'
[20] SysPartType='TYPE3'
[21] ProgressXHiByte=0x01
[22] ProgressXLoByte=0x68
[23] ProgressYHiByte=0x02
[24] ProgressYLoByte=0xE4
[25] ProgressCnts=0x00
[26] ContentType=0x00
[27] CPU='mx50'
[28] UIStyle='Customer UI'
[29] RAMType='K4X2G323PC'
[30] UIConfig='Normal'
[31] DisplayResolution='1024x758'
[32] FrontLight='TABLE0'
[33] CPUFreq='1G'
[34] HallSensor='TLE4913'
[35] DisplayBusWidth=[+]
[36] FrontLight_Flags=[+]
[37] PCB_Flags=[+]
[38] FrontLight_LEDrv=[+]

(The warning is between every line, but I erased it to increase readability.)

Only PCB, TouchCtrl, TouchType, Rsensor, Battery, IFlash have different values. Values [35-38] are not given on the Kobo Glo.

@Markismus
Copy link
Member Author

For the Touch with the swapped X- Y- coordinate (Product no:N905-KBO-B, S/N: N905K342***** -B):

HW CONFIG v1.3 , size=35 bytes : 
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
[0] PCB='E60610D' 
[1] KeyPad='1Key' 
[2] AudioCodec='No' 
[3] AudioAmp='No' 
[4] Wifi='WC121A2' 
[5] BT='No' 
[6] Mobile='No' 
[7] TouchCtrl='neonode_v2' 
[8] TouchType='IR-Type' 
[9] DisplayCtrl='MX508+TPS65185' 
[10] DisplayPanel='6" Bottom EPD' 
[11] RSensor='No' 
[12] MicroP='MSP430' 
[13] Customer='9' 
[14] Battery='1000mA' 
[15] Led='TYPE1' 
[16] RamSize='256MB' 
[17] IFlash='Micro SD' 
[18] ExternalMem='Micro SD' 
[19] RootFsType='Ext4' 
[20] SysPartType='TYPE3' 
[21] ProgressXHiByte=0x01 
[22] ProgressXLoByte=0x68 
[23] ProgressYHiByte=0x02 
[24] ProgressYLoByte=0xE4 
[25] ProgressCnts=0x00 
[26] ContentType=0x00 
[27] CPU='mx50' 
[28] UIStyle='Customer UI' 
[29] RAMType='K4X2G323PC' 
[30] UIConfig='Normal2' 
[31] DisplayResolution='800x600' 
[32] FrontLight='No' 
[33] CPUFreq='NC' 
[34] HallSensor='No' 
[35] DisplayBusWidth=[+] 
[36] FrontLight_Flags=[+] 
[37] PCB_Flags=[+] 
[38] FrontLight_LEDrv=[+] 

The PCB value for this Touch is 7 digits! Maybe we can differentiate on PCB only. Hopefully, someone with a newer Touch will post.
There are supposed to be 3 versions of Kobo Touch: A, B, and C. The newest seems to be able to run the same firmware as the Kobo Glo. The older ones are types Mark 3, the newer one Mark 4.

@Markismus
Copy link
Member Author

This was reported here

Here's the ntx_hwconfig as requested.

I should note that while my device's fcc id shows it as an n905c, when I did a factory reset and it auto-downloaded the 3.2.0 firmware, it downloaded the one that this thread associates with the n905b.

I don't know why it's getting the warnings.

# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v1.0 , size=32 bytes : 
[0] PCB='E60610' 
[1] KeyPad='1Key' 
[2] AudioCodec='ALC5623' 
[3] AudioAmp='No' 
[4] Wifi='WC121' 
[5] BT='No' 
[6] Mobile='No' 
[7] TouchCtrl='neonode' 
[8] TouchType='IR-Type' 
[9] DisplayCtrl='MX508' 
[10] DisplayPanel='6" Bottom EPD' 
[11] RSensor='No' 
[12] MicroP='MSP430' 
[13] Customer='9' 
[14] Battery='1000mA' 
[15] Led='TYPE1' 
[16] RamSize='256MB' 
[17] IFlash='Micro SD' 
[18] ExternalMem='SD' 
[19] RootFsType='Ext4' 
[20] SysPartType='TYPE3' 
[21] ProgressXHiByte=0x01 
[22] ProgressXLoByte=0x68 
[23] ProgressYHiByte=0x02 
[24] ProgressYLoByte=0xE4 
[25] ProgressCnts=0x00 
[26] ContentType=0x00 
[27] CPU='mx50' 
[28] UIStyle='Customer UI' 
[29] RAMType='MDDR' 
[30] UIConfig='Normal2' 
[31] DisplayResolution='800x600' 
[32] FrontLight=[+] 
[33] CPUFreq=[+] 
[34] HallSensor=[+] 
[35] DisplayBusWidth=[+] 
[36] FrontLight_Flags=[+] 
[37] PCB_Flags=[+] 
[38] FrontLight_LEDrv=[+] 
[39] VCOM_10mV_HiByte=[+] 
[40] VCOM_10mV_LoByte=[+] 
[41] PCB_REV=[+] 

@Markismus
Copy link
Member Author

Summarizing [0] PCB=

Aura    E606F0B
Glo     E606B0
Touch B E60610D
Touch C E60610

Comparing this to kobo_config.sh:

#!/bin/sh
PCB=`ntx_hwconfig -s -p /dev/mmcblk0 PCB`
case $PCB in
        E60610D*) echo trilogy;;
        E606B*) echo kraken;;
        E5061*) echo pixie;;
        E606C*) echo dragon;;
        E606F*) echo phoenix;;
        *) echo trilogy;;
esac

It is obvious wherein the mistake lies. They just heap them together at the end! We can run the command ourselves and differentiate between Touch B and C.

@giorgio130
Copy link
Member

I don't know if I'm missing anything, but:

For the Touch with the swapped X- Y- coordinate (Product no:N905-KBO-B, S/N: N905K342***** -B):

HW CONFIG v1.3 , size=35 bytes : 
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
[0] PCB='E60610D'

and in issue #535:

# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v1.0 , size=32 bytes : 
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
[0] PCB='E60610' 

so both models appear to have X and Y switched??? Even if we can distinguish between models, it could not be useful at all...

@Markismus
Copy link
Member Author

So should we query model and firmware version?

@giorgio130
Copy link
Member

I don't think the firmware version changes the coordinates.
This variable could come into play:

[30] UIConfig='Normal2' 

in the case of Aura, AuraHD and Glo, it is set to "Normal".

@Markismus
Copy link
Member Author

Interesting.

But how does it discriminate between Touches?

@giorgio130
Copy link
Member

My guess is that those with inverted coordinates would have 'Normal2' as a
value, while those who don't would have 'Normal'. We had reports of
inverted coordinates by both touch-b and touch-c owners it seems, so that
shouldn't be the key of the issue.
Il 29/mar/2014 16:11 "Markismus" notifications@github.com ha scritto:

Interesting.

But how does it discriminate between Touches?

Reply to this email directly or view it on GitHubhttps://github.com//issues/421#issuecomment-38998250
.

@Markismus
Copy link
Member Author

It would indeed be nice to have a different check for coordinate inversion and model dependency.

What about hwhw's suggestion for a "touch upper right corner" if there is no configuration file yet?

@giorgio130
Copy link
Member

A touch calibration step would be perfect, but I think it should be shown only to kobo touch owners.
I don't think I'll have the time to implement it myself, I could give a try to implement the setting in configuration to swap coordinates though.

@Markismus
Copy link
Member Author

I'll close this since all the data has been gathered.

@bbaixiner
Copy link

I have original N905 and N905B
The N905 has a integration flash onboard , not a micro sd .
Other main ICs as below:
CPU MCIMX508CVM8B
Power Supply IC of E-link TPS65185
FLASH KLM2G1DEHE
RAM K4X2G323PC
And a MC13892AJVL is a Power Management and User Interface componentfor Freescale’s i.MX51, i.MX37, i.MX35, i.MX31 and i.MX27
and a TI MSP430 MCU (MircoP ?)

The N905B has a micro sd on board as rom.
Other main ICs as below:
CPU MCIMX507CVM8B ( some board are MCIMX508CVM8B )
A sensor Lm75a
A small battery charger ic marks cdu ti 16W
RAM K4X2G323PC
and a TI MSP430 MCU (MircoP ?) one MSP430G2333

@Markismus
Copy link
Member Author

@bbaixiner Nice that you have both Touches! Would you be willing to run the command ntx_hwconfig -s -p /dev/mmcblk0 at the shell prompt?
(If you're willing, but don't know how to run a terminal on your Touch, I'll write you through it.)

Next to the output of the command for each model I am also quite interested what tweaks to input.lua are needed to make it run smoothly.

@bbaixiner
Copy link

@Markismus Very unexpectedly that the command ntx_hwconfig -s -p /dev/mmcblk0 is no use at N905.
[root@(none) onboard]# ntx_hwconfig -s -p /dev/mmcblk0
-sh: ntx_hwconfig: not found

And I copy the a ntx_hwconfig in sd card and run it ,but no use all the same.
[root@(none) /dev]# /mnt/onboard/ntx_hwconfig -s -p /dev/mmcblk0
ntx_hwconfig_ap.c(408):Hw config header check error (-2)!
, size=0 bytes :
command hwcfg fail !!

@Markismus
Copy link
Member Author

This is new! What are your installed firmwares for the Touches?
What does the command /bin/kobo_config.sh generate as a result?
What does the command /bin/ntx_hwconfig generate as a result?

@bbaixiner
Copy link

@Markismus I upgraded the N905 to 3.3.1 . and ntx_hwconfig -s -p /dev/mmcblk0 reported error , yet.
[root@(none) ~]# ntx_hwconfig -s -p /dev/mmcblk0
ntx_hwconfig_ap.c(408):Hw config header check error (-2)!
, size=0 bytes :
command hwcfg fail !!

/bin/kobo_config.sh

[root@(none) ~]# /bin/kobo_config.sh
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config header error !!
NtxHwCfg_GetCfgFldStrVal : error (-2)
trilogy

And the koreader can run in N905,but the touch action tap need a very quick tap speed to work normally.

@bbaixiner
Copy link

@Markismus The N905B' s hwconfig below , I do not know what diffrence with N905C

(none) login: root
[root@(none) ~]# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v0.7 , size=29 bytes :
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config
 file !!
[0] PCB='E60610'
[1] KeyPad='1Key'
[2] AudioCodec='ALC5623'
[3] AudioAmp='No'
[4] Wifi='WC121'
[5] BT='No'
[6] Mobile='No'
[7] TouchCtrl='neonode'
[8] TouchType='IR-Type'
[9] DisplayCtrl='MX508'
[10] DisplayPanel='6" Bottom EPD'
[11] RSensor='No'
[12] MicroP='MSP430'
[13] Customer='9'
[14] Battery='1000mA'
[15] Led='TYPE1'
[16] RamSize='256MB'
[17] IFlash='Micro SD'
[18] ExternalMem='SD'
[19] RootFsType='Ext4'
[20] SysPartType='TYPE3'
[21] ProgressXHiByte=0x01
[22] ProgressXLoByte=0x68
[23] ProgressYHiByte=0x02
[24] ProgressYLoByte=0xE4
[25] ProgressCnts=0x00
[26] ContentType=0x00
[27] CPU='mx50'
[28] UIStyle='Customer UI'
[29] RAMType=[+]
[30] UIConfig=[+]
[31] DisplayResolution=[+]
[32] FrontLight=[+]
[33] CPUFreq=[+]
[34] HallSensor=[+]
[35] DisplayBusWidth=[+]
[36] FrontLight_Flags=[+]
[37] PCB_Flags=[+]
[38] FrontLight_LEDrv=[+]
[39] VCOM_10mV_HiByte=[+]
[40] VCOM_10mV_LoByte=[+]
[41] PCB_REV=[+]

@Markismus
Copy link
Member Author

Nice!

Too bad you can't get your Touch-C to spit out the data. That would have cleared up the difference between B and C. For now it confirms that the previous data dump is indeed a Touch-B model.

@pazos
Copy link
Member

pazos commented Jul 6, 2014

@giorgio130 I'm on firmware 3.4.1 on a kobo mini and have UIConfig='Normal2' and no swapped coordinates.

@bbaixiner
Copy link

@Markismus Ok, I have got a N905C, It has one more Zforce NN1001A chip.and hwconfig below:

(none) login: root
[root@(none) ~]# ntx_hwconfig -s -p /dev/mmcblk0
HW CONFIG v1.3 , size=35 bytes :
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config
file !!
[0] PCB='E60610D'
[1] KeyPad='1Key'
[2] AudioCodec='No'
[3] AudioAmp='No'
[4] Wifi='WC121A2'
[5] BT='No'
[6] Mobile='No'
[7] TouchCtrl='neonode_v2'
[8] TouchType='IR-Type'
[9] DisplayCtrl='MX508+TPS65185'
[10] DisplayPanel='6" Bottom EPD'
[11] RSensor='No'
[12] MicroP='MSP430'
[13] Customer='9'
[14] Battery='1000mA'
[15] Led='TYPE1'
[16] RamSize='256MB'
[17] IFlash='Micro SD'
[18] ExternalMem='Micro SD'
[19] RootFsType='Ext4'
[20] SysPartType='TYPE3'
[21] ProgressXHiByte=0x01
[22] ProgressXLoByte=0x68
[23] ProgressYHiByte=0x02
[24] ProgressYLoByte=0xE4
[25] ProgressCnts=0x00
[26] ContentType=0x00
[27] CPU='mx50'
[28] UIStyle='Customer UI'
[29] RAMType='K4X2G323PC'
[30] UIConfig='Normal2'
[31] DisplayResolution='800x600'
[32] FrontLight='No'
[33] CPUFreq='NC'
[34] HallSensor='No'
[35] DisplayBusWidth=[+]
[36] FrontLight_Flags=[+]
[37] PCB_Flags=[+]
[38] FrontLight_LEDrv=[+]
[39] VCOM_10mV_HiByte=[+]
[40] VCOM_10mV_LoByte=[+]
[41] PCB_REV=[+]

@bbaixiner
Copy link

@Markismus
some txt documents can not be opened and crash in KOBO Touch,and the large txt files can not be opened too....and zoom the jpeg cause crash too.

@Markismus
Copy link
Member Author

Thanks for the info!

Could you make a separate issue for the crashes? Please add

  • a description of the crash,
  • the file that crashes koreader,
  • the build version of koreader,
  • your device name and
  • the firmware running on your device.

Without this info we can't do much more than writing that we're sorry for you and that it does work for us...

@bbaixiner
Copy link

@Markismus

@Markismus
Copy link
Member Author

Why? What's wrong with Github communication?

houqp pushed a commit to houqp/koreader that referenced this issue Apr 24, 2017
Never pull the GLIBC_2.22 version of fmemopen on Linux.
None of our ARM targets run anything that new.
Fix koreader#421

Note to mainteners: there's an updated patch for the upcoming leptonica
version, because the code got easier to deal with ;).
houqp pushed a commit to houqp/koreader that referenced this issue Apr 24, 2017
Since that block of comments is concerned with that kind of stuff ;).
houqp pushed a commit to houqp/koreader that referenced this issue Apr 24, 2017
... Turns out the old default fmemopen symbol name used a different
version than the one used by the compat symbol... Yay.

Meaning we can only apply the patch when building against glibc >= 2.22,
so, do that.

Fix koreader#421
houqp added a commit to houqp/koreader that referenced this issue Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants