Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2013, 08:39 PM   #1
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Terminal program for PB622/623

Hi,

having tried to use poterm on my PB622 and PB623 devices I found that the lack of buttons on these devices was keeping me from using all its capabilities and decided to write my own version more geared towards use on devices with a touch screen (and using it as a chance to learn how to use the libinkview API;-). You can download the program, including the sources (available under the GPL3), as a "tar.gz" archive from here:

http://users.physik.fu-berlin.de/~jtt/PB/pbterm.tar.gz

Just the compiled program (and the optional configuration file) can be found as a "zip" file at:

http://users.physik.fu-berlin.de/~jtt/PB/pbterm.zip

For more information and instructions on how to install and use the program etc. see

http://users.physik.fu-berlin.de/~jt...DME-pbterm.txt

Note that the program didn't work on the PB622 with firmware version 4.0.373. But it worked after upgrading to the newest 4.2 version. On the PB623 I have only tested it with firmware version 4.3.

Since I don't have any other PocketBook devices beside the PB622 and PB623 I can't tell if the program will also work on other models. If you try the program I would be delighted to get reports about bugs and proposals for new features. My email address is jt@toerring.de and my homepage is http://toerring.de if you want to contact me directly.

Best regards, Jens

Last edited by jtt; 10-11-2013 at 11:41 AM.
jtt is offline   Reply With Quote
Old 09-03-2013, 07:34 AM   #2
dark_skeleton
Junior Member
dark_skeleton began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2012
Device: PocketBook 622
Thanks, works great so far on my PB622 @fw 4.2
dark_skeleton is offline   Reply With Quote
 
Advertisement
Old 09-03-2013, 10:22 AM   #3
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi,

Quote:
Originally Posted by dark_skeleton View Post
Thanks, works great so far on my PB622 @fw 4.2
Thanks for letting me know! I just found out that it looks as if one actually can use pseudo-terminals on PocketBooks (I had read somewhere that there would be some permission isues with that, but this doesn't seem to be the case anymore;-) and now am trying to updating the program to use that instead of a set of pipes. I'll post here again if I get it to work.

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-03-2013, 07:16 PM   #4
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi,

a new version of the program, using a pseudoterminal instead of a set of pipes for the internal communication with the shell, is ready for download. Just use the links from my first post, they will now let you download the new 1.1 version of the program.

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-05-2013, 11:20 AM   #5
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi,

again there's a new version: realizing that with using a PTY now also job control is possible I added a new submenu for sending ^C and ^Z to the shell. Besides, a few minor bugs have been fixed.

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-05-2013, 04:44 PM   #6
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Terminal

Hi jtt,

it does not work on PB903 with Firmware 2.06 (although it has a Stylus touch Screen).

it does not work on my PB603 with latest Firmware as well.

Perhaps i would have success by building it from source. But i did not yet. Just tried the .app.
MartinZ is offline   Reply With Quote
Old 09-05-2013, 05:40 PM   #7
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi Martin,

Quote:
Originally Posted by MartinZ View Post
it does not work on PB903 with Firmware 2.06 (although it has a Stylus touch Screen).

it does not work on my PB603 with latest Firmware as well.

Perhaps i would have success by building it from source. But i did not yet. Just tried the .app.
I unfortunately can't make any useful statements about other devices than the ones I have and tested it on - and even on the PB622, which I would tend to assume to be rather similar to the PB623, it only worked after the upgrade to the newest FW version. Before it simply crashed om start-up and a backtrace() showed that it happened already on the topmost level (i.e. with only a single entry in the backtrace, something that I can't remember to have seen before in more than two decades of programming under UNIX), so there were no hints at what might have gone wrong...

One question: on my device, when I run 'strings' on the application ('ldd' unfortunately seems to be missing on the device and from the SDK), one of the first things I see is '/lib/ld-linux.so.3'. Some of the programs I downloaded to try and that didn't work had '/lib/ld-linux.so.2' instead there. Perhaps the PB903 is, even with the new FW, still using the 2 version of ld-linux.so. In that case I'm rather sure you will have to compile it yourself in order to get it to run.

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-05-2013, 07:28 PM   #8
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: 1,743
Karma: 4368476
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
The /lib/ld-linux.so.2 library was used on the older 3XX models. They also used a different ABI, so the programs for it are incompatible with devices made over the last three years. That would explain why you couldn't run those on your new devices. There is only one SDK for the newer devices, and the binaries built with it should be compatible across all of them. It's possible that the pty permissions are different between devices and firmware versions, though. If you really want to know about such details, you can download the firmware updates for each model, unpack them (search for pbfwsplit.pl online), and see what /dev/ and /etc/ look like for each one.
rkomar is offline   Reply With Quote
Old 09-06-2013, 06:46 AM   #9
paolog
Zealot
paolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five wordspaolog can name that ebook in five words
 
paolog's Avatar
 
Posts: 116
Karma: 37518
Join Date: Nov 2012
Location: Milan / Italy
Device: pocketbook touch 622
hi Jens

perfect!!!!

I'm using poterm since I bought my device one year ago, but with the touch limitatons you mentioned it was not very handy

thanks a lot for sharing your work

paolog is offline   Reply With Quote
Old 09-06-2013, 09:36 AM   #10
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi rkomar,

thanks for the information about the ld-linux.so.2/3 issue.

And then thank you even more for the stuff about the splitter program for SWUPDATE.BIN, that's very, very interesting;-) Perhaps it would even be possible to reassemble it again... The only drawback is that, at least with the firmware file I had a look at, /dev doesn't have PTYs, I guess they get created automatically on system startup.

Why the program crashes on some systems and not on others is still a mystery to me, at least when, as you say, it should work on all newer systems. My debugging attempt with the PB622 with older firmware didn't lead to any useful clues - all I found was that it's a SEGFAULT. Ok, I know how easy they are to make and how hard to find, but i hope my program is rather clean (no direct memory allocation, just via C++ methods) and I don't see where I could possibly write into memory I do not "own", so I'm tempted to blame the firmware;-) Well, it could be that exceptions are not enabled and thus an object creation failing due to memory exhaustion may have, instead throwing an exception, crashed the program in some ugly way. Got to look into that...

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-06-2013, 04:20 PM   #11
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: 1,743
Karma: 4368476
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
Look within the /usr/dev directory within rootfs.img. Because the root filesystem is read-only, the device has to put modifiable files in /var, and stuff like /var/dev is copied there from other read-only places during the installation. It's a bit convoluted, but makes sense after a while.

As far as your crashes go, you could probably install strace or even gdb from the Debian lenny armel distribution on your device and then use something like utelnetd to run your program on the device and watch what happens.
rkomar is offline   Reply With Quote
Old 09-06-2013, 06:54 PM   #12
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi rkomar,

Quote:
Originally Posted by rkomar View Post
Look within the /usr/dev directory within rootfs.img. Because the root filesystem is read-only, the device has to put modifiable files in /var, and stuff like /var/dev is copied there from other read-only places during the installation. It's a bit convoluted, but makes sense after a while.
Thanks, found it now, there's a dev.tar file in that somewhat surprising location;-) Looks a bit as if only the permissions on /dev/ptmx are relevant.

Quote:
As far as your crashes go, you could probably install strace or even gdb from the Debian lenny armel distribution on your device and then use something like utelnetd to run your program on the device and watch what happens.
Would love to do something like that but until now I can't get the WLAN stuff to work on my network with static IP addresses (and configuring it manually seems to be impossible due to permission issues:-( So at the moment I'm still reduced to having the program write some debug output into a file and download that after it crashed via USB. Feels a bit like writing device drivers where I also could only hope that some relevant information had made it to the kernel log files before the machine locked up;-)

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-06-2013, 07:01 PM   #13
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi Martin,

Quote:
Originally Posted by MartinZ View Post
it does not work on PB903 with Firmware 2.06 (although it has a Stylus touch Screen). it does not work on my PB603 with latest Firmware as well.
Since rkomar raised the question of permission issues: did you have a look at the log file ('system/share/pbterm/pbterm.log' unless you reconfigured it)? If this is due to such an issue you might find some error messages related to that in there... Of course, that's assuming that you already tried the version using pseudoterminals (1.1 and higher), in the first one it used pipes, so this shouldn't be relevant).

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-06-2013, 09:30 PM   #14
jtt
Connoisseur
jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.jtt can successfully navigate the Paris bus system.
 
Posts: 95
Karma: 36996
Join Date: Aug 2013
Location: Berlin, Germany
Device: PB 622, PB 623
Hi paolog,

thanks for the 'thumbs up", it's good to know that at least for some people it does the job;-) I hope that I'lll be able to get the other problems solved at last with a bit more experience with this platform.

Best regards, Jens
jtt is offline   Reply With Quote
Old 09-07-2013, 12:32 AM   #15
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: 1,743
Karma: 4368476
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623
I tried to run the program and got a segfault very early on. Here's what's in the pbterm.log file:

ERROR: posix_openpt() failed: Permission denied

I'm running the 902, with it's latest, but rather old, firmware.
rkomar is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal-Programm für PB622 und 623 jtt PocketBook 9 09-15-2013 12:56 PM
New user questions PB622 muntesco PocketBook 2 02-02-2013 09:29 AM
Zeiteinstellungen PB622 fr3d PocketBook 5 07-11-2012 02:00 PM
wlan mit pb622 sebigbos PocketBook 13 07-11-2012 10:03 AM
Tastatursperre PB622 fr3d PocketBook 1 07-03-2012 04:20 AM


All times are GMT -4. The time now is 02:51 PM.


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