I just realized today that my TP-Link Wireless router is supporting Nokia E52 phone on its native firmware, without any additional modem firmware.
although on their website, nokia support isnt mentioned anywhere, it does detect the nokia phone as 3G USB modem, here is the "officially" modem support from their website.
and here is my TL-MR3420 configuration that shows Nokia E52-1 as 3G USB Modem.
if somebody mind to ask, why I use my expensive phone as 3G modem on wireless router ???, why not ??, I have unlimited data plan on the phone, and the router is charging the phone too on its USB port. :-D
==========================
update for firmware version :
Firmware Version: 3.11.10 Build 100901 Rel.52652n
Hardware Version: MR3420 v1 00000000
==========================
Monday, June 20, 2011
Wednesday, June 8, 2011
J2ME: Graphic Text and Bars
Above J2ME graphic demonstration is a combination between text display, for the menu, and canvas for the graphic, here is the source code, each screen above is on separate file.
/*
* Filename : GraphicDemo.java
*/
package GraphicDemo;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class GraphicDemo extends MIDlet implements CommandListener {
private Command exitCommand; // The exit command
private Display display; // The display for this MIDlet
List lsMain;
GDBars GDBars = null;
GDText GDText = null;
static final Command EXIT_CMD = new Command("Exit", Command.EXIT, 1);
static final Command BACK_CMD = new Command("Back", Command.BACK, 1);
public GraphicDemo() {
display = Display.getDisplay(this);
lsMain = new List("Graphic Demo menu", Choice.IMPLICIT);
lsMain.append("Bars Demo",null);
lsMain.append("Text Demo",null);
lsMain.addCommand(EXIT_CMD);
lsMain.setCommandListener(this);
GDBars = new GDBars(this, lsMain);
GDText = new GDText(this, lsMain);
}
public void startApp() {
display.setCurrent(lsMain);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void setDisplay(Displayable d)
{
display.setCurrent(d);
}
public void commandAction(Command c, Displayable s) {
if (s instanceof List) {
List obj = (List)s;
if (obj == lsMain) {
if (c == EXIT_CMD)
{
destroyApp(false);
notifyDestroyed();
}
else {
switch(lsMain.getSelectedIndex()) {
case 0:
display.setCurrent(GDBars);
break;
case 1:
display.setCurrent(GDText);
break;
}
}
}
}
}
}
/*
* Filename : GDText.java
*/
package GraphicDemo;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Font;
/**
Draws Text on a Canvas using the drawing methods
in the javax.microedition.lcdui.Graphics class.
@see javax.microedition.lcdui.Graphics
*/
public class GDText extends Canvas implements CommandListener
{
// Constant representing the color white.
private static final int WHITE = 0xFF << 16 | 0xFF << 8 | 0xFF;
private Command back = new Command("Back",Command.BACK,1);
GraphicDemo graphicdemo; // Reference to display object
Displayable backscreen;
//private Display display = Display.getDisplay(GraphicsDemo.getInstance());
public GDText ( GraphicDemo graphicdemo, Displayable backscreen )
{
super();
this.graphicdemo = graphicdemo;
this.backscreen = backscreen;
addCommand(back);
setCommandListener(this);
}
/**
Paints the clip rectangle white, effectively erasing
whatever was displayed on the Canvas previously.
*/
protected void paintClipRect(Graphics g)
{
int clipX = g.getClipX();
int clipY = g.getClipY();
int clipH = g.getClipHeight();
int clipW = g.getClipWidth();
int color = g.getColor();
g.setColor(WHITE);
g.fillRect(clipX, clipY, clipW, clipH);
g.setColor(color);
}
/**
Paints the look of this Canvas subclass.
*/
public void paint(Graphics g)
{
paintClipRect(g);
int width = getWidth();
int height = getHeight();
g.setFont(Font.getDefaultFont());
g.drawString("Default", 5, 30,Graphics.LEFT | Graphics.BOTTOM);
g.setFont(Font.getFont(Font.FACE_SYSTEM,Font.STYLE_PLAIN,Font.SIZE_LARGE));
g.drawString("Large", 5, 53,Graphics.LEFT | Graphics.BOTTOM);
g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_ITALIC,Font.SIZE_MEDIUM));
g.drawString("Medium", 5, 71,Graphics.LEFT | Graphics.BOTTOM);
g.setFont(Font.getFont(Font.FACE_PROPORTIONAL,Font.STYLE_UNDERLINED,Font.SIZE_SMALL));
g.drawString("Small", 5, 90,Graphics.LEFT | Graphics.BOTTOM);
g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_BOLD,Font.SIZE_MEDIUM));
g.drawString("V", width - 10, 20,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("E", width - 10, 32,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("R", width - 10, 44,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("T", width - 10, 56,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("I", width - 10, 68,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("C", width - 10, 80,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("A", width - 10, 92,Graphics.RIGHT | Graphics.BOTTOM);
g.drawString("L", width - 10, 104,Graphics.RIGHT | Graphics.BOTTOM);
g.drawChar('B', width - 25, 20,Graphics.RIGHT | Graphics.BOTTOM);
g.drawChar('O', width - 25, 32,Graphics.RIGHT | Graphics.BOTTOM);
g.drawChar('L', width - 25, 44,Graphics.RIGHT | Graphics.BOTTOM);
g.drawChar('D', width - 25, 56,Graphics.RIGHT | Graphics.BOTTOM);
}
public void commandAction(Command c, Displayable d)
{
if (c == back)
{
graphicdemo.setDisplay(backscreen);
}
}
}
/*
* Filename : GDBars.java
*/
package GraphicDemo;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Command;
/**
Draws rectangles on a Canvas using the drawing methods
in the javax.microedition.lcdui.Graphics class.
@see javax.microedition.lcdui.Graphics
*/
public class GDBars extends Canvas implements CommandListener
{
// Constant representing the color white.
private static final int WHITE = 0xFF << 16 | 0xFF << 8 | 0xFF;
private Command back = new Command("Back",Command.BACK,1);
GraphicDemo graphicdemo; // Reference to display object
Displayable backscreen;
//private Display display = Display.getDisplay(GraphicsDemo.getInstance());
public GDBars ( GraphicDemo graphicdemo, Displayable backscreen )
{
super();
this.graphicdemo = graphicdemo;
this.backscreen = backscreen;
addCommand(back);
setCommandListener(this);
}
/**
Paints the clip rectangle white, effectively erasing
whatever was displayed on the Canvas previously.
*/
protected void paintClipRect(Graphics g)
{
int clipX = g.getClipX();
int clipY = g.getClipY();
int clipH = g.getClipHeight();
int clipW = g.getClipWidth();
int color = g.getColor();
g.setColor(WHITE);
g.fillRect(clipX, clipY, clipW, clipH);
g.setColor(color);
}
/**
Paints the look of this Canvas subclass.
*/
public void paint(Graphics g)
{
paintClipRect(g);
int width = getWidth();
int height = getHeight();
int x0 = 5;
int y0 = 5;
int barW = 10;
int initHeight = height - 10;
int deltaH = 10;
g.drawRect(x0, y0, barW, initHeight);
g.fillRect(x0 + barW, y0 + deltaH, barW,
initHeight - deltaH + 1);
g.drawRect(x0 + barW * 2, y0 + deltaH * 2,
barW, initHeight - deltaH * 2);
g.setColor(255, 00, 00);
g.fillRect(x0 + barW * 3, y0 + deltaH * 3,
barW, initHeight - deltaH * 3 + 1);
g.setColor(0, 0, 0);
g.drawRect(x0 + barW * 4, y0 + deltaH * 4,
barW, initHeight - deltaH * 4);
g.fillRect(x0 + barW * 5, y0 + deltaH * 5,
barW, initHeight - deltaH * 5 + 1);
g.drawRect(x0 + barW * 6, y0 + deltaH * 6,
barW, initHeight - deltaH * 6);
g.fillRect(x0 + barW * 7, y0 + deltaH * 7,
barW, initHeight - deltaH * 7 + 1);
}
public void commandAction(Command c, Displayable d)
{
if (c == back)
{
graphicdemo.setDisplay(backscreen);
}
}
}
Thursday, June 2, 2011
Got error code 2869 on Vista or Seven ??
Basically this error is coming from MSI packages that build for system before Vista, means, installation process is not compatible with new security schemes that applied on Vista and 7.
on EXE file type installation, we can right click on the icon and choose "Run As Administrator", but on MSI packages, we dont have that option, here is the work around to get MSI packages run under administrator privileges.
1) Copy the .MSI file to the root directory of main hard drive (i.e. C:\).
2) Open Windows Notepad.
3) Copy this text into windows notepad:
msiexec /i C:\program_name.msi
4) Replace the text "program_name" in with the actual name of the .MSI file .
5) Click File -> Save ...
Instead of saving it as a .txt file, change the file name to installer.bat.
Save the file to place where we can find it easily, ie desktop.
6) right click on the file and select Run as Administrator.
Subscribe to:
Posts (Atom)