Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2010, 11:25 AM   #1
bero
Linux Developer
bero began at the beginning.
 
Posts: 5
Karma: 30
Join Date: Jan 2010
Location: Switzerland
Device: Sony PRS-505
Accessing the keyboard from a C++ application

Hi,
does anyone know how to access the keyboard on a PRS-505 from a C++ application (native ARM code -- not using Fsk)?

All the standard ways (stdin, /dev/input/event*, /dev/input/keyboard, ...) don't seem to work...

bero is offline   Reply With Quote
Old 01-03-2010, 02:58 PM   #2
bero
Linux Developer
bero began at the beginning.
 
Posts: 5
Karma: 30
Join Date: Jan 2010
Location: Switzerland
Device: Sony PRS-505
Figured it out by looking at lsof output -- /dev/ttyDB0 seems to give direct access to the keyboard controller. However, access has to be rather fast or the tinyhttp process in the background starts eating it all up.

The controller's messages are sent in groups of 5 bytes. The first byte seems to be a message type indicator, A key press event has 0xb1 KEYCODE 0x2b in the first 3 bytes, 0xb1 KEYCODE 0x2d in the first 3 bytes is a key release event (in both cases, the 3rd byte is the key code.
The 4th byte doesn't seem to have a meaning (at least for keyboard events), the 5th is a checksum (first xor last == 0xff)

Any message needs to be ACK-ed or NAK-ed (or the commands are bounced back to tinyhttp once the application exits). The ACK code seems to be 0xa2 0x00 0x00 x00 0x5d, NAK seems to be 0xa3 0x00 0x00 0x00 0x5c.

Last edited by bero; 01-03-2010 at 03:05 PM. Reason: Added information on ACK/NAK-ing data from the controller
bero is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iPad Clarifications on Accessing PDFs Please mvaldeslora Apple Devices 13 04-18-2010 12:29 PM
Accessing internal and SD Storage ramjet1953 OpenInkpot 2 02-16-2010 10:51 AM
Accessing Gmail kellstr Amazon Kindle 3 09-24-2008 06:22 AM
Accessing many files on an SD card charliearmoryco Amazon Kindle 8 01-25-2008 08:30 PM
Mobile accessing your PC while on vacation Colin Dunstan Lounge 1 08-02-2005 02:15 PM


All times are GMT -4. The time now is 06:01 AM.


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