Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-19-2017, 02:15 PM   #1
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Retrieve Mark model number via bash

Hi,

I'm looking for a bash script which retrieve the Kobo reader model number (e.g. Mark 5 or Mark 6).

Does anyone know where to dig?

I've tried

find / -type f -exec grep -H 'Mark\s[0-9]' {} +

but it takes really long time

Thanks for help.
helour is offline   Reply With Quote
Old 06-19-2017, 09:45 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I don't know of anywhere on the device that you can get that. And I think that's because the "mark" is a bit of a fiction. It roughly represents hardware versions, but, each device within are different enough that other than for collecting a firmware update file, it's pretty useless.

The only way I can think of getting the mark directly is to request a firmware update and look at the response. If you use an old version number as part of the request, it will always give the update URL. You will need to read the version file to get the serial number and the other id that is in there.

The other thing you can do is parse the version file and derive the mark from the the serial number or the id. There's a list around here somewhere of the ids and models.

But, to me, the real question is: What are you trying to do? Knowing that maybe someone can suggest another way to do what you are after.
davidfor is offline   Reply With Quote
Advert
Old 06-20-2017, 10:35 AM   #3
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Solved

I've found this useful command in the /bin/kobo_config.sh:

Code:
ntx_hwconfig -s -p /dev/mmcblk0 PCB 2>/dev/null
On my Kobo Glo HD this script prints 'E60Q90'.

The another useful info is inside the folder /upgrade/mx6sl-ntx/ of each kobo-update-x.y.zzzz zip file.
helour is offline   Reply With Quote
Old 06-20-2017, 07:40 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by helour View Post
I've found this useful command in the /bin/kobo_config.sh:

Code:
ntx_hwconfig -s -p /dev/mmcblk0 PCB 2>/dev/null
On my Kobo Glo HD this script prints 'E60Q90'.
Yes, that script is used in "/etc/eint.d/rcS" while working out what is available for an upgrade. And the id returned is used work out which u-boot and uImage file to use. And "ntx_hwconfig" is used with other parameters to determine other details of the hardware.
Quote:
The another useful info is inside the folder /upgrade/mx6sl-ntx/ of each kobo-update-x.y.zzzz zip file.
Well that's were the uImage and u-boot files are. But, be careful you use the right one for your device.

All the above is reasonably well known. I don't really consider the id you have found a substitute for the "mark". It's probably better, but there are alternatives that might be better depending on what you are actually trying to do. Care to share what the purpose is?
davidfor is offline   Reply With Quote
Old 06-21-2017, 08:09 AM   #5
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
I want to create "multimodel" (Mark3-Mark6) keyboard patch for Slovak(Czech) UI. Because there are more than one libnickel.so (and more than one patch too) (it depends on the Kobo model), my script needs to copy the right patched libnickel.so file to a Kobo device.

I realize that there may be other (maybe better) solution than the checking the hw PCB value.
helour is offline   Reply With Quote
Advert
Old 06-21-2017, 10:16 AM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Where do you get the idea there are different versions of the libnickel.so for each device? If you compare the firmware packages for the same release, they are virtually identical. The differences are in drivers, images and some fonts. The executables are identical.

There are difference in what you see on the screen, but they are runtime choices by the code. The keyboard is different between the older and newer devices. Or maybe it is the difference in resolution. I don't have an Aura Edition 2 to compare the keyboard with my Glo, so I don't know exactly what the rule is. That does mean you probably need to patch two parts of the code, but you should be able to do it in one copy of the executable.

To me the simplest way to do this is the same as the other patching. Do it on the PC. If you do find you need to do things differently for each type of device, you could do it based on the contents of the "update" directory. Or do it when the device is connected and look at the version file on the device. Then build the KoboRoot.tgz and copy it to the device.
davidfor is offline   Reply With Quote
Old 06-21-2017, 10:51 AM   #7
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Big thx . I've compared libnickel files and they are really equal, but:

1. different Kobo models have different keyboard layout
2. the offset positions (base addresses) are exactly same in libnickel file for all models (Mark3-Mark6).

Therefore I have to create 3x libnickel and copy (by script) the right one for actual model. It is intended not for me but for all peoples which want to use/download cs(sk) keyboard patch along with the trans_cs(sk).qm file and others.

Last edited by helour; 06-21-2017 at 11:37 AM.
helour is offline   Reply With Quote
Old 06-21-2017, 08:22 PM   #8
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Aren't you contradicting yourself? The libnickel files are identical, but the keyboard layouts in the same location but are different? I'm not sure how that is possible. But, I just looked at the current patch file, and it does have separate patches for the models with instructions to only patch one.

You shouldn't be creating copies of libnickel and distributing them. These contain proprietary software and hence you would be breaking copyright and licenses. Creating a patch method that can be run against the downloaded firmware update file is probably what you should do. And if you are going to identify the device, then identify them by the model names or number. ie. Show "Glo HD", not "Mark 6". It is clearer to most users, and if there is a difference between keyboards in a particular mark, then you will be covered.
davidfor is offline   Reply With Quote
Old 06-22-2017, 06:26 PM   #9
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
if nickel is running,

Code:
xargs -0 -n 1 echo < /proc/$(pidof nickel)/environ
gives (among other things)

Code:
PRODUCT=dahlia
(for H2O)
frostschutz is offline   Reply With Quote
Old 06-24-2017, 06:33 AM   #10
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Quote:
Originally Posted by davidfor View Post
You shouldn't be creating copies of libnickel and distributing them. These contain proprietary software and hence you would be breaking copyright and licenses.
OK. You are right. My fault. I will create a script that changes the libnickel directly in a Kobo device.
helour is offline   Reply With Quote
Old 06-24-2017, 06:36 AM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by helour View Post
OK. You are right. My fault. I will create a script that changes the libnickel directly in a Kobo device.
Which means you have to package it to install, run once and then not run again. I'm not sure what the advantage of that over the way the other patching is done is.
davidfor is offline   Reply With Quote
Old 06-25-2017, 07:59 AM   #12
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Mark number, PCB value, codename, model name - help please

Hi,

I've created table for the Mark number, PCB value, codename and model name.
Code:
       Mark 3                       Mark 4                       Mark 5                   Mark 6
E60610 - trilogy (Touch B)  E50610  - pixie   (Mini)     E606F0B - phoenix (Aura)  E60Q90 - alyssum  (Glo HD)
                            E60610D - trilogy (Touch C)  E606G0  - dahlia  (H2O)   E60QL0 - star     (Touch 2.0)
                            E606B0  - kraken  (Glo)                                E60QM0 - snow     (Aura Ed. 2)
                            E606C0  - dragon  (Aura HD)                            E70Q00 - daylight (Aura ONE)
I will appreciate any help when checking this table.

Thx.

Last edited by helour; 06-25-2017 at 08:01 AM.
helour is offline   Reply With Quote
Old 06-25-2017, 10:33 AM   #13
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
I think there is a problem with the assignment of the code names snow and star (and also pika).
tshering is offline   Reply With Quote
Old 06-25-2017, 02:25 PM   #14
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6489
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
Is it correct now?
Code:
       Mark 6
E60Q90 - alyssum  (Glo HD)
E60Q90 - pika     ( ???  )     /256MB/
E60QL0 - star     (Aura Ed. 2) /256MB/
E60QM0 - snow     (Touch 2.0)  /512MB/
E70Q00 - daylight (Aura ONE)
Which Kobo model has the codename 'pika'?

Last edited by helour; 06-25-2017 at 03:14 PM.
helour is offline   Reply With Quote
Old 06-25-2017, 03:34 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What about Aura H2O 2nd Edition?
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo Model Number Crusader Kobo Reader 10 12-17-2013 07:34 AM
bash error iomari Calibre 2 08-19-2013 01:40 PM
An available bash 4.2 for KT silverzhao Kindle Developer's Corner 2 02-06-2013 10:37 AM
Does ASIN number on invoice identify kindle model HOW Amazon Kindle 9 11-16-2010 05:33 PM
Sony Reader Daily Edition model number is PRS-900 igorsk News 52 09-18-2009 04:32 PM


All times are GMT -4. The time now is 06:47 PM.


MobileRead.com is a privately owned, operated and funded community.