LinuxMCE Forums
May 25, 2013, 03:40:36 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
  Home Help Search Chat Login Register  
  Show Posts
Pages: 1 ... 23 24 [25] 26 27 28
361  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: December 08, 2008, 10:00:52 pm
Hi Marco,

thanks for the feedback.

The shifted media menu is strange. I think this menu is rendered by the bluetooth_dongle orbiter, so I don't think it has anything to do with the JavaMO itself.

I added device independent key mappings in the second version, so maybe I introduced a bug, although I cannot see any difference to the Nokia key mappings. I'll look into it some more. Maybe you can run the keycodes app that hari posted a while back and report your key codes?

Did the back button take you back one level from the media list before? On hari's original JavaMO or on my first version?
The media list needs more than 250 items to display as a filtered list.

The red button should not exit the app. (if this is not the phones default behaviour?) Maybe you can report the keycode for this key from the keycodes app. also, so that I can add it?

br,
sambuca


362  LinuxMCE / Users / Re: HD tv with internal decoder? on: December 07, 2008, 03:37:15 pm
Hi vorik,

Basically any DVB card supported by linux will work with LMCE, although not necessarily plug-and-play. For smartcard/encrypted channels, you should get a card that supports a CAM/CI for you cable provider.

I suggest checking out the lmce wiki, search this forum for post regarding DVB and cable. The linuxtv.org website is also worth a visit.

br,
sambuca
363  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: December 07, 2008, 12:55:01 pm
Hi again,

I've made some more improvements to the JavaMO. Since last time, I've added basic phone detection, allowing for easy definition of different key mappings. Currently, I've added key mappings for Nokia (the same as was in the original MO), and for SonyEricsson. The SE mappings are made for the W580i phone, I'll try to add for the K800i soon also.
 I've used one class per phone brand (for now). It may be a bit of overkill, but I often find that it is best to separate things at the beginning, because it is easier to expand on it later without creating a mess Smiley

I also found out that the W580i (and quite a few other SE phones according to SE support) does not allow a list to have more than 255 items in them. This explains my problem with all blank entries(besides the last one). To work around this, I implemented a filtered list. The new list checks the number of items, and if it is above a particular size, it displays a list of the first characters in the list. When you select one character, you will see the list of the items starting with that character.
 I think this list also improves navigability of media on the MO. I'd like to get some feedback on this list, both from a usability perspective but also regarding stability (better/worse/same as the plain list).

The list should also handle UTF-8 character now.

New version uploaded to http://hob.dyndns.org/javamo/. Enjoy Cheesy

br,
sambuca
364  LinuxMCE / Users / Re: Why doesn't the LinuxMCE channel list match the MythTV channel guide? on: November 30, 2008, 10:42:42 pm
Hi purps,

Last time I checked, LMCE does not honor the visible flag, it lists every channel. Not sure if this has changed in the upcoming 810 version.

br,
sambuca
365  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 30, 2008, 08:19:49 pm

Here is my patch, finally Wink
I threw together a quick static logging class, and switched my new logging to use it. I thought it might be easier to change it to a logging framework later on when done like this. Not sure how big these frameworks are, and if we want to add it to the MO though. We could probably disable them at build time however...
 
Code:
Index: Makefile
===================================================================
--- Makefile (revision 21508)
+++ Makefile (working copy)
@@ -28,6 +28,8 @@
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_ShowImage.java
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_ShowList.java
  ${JAVAC} ${CFLAGS} com/linuxmce/javamo/BD_CP_Dummy.java
+ ${JAVAC} ${CFLAGS} com/linuxmce/javamo/log/MOLogger.java
+ ${JAVAC} ${CFLAGS} com/linuxmce/javamo/log/Logger.java
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}\$$DrawImageCanvas
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.${MIDLETNAME}\$$ListCommandListener
@@ -47,6 +49,8 @@
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_ShowImage
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_ShowList
  ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.BD_CP_Dummy
+ ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.log.MOLogger
+ ${WTKPATH}/bin/preverify -classpath ${API} com.linuxmce.javamo.log.Logger
  mkdir -p output/com/linuxmce/javamo/res
  cp res/icon.png output/com/linuxmce/javamo/res
  cd output && jar cvfm ${MIDLETNAME}.jar Manifest.mf ./com
Index: com/linuxmce/javamo/BDCommandProcessor.java
===================================================================
--- com/linuxmce/javamo/BDCommandProcessor.java (revision 21508)
+++ com/linuxmce/javamo/BDCommandProcessor.java (working copy)
@@ -19,11 +19,14 @@
 
 package com.linuxmce.javamo;
 
-import javax.microedition.lcdui.*;
-import javax.microedition.midlet.*;
 import javax.microedition.io.StreamConnection;
+
+import com.linuxmce.javamo.log.MOLogger;
+
 import java.util.*;
-import java.io.*;
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.io.IOException;
 
 /**
  * Class to process BDCommands
@@ -46,12 +49,13 @@
  this.mJavaMO = javamo;
  this.m_connection = connection;
  connected = true;
- commandQueue = new Vector();
+ commandQueue = new Vector(20);
  try {
  m_os = m_connection.openOutputStream();
  m_is = m_connection.openInputStream();
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  }
  processorThread = new Thread(this);
  processorThread.start();
@@ -92,29 +96,25 @@
  m_os.flush();
  System.out.println("SendLong:" + output);
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  connected = false;
  }
  }
 
- private long ReceiveLong() {
+ private long ReceiveLong() throws IOException {
  long output = 0;
  int a1,a2,a3,a4;
- try {
- a1 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a1);
- a2 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a2);
- a3 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a3);
- a4 = (int)m_is.read();
- // System.out.println("ReceiveLong: got byte: " + a4);
- output = (a1) + (a2*0x100) + (a3*0x10000) + (a4*0x1000000);
- System.out.println("ReceiveLong: long result: " + output);
- } catch (IOException e) {
- System.err.println(e);
- connected = false;
- }
+ a1 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a1);
+ a2 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a2);
+ a3 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a3);
+ a4 = (int)m_is.read();
+ // System.out.println("ReceiveLong: got byte: " + a4);
+ output = (a1) + (a2*0x100) + (a3*0x10000) + (a4*0x1000000);
+ System.out.println("ReceiveLong: long result: " + output);
  return output;
  }
 
@@ -126,27 +126,41 @@
  }
  m_os.flush();
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, e.toString());
  connected = false;
  }
  }
 
+ private void readFully(byte[] data) throws IOException {
+ int i = 0;
+ while(i < data.length) {
+ int count = m_is.read(data, i, data.length - i);
+ if (count > 0) {
+ i += count;
+ }
+ }
+ }
+
  private byte[] ReceiveData() {
  int size;
- size = (int)ReceiveLong();
+ try {
+ size = (int)ReceiveLong();
 
- if (size < 0) {
- size=0;
+ if (size < 0) {
+ size=0;
+ connected = false;
+ }
+ } catch (IOException e) {
  connected = false;
+ size = 0;
  }
-
  byte[] data = new byte[size];
  try {
- for (int i=0;i<size;i++) {
- data[i] = (byte)m_is.read();
- }
+ readFully(data);
  } catch (IOException e) {
- System.err.println(e);
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.ReceiveData() : " + e.toString());
  connected = false;
  }
  return data;
@@ -182,7 +196,6 @@
 
  public void run() {
  BDCommand l_BDResponseCommand;
-       int data;
  int counter = 0;
  long commandtype;
  BD_PC_WhatDoYouHave l_BD_PC_WhatDoYouHave;
@@ -199,7 +212,7 @@
  l_BD_PC_ReportMyVersion = null;
 
  /* set quality to 100 (png) */
- commandToSend = new BD_PC_SetImageQuality(100);
+ commandToSend = new BD_PC_SetImageQuality(30);
  commandToSend.ConvertCommandToBinary();
  sendCommand(commandToSend);
  commandToSend.ReceiveData(ReceiveData());
@@ -207,57 +220,75 @@
  commandToSend = null;
 
  while (connected) {
-
- if (commandQueue.isEmpty()) {
- if (counter++ == 5) {
- counter = 0;
- /* no outgoing commands in the queue, send BD_PC_WHAT_DO_YOU_HAVE */
- l_BD_PC_WhatDoYouHave = new BD_PC_WhatDoYouHave();
- l_BD_PC_WhatDoYouHave.ConvertCommandToBinary();
- sendCommand(l_BD_PC_WhatDoYouHave);
-
- /* if commandtype != 100 (BD_CP_WE_HAVE_NOTHING) build command and handle it */
- commandtype = ReceiveLong();
- if (commandtype != 100) {
- l_BDResponseCommand = buildCommandFromData(commandtype);
- l_BDResponseCommand.ReceiveData(ReceiveData());
- l_BDResponseCommand.parseCommand();
- l_BDResponseCommand.processCommand(mJavaMO);
- l_BDResponseCommand.ConvertAckToBinary();
- sendAck(l_BDResponseCommand);
- l_BDResponseCommand = null;
- } else {
- /* handle BD_CP_WE_HAVE_NOTHING */
- ReceiveLong();
- sendAck(l_BD_PC_WhatDoYouHave);
+ try {
+ if (commandQueue.isEmpty()) {
+ if (counter++ == 5) {
+ counter = 0;
+ /* no outgoing commands in the queue, send BD_PC_WHAT_DO_YOU_HAVE */
+ l_BD_PC_WhatDoYouHave = new BD_PC_WhatDoYouHave();
+ l_BD_PC_WhatDoYouHave.ConvertCommandToBinary();
+ sendCommand(l_BD_PC_WhatDoYouHave);
+
+ commandtype = ReceiveLong();
+ // If read return -1 (EOF) we should not try to do anything
+ if (commandtype >= 0) {
+ /* if commandtype != 100 (BD_CP_WE_HAVE_NOTHING) build command and handle it */
+ if (commandtype != 100) {
+ mJavaMO.addMessage("Got command " + commandtype);
+ l_BDResponseCommand = buildCommandFromData(commandtype);
+ l_BDResponseCommand.ReceiveData(ReceiveData());
+ l_BDResponseCommand.parseCommand();
+ l_BDResponseCommand.processCommand(mJavaMO);
+ l_BDResponseCommand.ConvertAckToBinary();
+ sendAck(l_BDResponseCommand);
+ l_BDResponseCommand = null;
+
+ // We got one command, lets see if there is anything else right away
+ counter = 5;
+ } else {
+ /* handle BD_CP_WE_HAVE_NOTHING */
+ ReceiveLong();
+ sendAck(l_BD_PC_WhatDoYouHave);
+ }
+ }
+ l_BD_PC_WhatDoYouHave = null;
  }
- l_BD_PC_WhatDoYouHave = null;
- // this.currentThread().sleep(100);
- }
- /* go to sleep to save power */
- try {
- processorThread.sleep(100);
- } catch (InterruptedException e) {
+ /* go to sleep to save power */
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.run(): " + e.getMessage());
+ }
+ } else {
+ /* pop command from the queue */
+ commandToSend = (BDCommand) commandQueue.firstElement();
+ commandQueue.removeElement((Object) commandToSend);
+
+ /* send the command */
+ commandToSend.ConvertCommandToBinary();
+ sendCommand(commandToSend);
+ commandToSend.ReceiveData(ReceiveData());
+ commandToSend.parseAck();
+ commandToSend = null;
+
+ /* send what do you have without further sleeping after sending a command */
+ counter = 5;
  }
-
- } else {
- /* pop command from the queue */
- commandToSend = (BDCommand) commandQueue.firstElement();
- commandQueue.removeElement((Object) commandToSend);
-
- /* send the command */
- commandToSend.ConvertCommandToBinary();
- sendCommand(commandToSend);
- commandToSend.ReceiveData(ReceiveData());
- commandToSend.parseAck();
- commandToSend = null;
-
- /* send what do you have without further sleeping after sending a command */
- counter = 5;
+ } catch (IOException e) {
+ // Catch IOException, so we skip processing relying on received data
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTCommandProcessor.run() : " + e.toString());
+ connected = false;
+ } catch (Exception e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTCommandProcessor.run() : " + e.toString());
+ // Not necessarily disconnected, but we should probably restart
+ connected = false;
  }
-
-
  }
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BDCommandProcessor.run(): Not connected anymore");
 
  }
 
Index: com/linuxmce/javamo/BTServer.java
===================================================================
--- com/linuxmce/javamo/BTServer.java (revision 21508)
+++ com/linuxmce/javamo/BTServer.java (working copy)
@@ -37,6 +37,8 @@
 
 import javax.bluetooth.*;
 
+import com.linuxmce.javamo.log.MOLogger;
+
 /**
  * Bluetooth server for J2ME using JSR82
  */
@@ -119,7 +121,7 @@
  /* listen for connections */
  conn = notifier.acceptAndOpen();
 
- parent.showAlert("CONNECT",3000);
+ parent.addMessage("Connected");
 
  /* BD Command processor to handle commands */
  System.out.println("BTServer: starting BDCommandProcessor...");
@@ -132,16 +134,27 @@
  System.out.println("BTServer: waiting for BDCommandProcessor to finish...");
  m_BDCommandProcessor.processorThread.join();
  } catch (InterruptedException e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.getMessage());
  }
 
- m_BDCommandProcessor = null;
- conn.close();
- parent.showAlert("DISCONNECT",3000);
- parent.showForm();
-
  } catch (IOException e) {
  // wrong client or interrupted - continue anyway
- continue;
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.getMessage());
+ } finally {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "Disconnect!");
+ parent.showForm();
+ m_BDCommandProcessor = null;
+ if (conn != null) {
+ try {
+ conn.close();
+ } catch (Exception e) {
+ if (MOLogger.DEBUG)
+ MOLogger.log(0, "BTServer.run() : " + e.toString());
+ }
+ }
  }
  // processor.addConnection(conn);
 
Index: com/linuxmce/javamo/JavaMO.java
===================================================================
--- com/linuxmce/javamo/JavaMO.java (revision 21508)
+++ com/linuxmce/javamo/JavaMO.java (working copy)
@@ -22,15 +22,8 @@
 import javax.microedition.lcdui.*;
 import javax.microedition.midlet.*;
 
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.microedition.io.Connector;
-import javax.microedition.io.StreamConnection;
-import javax.microedition.io.StreamConnectionNotifier;
-import javax.microedition.rms.*;
+import com.linuxmce.javamo.log.Logger;
+import com.linuxmce.javamo.log.MOLogger;
 
 /**
  * Java Mobile Orbiter for LinuxMCE/Plutohome
@@ -40,7 +33,7 @@
  */
 public class JavaMO
     extends MIDlet
-    implements CommandListener {
+    implements CommandListener, Logger {
 
  private Canvas mCanvas;   
  private Image mImage;
@@ -57,6 +50,8 @@
 
  mMainForm = new Form("JavaMO");
 
+ MOLogger.setLogger(this);
+
  /* check for jsr082 */
  try {
  Class.forName("javax.bluetooth.LocalDevice");
@@ -129,22 +124,22 @@
  } else {
  listActive = false;
  }
+ turnBackLightOn();
  }
 
  /**
  * Shows a list with media elements
  */
  public void showList(String[] list) {
- mList = new List ("Media", List.IMPLICIT);
- for (int i=0; i < list.length; i++) {
- mList.append(list[i], null);
- }
- // Command selectCommand = new Command("Select", Command.ITEM, 1);
- // mList.setSelectCommand(selectCommand);
+ mList = new List ("Media", List.IMPLICIT, list, null);
+ Command selectCommand = new Command("Select", Command.ITEM, 1);
+ mList.setSelectCommand(selectCommand);
  mList.setCommandListener(new ListCommandListener());
+ mList.addCommand(new Command("Exit", Command.BACK, 2));
+
  Display.getDisplay(this).setCurrent(mList);
  listActive = true;
-
+ turnBackLightOn();
  }
 
  /**
@@ -176,6 +171,8 @@
  return 32; /* BUTTON_Asterisk_CONST */
  case Canvas.KEY_POUND:
  return 33; /* BUTTON_Pound_CONST */
+ case -6: // Sony Ericsson left soft key
+ return 30; // Soft left key
  case -7: /* mpp sim right soft key */
  case -8: /* Nokia N73 C key */
  return 26; /* BUTTON_Phone_C_CONST */
@@ -247,6 +244,8 @@
  * Canvas class to show the image on the screen and report keystrokes back
  */
  private class DrawImageCanvas extends Canvas {
+ private int lastKeyCode = 0;
+
  public void paint(Graphics g) {
  g.drawImage(mImage, 0, 0, Graphics.TOP | Graphics.LEFT);
  }
@@ -260,18 +259,24 @@
  }
 
  protected void keyReleased(int keyCode) {
+ if (lastKeyCode == 0) {
  //if (keyCode > 0) {
  // commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateKey(keyCode),0));
  commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateKey(keyCode),2));
  System.out.println("keyReleased " + ((int)keyCode));
  //} else {
  // System.out.println("keyReleased action " + getGameAction(keyCode));
- //}
+ //}
+ }
+ lastKeyCode = 0;
  }
 
  protected void keyRepeated(int keyCode) {
- commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateRepeatedKey(keyCode),1));
- System.out.println("repeatedKeyReleased " + ((int)keyCode));
+ if (keyCode != lastKeyCode) {
+ lastKeyCode = keyCode;
+ commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(translateRepeatedKey(keyCode),1));
+ System.out.println("repeatedKeyReleased " + ((int)keyCode));
+ }
 
  }
  protected void pointerPressed(int x, int y) {
@@ -281,6 +286,24 @@
  }
  }
 
+ public void addMessage(String message) {
+ while (mMainForm.size() > 20) {
+ mMainForm.delete(mMainForm.size()-1);
+ }
+ mMainForm.insert(0, new StringItem(null, message));
+ }
+
+ public void log(int level, String message) {
+ addMessage(message);
+ }
+
+ /**
+ * Turns backlign on
+ */
+ public void turnBackLightOn() {
+ Display.getDisplay(this).flashBacklight(1);
+ }
+
  /**
  * Command listener for the list
  */
@@ -289,7 +312,7 @@
  public void commandAction (Command c, Displayable d) {
  long item = -1;
  List list;
- if (c == List.SELECT_COMMAND) {
+ if (c == List.SELECT_COMMAND || c.getLabel().equals("Select")) {
  listActive = false;
  list = (List) d;
  item = list.getSelectedIndex();
@@ -299,6 +322,10 @@
  commandProcessor.addCommandToQueue(new BD_PC_SelectedFromList(item));
  // send enter
  commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(5,2));
+ } else if (c.getLabel().equals("Exit")) {
+ listActive = false;
+ // Send C key
+ commandProcessor.addCommandToQueue(new BD_PC_KeyWasPressed(26,2));
  }
  }
  }
Index: com/linuxmce/javamo/log/Logger.java
===================================================================
--- com/linuxmce/javamo/log/Logger.java (revision 0)
+++ com/linuxmce/javamo/log/Logger.java (revision 0)
@@ -0,0 +1,6 @@
+package com.linuxmce.javamo.log;
+
+public interface Logger {
+
+ public void log(int level, String message);
+}
Index: com/linuxmce/javamo/log/MOLogger.java
===================================================================
--- com/linuxmce/javamo/log/MOLogger.java (revision 0)
+++ com/linuxmce/javamo/log/MOLogger.java (revision 0)
@@ -0,0 +1,20 @@
+package com.linuxmce.javamo.log;
+
+public class MOLogger {
+
+ static public final boolean DEBUG = true;
+ static Logger logger;
+
+ static public void setLogger(Logger logr) {
+ logger = logr;
+ }
+
+ static public void log(int level, String message) {
+ if (logger != null) {
+ logger.log(level, message);
+ } else {
+ System.out.println(message);
+ }
+ }
+
+}

Hari, just ask if you see anything fishy.

crudpuppy, the UI displayed is mostly just images sent over bluetooth from the MD. As such, you need to use the HADesigner to change the orbiter GUI. If that was what you were thinking of?

br, sambuca
366  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 29, 2008, 06:27:53 pm
crudpuppy,

I did a few changes to some of the gui classes also. Also I added a common logging method, which could be extended more. I guess some static logger class might be the way to go. (I use this concept in J2EE). This would allow us to set it up to log to screen, file, another bluetooth connection, or whatever.

Btw, have you checked if there exists some kind of logging support already in J2ME?

Sorry if I am holding you up, I'll see if I can make a patch tomorrow.

br,
sambuca
367  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 29, 2008, 12:35:37 am
Hi,

I've made some progress. I've implemented handling of repeated key presses. I uploaded the files to the same location as previously.
(Also added preliminary handling of the left soft key of my SE phone)

crudpuppy: I plan on making a patch for the current SVN as soon as I get the time.

My next task after that will be adding a working key mapping for my SE W580 phone (and K800i). I also have some problems with the orbiter disconnecting (both at the phone/server side and at the MD/client side), which I haven't solved yet.

Regarding jsr075:
If I understand correctly, won't the VMC need to store files on the phone also? (Maybe that's what you were referring to in your last post, hari.) Haven't really looked into what VMC is, but my understanding is that it uses WAP for communications and displays pictures stored at the phone. Am I imagining things, or am I on to something  Wink

sambuca
368  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 28, 2008, 11:02:12 am
niz23

I guess the phone you are using (SE P1?) has a touch screen, since your log reports mouse events. I haven't looked at the bluetooth dongle side of things (yet), so I can't really say why it only works sometimes. Maybe someone with more knowledge of the BD can comment? Or maybe anyone that uses another touch screen phone can try it out too?

Haven't had as much time to work on this as I would have liked, but I have looked into optimizing the performance more. Anyone who has done similar knows it can be a pain. Which is how it is now. There are some buffer copies in the code that I am trying to take out, but I must have messed up cause now it wont display anything any more. I'll keep looking. I hope to have it sorted out and cleaned up enough to make a patch for hari maybe next week.

hari, when you say that repeated keypresses are not implemented, is that in the JavaMO, or in the BD library?

sambuca
369  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 26, 2008, 10:17:36 pm
I had to edit CLDC-1  to read CLDC-1.1
Otherwise my P1i complained (inompatible application).

Oops, I probably mis-edited the jad file.

There are still problems with connecting to lmce from the phone.
Sometimes it just not work (Waiting for connection).
This problem have nothing to do with libBDCommon, patched or not.
Have tried this before so. It is something else.
Maybe the bluetooth_dongle log file can shed some light on this? As the JavaMO is just listening for incoming connections, I am not sure we can do anything to help the situation from this side.

Things that do not work:
* Media list only show text. Which is not to bad. Maybe that is the way forward and just add some graphics around it so it look nicer. Instead of shuffling images between phone and core.
The media list uses the phones default list implementation, so there is limited possibilities to change it. This, I guess, is to save data transfer. But it is possible to use an image for each item in the list (a small image on the left of the text I think). This might require some changes to the bluetooth_dongle to send the images, and of course would require much more data transferred. Our best chance would be to first display the list, and them add images to the list as they are transferred. I fear this is too much work to implement and would be dead slow (my 600+ list of artists already takes 5 seconds + to display).

*Pause/Play button do not work when playing video. (have not tested audio yet).
Can you check the bluetooth_dongle log file, and see if the button press is received from the phone?

*Do not seem to reconnect to core if router is reloaded. However there is debug output when it happen (disconnect is shown on screen with some more text). This probably mean that javamo detect when it is offline so if we handle that...
Don't know if the JavaMO receives any notification about router reload. But anyway, I am trying to make it survive bluetooth reconnects, so this would probably help.

Another thing I remember that I changed in this version; Because the image transfer took so long, the screen saver kicks in, thus I wont see when the image was finally loaded. I added some code to flash the display to hopefully turn it on again. Let me know if it is for the better or worse.
370  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 26, 2008, 04:26:50 pm
I should really thank you all for this great system.

That said, I hope I am able to contribute more in the future. Just figured this was a good starting point.

sambuca
371  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 26, 2008, 03:43:41 pm
You can download my modified version from http://hob.dyndns.org/javamo/. Just point your mobile browser to the JavaMO.jad file and it should download and install. Depending on your phone you will have to confirm the installation.

niz32, do you think the P1 is faster Java-wise than other phones? I think the Java speed might be a factor in the random crashes, since did not crash as much when it worked much better when I reduced image quality.

On a general note: This version does display more logging messages to start-up screen. While I probably will look into debugging my Sony Ericsson phone using a method similar to what hari described on the wiki, I think it might be useful to get some feedback from other phones without the users needing to set up any debugging.
372  LinuxMCE / Developers / Re: Java/ J2ME mobile orbiter on: November 26, 2008, 01:53:58 pm
I did some tweaks to the JavaMO code a few days ago.
* Changed image quality
 It seems that transferring a 100k + image over bluetooth takes too much time. Changing the image quality setting from 100 (png) to 30 radically improved responsiveness. Image size is now below 10k, and usually around 6k.
* Added quite a bit of logging
 Trying to work out the mysterious crashes and malfunctions of the JavaMO on my phone, I added more logging to find out where the problem is.
* Some more exception handling.
 Sometimes the JavaMO just quits on my phone. I suspect that some major unhandled exception causes this. I am trying to add handling and logging to work out this problem.
* Added a explicit exit button to the media list, as my phone had no way of returning from the media list.

Still to do (from a stability perspective):
* Debug the media list
  My phone shows no text for the audio list entries (the last entry has text), while other lists (pictures for instance) shows the texts correctly.
* Debug the connection stuff, to find out what makes the MO crash and/or drop the connection.

I don't feel that I am finished by any means, but if someone is interested in testing this version of the JavaMO, I can put it up for download.
Not sure if it will work on more phones, but the improvement in responsiveness might help a bit, and the extended logging might give us a better idea of what the problem might be.

I can also make a patch for the current SVN tree. Hari, can you comment on how (and when) you would like a patch?

I will continue working on the stability of the mo, and maybe some of the other issues mentioned here if I get the time. The repeated key presses might be the next thing on my list, but my primary goal is making it usable first. (What are the repeated key presses for anyway?)

br,
sambuca
373  LinuxMCE / Developers / Re: Deinterlacing PAL TV-OUT problem / recompiling MythTV_Plugin.so for 710 on: November 20, 2008, 12:36:22 pm
Hari,

To the best of my knowledge, that is what I did. I checked out the 710 branch (on a 710 hybrid) and compiled using instructions scattered around the wiki. It was not easy to find any step-by-step instructions for compiling 710, and I might have used the wrong instructions. But in short: I used the 710 branch, it compiled successfully on a 710 hybrid. The resulting .so was a different size than the original file, and crashed the router when I tried to use it. (No changes were made to the code, so I would guess the size should have been the same).

br,
sambuca
374  LinuxMCE / Developers / Re: Deinterlacing PAL TV-OUT problem / recompiling MythTV_Plugin.so for 710 on: November 19, 2008, 01:43:01 pm
Dave,

No, I did not manage to recompile the Mythtv plugin. Or rather, it did compile, but when I tried to replace it on the core, it just crashed the DCERouter. I never got any good advice on how to fix it.

As it happens, they've switched to DVB-T in my region (of Norway) now, so I haven't used Myth for a while (problems with viewing encrypted channels, H264 encoded broadcast not working in myth etc.). I didn't get around to try the "Don't auto-configure" setting either, so I can't tell you if it will work. I suppose it's worth a try, you can always change it back later.

br,
sambuca

375  LinuxMCE / Users / Re: web orbiter on: November 17, 2008, 11:23:22 am
You could do what Zaerc said, or...

I have noticed the same when I tried the web orbiter. From my experience, it seems that you cannot click two times in the same place, you need to move the mouse a bit for the orbiter to register the click as a new click. Maybe you can try that?
Pages: 1 ... 23 24 [25] 26 27 28
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!