![]() |
#1 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
displayMgrClient protocol
OK, got this all figured out.
Port number is 50555. Code:
root@ereader:/usr/bin# displayMgrClient -d 10.0.1.2 From: /10.0.1.3 length: 6 data: 21302c312c30 ascii: !0,1,0 root@ereader:/usr/bin# displayMgrClient -d 10.0.1.2 -t From: /10.0.1.3 length: 21 data: 21312c312c302c342c3939362c3730302c31303230 ascii: !1,1,0,4,996,700,1020 root@ereader:/usr/bin# displayMgrClient -d 10.0.1.2 -p From: /10.0.1.3 length: 22 data: 21312c312c302c3130302c3130302c3330302c333030 ascii: !1,1,0,100,100,300,300 From: /10.0.1.3 length: 22 data: 21312c312c302c3530302c3730302c3730302c393030 ascii: !1,1,0,500,700,700,900 Code:
import java.net.DatagramSocket; import java.net.DatagramPacket; public class Display { public static void main(String[] args) throws Exception { byte[] buf = new byte[256]; DatagramSocket s = new DatagramSocket(50555); DatagramPacket p = new DatagramPacket(buf, 256); while (true) { s.receive(p); System.out.println("From: " + p.getAddress() + " length: " + p.getLength() + " data: " + toHexString(buf, p.getLength()) + " ascii: " + new String(buf, 0, p.getLength())); } } public static String toHexString(byte bytes[], int length) { StringBuffer retString = new StringBuffer(); for (int i = 0; i < length; ++i) { retString.append(Integer.toHexString(0x0100 + (bytes[i] & 0x00FF)).substring(1)); } return retString.toString(); } } Code:
import java.net.DatagramSocket; import java.net.DatagramPacket; import java.net.InetAddress; public class Client { public static final int DISPLAY_MGR_PORT = 50555; private static final byte[] ENTIRE_DISPLAY = "!0,1,0".getBytes(); public static void main(String[] args) throws Exception { refreshEntireDisplay(); } public static void refreshEntireDisplay() throws Exception { DatagramPacket p = new DatagramPacket(ENTIRE_DISPLAY, ENTIRE_DISPLAY.length, InetAddress.getLocalHost(), DISPLAY_MGR_PORT); DatagramSocket s = new DatagramSocket(); s.send(p); s.close(); } } ![]() Now I just need to go find where to bury the code in Wonka's AWT implementation... Last edited by scotty1024; 10-22-2006 at 02:40 PM. Reason: Added tested client code |
![]() |
![]() |
![]() |
#2 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
By the way, Java's AWT understands and calculates updated area information.
I just need to hook that and send the update area message to the display manager. When you press a button, just the button will be erased and re-drawn. Should be every bit as smooth as everyone wants. I suspect iRex's issue with doing partial updates from X is what to do when multiple things are redrawn at the same time. X will produce multiple update areas which would look kinda strange. I'll have Java composite the areas and thus send one larger update area so you only get one blink. Wonka also supports writing directly to the standard linux fbdev. At some point it might be possible to just take down the X server entirely... |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Yes, this is a quite old thread.
I raised this thread just to share what I found in iRex DR series GTK+ patches. If somebody want to incoporate eink update in his C code, here it is (extracted from eink-display-update.patch from iRex): Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
e-Book Care and Protocol. | sceadugenga | General Discussions | 46 | 08-22-2010 02:09 AM |
Whispernet Protocol | xeijix | Kindle Developer's Corner | 1 | 03-08-2009 10:22 PM |
PC sync protocol | dumky | Which one should I buy? | 2 | 01-04-2008 01:33 PM |
Skype protocol cracked for real? | Alexander Turcic | Lounge | 0 | 07-15-2006 08:10 AM |
Skype protocol disassembled | TadW | Lounge | 0 | 01-27-2005 07:11 AM |