Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2024, 06:55 AM   #1
Michal Jancik
Sorry for my English
Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.
 
Michal Jancik's Avatar
 
Posts: 464
Karma: 3009898
Join Date: Aug 2018
Location: France.Besancon
Device: KOBO.PocketBook.ONYX
I need advice on how to send a binary file to a Pocketbook via UART from a PC.

Hi gang !

After a bad manipulation on the Pocketbook, I inadvertently deleted the important file for starting the device HWCONFIG.BIN

DEVICE

• Pocketbook Inkpad 4

EVENTS

• The device can be started, the screen does not respond, you can only see the text Pocketbook.

• After connecting the device to the PC (Win/Linux) I don't have the option to connect via USB, which would be really simple, so I could upload the HWCONFIG file to the root directory, which I would copy to the "/boot" folder and the problem would be solved, unfortunately life is not that simple.

• I can only access the device through the UART port, when starting the device I see an error message that the device cannot be started because it cannot find the configuration file (HWconfig, which contains information about the device)


I tried software on the PC side such as E-KEMRIT & KERMIT et which uses an older protocol like XMODEM, YMODEM or ZMODEM , but I think that in order for the file to be transferred I would have to run minicom on the Inkpad side as well?

It seemed that I somehow managed to send a file from the PC to the Pocketbook once, but I couldn't find it anywhere on the device (pocketbook) (I don't even know where to look for it).

QUESTION

Does anyone have experience, a suggestion, or a procedure how I could send the HWBIN file to the Pocketbook using UART or otherwise?

I tried to activate and mount the USB port through the command line (on the pocketbook page), but without success, even when Windows made the classic sound of the device being connected, but no drive appeared.

It is not a simple text file where it is possible to manually write the information model=, scren= etc. through the text editor, but a binary file, so creating the HWCONFIG.BIN file manually is not considered.

Well, maybe there will be someone who knows superhuman skills and will be able to give some advice or point me in the right direction.

I downloaded the original and the new HWCONFIG.BIN file from another Inkpad4 device. At the very least, take this as a warning that when you do the slightest manipulation with files, always remember to make backups..

Last edited by Michal Jancik; 07-05-2024 at 07:06 AM.
Michal Jancik is offline   Reply With Quote
Old 07-05-2024, 10:07 AM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,015
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Can you copy it to an SD card on your desktop, and then insert that into the inkpad and copy it from there?
rkomar is online now   Reply With Quote
Advert
Old 07-05-2024, 04:43 PM   #3
Michal Jancik
Sorry for my English
Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.
 
Michal Jancik's Avatar
 
Posts: 464
Karma: 3009898
Join Date: Aug 2018
Location: France.Besancon
Device: KOBO.PocketBook.ONYX
Quote:
Originally Posted by rkomar View Post
Can you copy it to an SD card on your desktop, and then insert that into the inkpad and copy it from there?
Sure, under normal circumstances it would be solved, but the Inkpad 4 doesn't have an SD slot
Michal Jancik is offline   Reply With Quote
Old 07-05-2024, 07:59 PM   #4
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,015
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
How big is the missing file? If it isn't too big, you could 'echo' the contents into the file from the shell. For example, to write 0x00ff to a file:

echo -n -e \\x00\\xff > hwconfig
rkomar is online now   Reply With Quote
Old 07-06-2024, 10:28 AM   #5
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 771
Karma: 625816
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Is this your site?
https://cod-box.net/pocketbook-conne...via-uart-hack/

Did you try acces with Allwinner Tools?
nhedgehog is offline   Reply With Quote
Advert
Old 07-06-2024, 11:40 AM   #6
Michal Jancik
Sorry for my English
Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.Michal Jancik ought to be getting tired of karma fortunes by now.
 
Michal Jancik's Avatar
 
Posts: 464
Karma: 3009898
Join Date: Aug 2018
Location: France.Besancon
Device: KOBO.PocketBook.ONYX
Quote:
Originally Posted by nhedgehog View Post
Is this your site?
https://cod-box.net/pocketbook-conne...via-uart-hack/

Did you try acces with Allwinner Tools?
I have already managed to connect the device via USB from UBOOT (mass_test) and copy HWCONFIG to Inkpad. The device starts up, I can see the services in the background, but the screen does not respond.

------------------------

1) Basically, I eliminated the original problem by chance thanks to rkomar
I started Inkpad 4, entered the command "echo -n -e \\x00\\xff > hwconfig", which logically returned the error "read only"

2) So I enabled writing by command: mount -o rw,remount /boot/

3) Now I was able to execute the "[I]echo -n -e \\x00\\xff >, but after entering it, the Inkpad restarted and the system did not start at all and I immediately got into "UBOOT/:" which actually helped me, because after entering "-help" I noticed a command that sounded something like "mass_testt" which when I started, the BOOT partition opened as a folder on the PC and so I could copy the HWCONFIG file directly through the file manager

I don't know what the echo** command even did, but it basically fixed the original problem. Now, when I write HWCONFIG in the Pocketbook console, the items about the device are listed, which of course was not possible before. Anyway, it actually helped me

So at the moment the device booting ok, in the console I can see that the system is running in the background but the screen is not showing anything, so now I have to remove the display problem, but as I write, the original problem of how to get the HWCONFIG file back to Inkpad, I basically succeeded, although probably due to my clumsiness ans chance, I managed to upload it back .

--------------------------------------------------------------------------------------

I'm attaching a screen with the beginning of the log when the device starts, I can't see an error that would tell me what's going on anywhere:

Spoiler:


Commande from UBOOT for conect USB port mount "/boot" partition :

uboot:/mass_test

Attached Thumbnails
Click image for larger version

Name:	PB_UART_START_LOG.png
Views:	107
Size:	80.6 KB
ID:	209411   Click image for larger version

Name:	UBOOT_connect_USB_port_boot_partition.png
Views:	99
Size:	37.7 KB
ID:	209434  

Last edited by Michal Jancik; 07-07-2024 at 11:30 AM.
Michal Jancik is offline   Reply With Quote
Old 07-12-2024, 02:14 AM   #7
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,015
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Oh man, I cannot believe how that turned out. My example was just to show how to write consecutive bytes to a file using the shell, and the numbers I chose were picked out of the blue. I expected that you would replace those two bytes with whatever bytes your original HWCONFIG file contained. I'm glad that it somehow worked out, though.
rkomar is online now   Reply With Quote
Old 07-12-2024, 09:43 AM   #8
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 771
Karma: 625816
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
But it lead to a cool solution. Good to know!
nhedgehog is offline   Reply With Quote
Old 07-12-2024, 01:46 PM   #9
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,015
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
"echo" just writes the following stuff to standard output. "-n" tells it to not add a linefeed character at the end. "-e" tells it to enable interpretation of backslash escapes. "\xNN" echoes the binary byte 0xNN. So, "\x00\xff" would echo the two bytes 0x00 and 0xff to standard output. I didn't put quotes around the input, so I had to escape the backslashes: '\x00\xff' == \\x00\\xff (no quotes). And of course, " > hwconfig" redirects standard output to the file named "hwconfig". So, my command just wrote the two binary bytes 0x00 and 0xff to the file named "hwconfig". I suspect that writing such garbage input to that file caused problems for uboot and made it stop and bring up an interactive session.
rkomar is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PW5 Getting UART and UART root shell on PW5 trimen Kindle Developer's Corner 16 07-21-2024 08:34 AM
IQ POCKETBOOK UART Conect Michal Jancik PocketBook Developer's Corner 9 04-23-2024 01:35 PM
How can I send a complex EPUB file via Send Kindle? Vroo Amazon Kindle 8 12-16-2023 10:00 PM
[Linux] Calibre 6.8.0 not starting "cannot execute binary file" Artemide Calibre 1 11-09-2022 05:17 PM
FILE. Program to identify a file's format by scanning binary data for known patterns. twobob Kindle Developer's Corner 3 05-13-2013 01:59 PM


All times are GMT -4. The time now is 07:44 PM.


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