söndag 9 januari 2011

MobileLCD

Description
MobileLCD is a J2ME (MIDP2.0) implementation of just enough of the commands in the Goldelox MD1 graphical display module command set to make the GOLDELOX driver in serdisplib work. It can be seen as an J2ME serial LCD Emulator.
The application uses the StreamConnection class and has been tested using, but should not be limited to:
  • Serial port
  • Serial port over Bluetooth

Specs
  • Resolutions: 320, 220, 176, 160, 128, 96, 64
  • Implemented commands: 0x42, 0x45, 0x49, 0x55, 0x56, (0x59 returns ACK but doesn't do much)
  • Goldelox MD1 mode
  • Experimental PICASO SGC rev 5 mode
  • No backlight or screensaver control

Usage
Specify serial port
At startup LCDEmu enumerates the serial ports available on the device (not including Bluetooth ports).
  • To open one of the enumerated serial ports use comm:. Example: comm:USB2
  • To make a serial port connection over Bluetooth use btspp://<remote device address> <channel> Example: btspp://001122334455:1
Set resolution
The resolution can be selected using a list of valid values.
Run
When the set up is done press Run.

Using with Linux
USB cable
When connecting a phone to my Debian box using an USB cable three serial ports show up under /dev/ and it's only a matter of pointing serdisplib to the right one
The display can be tested with serdisplibs testserdisp command (make sure you have the correct permissions to use the port:
testserdisp -n GOLDELOX -p "RS232:/dev/ttyACM2" -d 2

Bluetooth
To connect a phone to my Debian box using Bluetooth I use rfcomm (in bluez-utils package?):
# You probably have to pair your phone with the computer before trying this.
# Add a Serial Port Profile to our computer
sdptool add SP
# Wait for phone to connect to channel 1, create /dev/rfcomm2
rfcomm listen 2 1
# Test display
testserdisp -n GOLDELOX -p "RS232:/dev/rfcomm2" -d 2


Lcd4linux talking to MobileLCD running on a Nokia 2760 over Bluetooth:
Lcd4linux talking to MobileLCD running on a SE P990 over USB:

Download

MobileLCD_0.02.jad 

MobileLCD_0.02.jar

Inga kommentarer:

Skicka en kommentar