Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sambuca

Pages: 1 ... 26 27 [28] 29 30 31
406
Developers / Re: Java/ J2ME mobile orbiter
« on: November 30, 2008, 08:19:49 pm »

Here is my patch, finally ;)
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: [Select]
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

407
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

408
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  ;)

sambuca

409
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

410
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.

411
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

412
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.

413
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

414
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

415
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


416
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?

417
Installation issues / Re: First time user: Help before install
« on: November 11, 2008, 01:00:01 pm »
Note that "works with lmce" can mean different things:
* Most basic interpretation is that the linux driver is included in lmce. This means that your device will be usable for linux.
* The other aspect is that lmce autodetects your device and sets it up more or less automatically. Not valid for all types of devices, but at least for some.
If you have a specific device, you should search the wiki and the forums for any information, and post a question if you cannot find any.

But in most cases hardware with linux drivers will work with lmce. A problem could be that the driver is brand new and has not been included in the linux kernel version used in lmce.

I did myself put off the compiling for quite some time, even though I have a few years of Linux experience, so I can understand your concern. I would say it is about 5 on the scale for my part. The main problem with this driver was that there were several different drivers (or variants thereof) to choose from. Besides that, the compiling were pretty straight-forward.
But lately there seems to have been quite a few changes to the driver development, and that this driver will be included in the 2.6.28 kernel. They have also removed the source I built the driver from, so I really cannot say how easy/difficult it would be to  build it today.
To build the driver today, I think you need to download the whole v4l source tree. http://linuxtv.org/wiki/index.php/How_to_install_DVB_device_drivers is a good starting point.

I used the 4000 mainly for DVB-S. I think the S2 part was not supported by the driver at the time I built it. I did test DVB-T also, and it seemed to work fine. Reading the linuxtv wiki, it seems that S2 will not be supported until kernel 2.6.28 is released.

418
Installation issues / Re: First time user: Help before install
« on: November 07, 2008, 09:10:07 pm »
Hi,
and welcome

1. The specs. look good for a first setup. If you plan on extending the system with any media directors (MDs), you might consider changing the hybrid to a core to ease the load, but I would not worry about that just yet.
Be warned: the HVR-4000 is not supported by default in LMCE. There exists a driver, but you will need to compile it yourself (See the www.linuxtv.org site for more information). On the other hand, I do use this card in my setup, and it works fine once you got the setup right.
Sorry, don't know anything about the sound card.

2. You will find some forum posts regarding MKV. I suggest searching the forums, as I have not tried MKV files myself.

3. There is an option to install the dvdcss library which allows you to play DVDs. I did have problems with playing a few DVDs.

4. Dont know for sure, but since it uses the Symbian OS, it might be possible. Check the wiki for mobile orbiters. If not, the JavaMO might be a possibility, although it is now quite finnished yet.

Regarding blu-ray, there have also been some forum posts. Don't have a drive myself, so I suggest doing a search in the forum.

regards,
sambuca

419
Users / Re: New in the Wiki: Alx9r's Sample Setup
« on: November 06, 2008, 01:20:44 pm »
My curiosity got the best of me, and I did some googling  ;)

I found a script which will receive RSS and submit the torrents for download to mldonkey. http://xyzabc.xy.ohost.de/
Most likey someone can create a similar script to do the same for podcasts.

I haven't tried this setup, and have not tried deluge either. Just wanted to let you know of a possible alternative. And I think from what I have seen of mldonkey, that it allows for  easy integration into lmce, it having a command line interface, a remote protocol and more. Then again, don't know what Deluge is capable of..

regards,
sambuca

420
Users / Re: New in the Wiki: Alx9r's Sample Setup
« on: November 05, 2008, 10:27:22 am »
alx9r,

Have you looked at mldonkey http://mldonkey.sourceforge.net/Main_Page ? It's been a while since I looked at it, but I think it supports downloading bittorrent and http downloads. Don't think it can handle RSS though...

It uses a remote protocol to allow the client to communicate with the daemon (it's headless). It also has a telnet interface...
There exist many different clients http://mldonkey.sourceforge.net/Gui. I suppose the protocol or the telnet interface could be used from within LMCE to start downloads of different kinds.

It can also run a command when a file download is done (i.e. LMCE sql insert)

Regards,
sambucs

Pages: 1 ... 26 27 [28] 29 30 31