Feb 10

Disassembling a Sony Ericsson MW600

MW600

MW600

Some months ago I bought a Sony Ericsson MW600 bluetooth receiver to use when working out. Unfortunately after a month it started malfunctioning. One day during a workout while playing music it made a beeping sound every few seconds. I turned it off and tried to turn it back on but it refused to do so. I left it to rest a few hours and tried again, this time it worked. However, from that moment on I couldn’t get the MW600 to turn on reliably anymore. This weekend I figured I should try and peek inside, see what’s wrong. There’s a video on YouTube showing how to open it up but it’s not entirely clear at some point so I made a picture guide how to open it up properly. If you have a white version as is shown in the video I think the packaging is a little different so you might have to figure out a thing or two on your own. If you have the black version, this guide should be sufficient to completely disassemble it.

MW600

MW600

So, how do you start?

Make sure you have small cross and flathead screwdriver and a small box to put in the tiny parts of the MW600 so you don’t lose them.

I will try to give a little explanation next to each picture (click to enlarge) so you can comfortably take the device apart.

 Let’s get started! DISCLAIMER: I’m not responsible in any way if you break or damage your MW600 in the disassembly process!

.

Remove plastic

Remove plastic

Remove screw

Remove screw

First of all you need to remove the little plastic cover below the microUSB port.

It covers up the first screw that holds together the port cover and the main body.

Remove the screw.

.

.

Remove pushbutton

Remove pushbutton

Take care!

Take care!

Remove the plastic pushbutton to reveal the actual pushbutton.

Take care when handling the parts. I managed to break off the little pushbutton to power on/off the MW600 and it’s really easy to lose it!

It’s very fragile so make sure you handle it with care.

Remove clip

Remove clip

Another screw!

Another screw!

Next is removing the clip. Slide your fingernail between the two parts highlighted in the image on the left. While you gently add space between them, use your other hand to push the clip upwards until it jumps free.

This will reveal the second and last screw you need to remove.

.

Remove plastic

Remove plastic

You can remove the other plastic part from the main body. Once that’s out of the way, we’re almost done removing parts to remove the PCB from its plastic cover.

.

.

.

.

Remove buttons

Remove buttons

Metal thingy

Metal thingy

Next up, on the side of the device, there are Previous Start/Pause and Next buttons. In fact, that’s just one strip of plastic. Use a fingernail to remove this strip. Under it there’s a small metal thingy, make sure to remove it as well.

.

.

Remove outer plastic

Remove plastic

The side

The side

Lastly, there’s a plastic part that surrounds the gap, again, use your fingernail to remove it from the main body.

.

.

.

.

Remove body

Remove body

Remove call button

Remove call button

Continuing, now you’re free to remove the plastic hull, make sure to remove the call button in the process as it isn’t attached to anything else and will fall off.

.

.

.

Remove cover

Remove cover

Both parts

Both parts

It gets a little trickier, try not to break the cover for the screen. You can detach it from the main body at the highlighted area. If there’s some glue holding bits and pieces together, don’t worry, you can pull it off without breaking stuff!

.

.

The battery

The battery

Once that’s done, you can turn over the device and remove the battery. It most likely will be “stuck”, just use a little force (or use a screwdriver) to remove it.

.

.

.

.

Detach flaps

Detach flaps

To remove the PCB from its cradle, you’ll have to detach a few things. First of all the 2 flaps on the left. Next are the “sides” where the touch-sensitive volume slider is. Lastly the other side where the prev/play/next buttons were. Both sides have a bit of PCB connected with ribbon cable so you can easily bend them without worrying you’ll break the entire PCB.

.

.

.

Removed PCB

Removed PCB

Oxidation

Oxidation

After some messing around to remove the PCB (do take care as even if it can bend a little, the 3,5mm jack is lodged pretty hard into the plastic, make sure it’s loose before trying to “pull” on the PCB!

As you can see in the last image, do not use the MW600 for working out if you sweat! I used it for running and as you can see my sweat completely ruined parts of the contacts.

Whatever reason you had to take apart the MW600, I hope you found this guide useful, if you have any questions don’t hesitate to leave a comment and I’ll get back to you as soon as possible.

Nov 28

Lasercutting at FabLab Leuven

A few weeks ago I wanted to lasercut something for a friend. I was looking through the pages on the FabLab Leuven website but there’s very little information on how to design a vector image that would result in a nice little lasercut object.

So for all those who are new to lasercutting, vector images and the like, here’s a short tutorial on what you can and need to do to produce something you can work with.

First of all you need software that can produce vector images, something like Photoshop (or Adobe Illustrator specifically). Keep in mind that FabLab uses Inkscape to “print” your design to the lasercutter’s software. It is a good idea to download Inkscape and check your design. This is a free program so if you don’t have any expensive Adobe software this one will do the trick.

Some design tips you need to keep in mind are the following:

  • Black, aRGB(0,0,0,0) will make a deeper imprint than a shade of grey (so if you want contrast in your design, one thing you can do is play around with the alpha channel)
  • The contour needs to be aRGB(0, 255, 0, 0) which is bright red. The laser will burn all the way through the material on vector lines colored like this
  • Your designs can be quite large (20 by 20 centimeters or more) but you’ll probably have to pay up

If you’re going for something small (a few square centimeters) chances are you can find a spare plate of wood that has already been used. Most of the time there’s still plenty of room left on the plate to cut your design so you won’t have to pay anything since you’re reusing material that was already been paid for.

You’ve finished your design, now what? Open it up in Inkscape and select the lasercutter software as the “print to” option. Your vector image will now be loaded into the cutter’s printing application. Select the correct material and thickness. Make sure to move around the laser’s point of origin to a place where there is enough room to cut your design. Use the little calibration stick to adjust the height of the laser. Now drag and drop your design onto the workspace of the software. Once everything looks fine (if you have any problems or aren’t sure, ask the Fablab folks, they’re very friendly and eager to help!) hit the print button and you’ll see your design in a matter of seconds!

Note: make sure you have some free time when going to FabLab or call in advance as many people use the cutters and at the moment of writing only two are operational.

Sep 09

Android Java Plugin for Unity Tutorial

This tutorial will guide you through the process of creating a Java plugin for Unity when building an application or game for Android. Before writing this tutorial I used the following guide to make a working project of my own. Much credit goes to MatD for writing his guide, if anything isn’t clear in this tutorial please check his one, it might have some additional information I left out to simplify the process.

What I’ll be using in this tutorial and what you might need to complete it is the following:

  • Unity 4.x
  • Android SDK (API 10 or higher installed)
  • Eclipse 4.2.2

Step 1: The Java code

First of all, open up Unity and create a new project called PluginTutorial. You do not need to import any packages. Unity will create a folder structure for you. I put the project in the following directory:

  • C:\Users\Devon\Documents\PluginTutorial

Next up, in the \PluginTutorial\Assets\ folder create a folder called Plugins, and in that folder create another one called Android. Now open up your favorite text editor and create a file called PluginTest.java which you need to save in the \PluginTutorial\Assets\Plugins\Android\ folder.

The contents of this file are the following:

package com.test.app;
 
import com.unity3d.player.UnityPlayerActivity;
import android.content.Context;
import android.os.Bundle;
import android.util.Config;
import android.util.Log;
public class PluginTest extends UnityPlayerActivity
{
    private static final String TAG = "PluginTest_Unity";
    private static int number = 0;
 
    @Override
    protected void onCreate(Bundle myBundle) {
        super.onCreate(myBundle);
 
    }
    @Override
    protected void onResume() {
        if (Config.DEBUG)
            Log.d(TAG, "onResume");
        super.onResume();
    }
    @Override
    protected void onPause()
    {
        super.onPause();
    }
    @Override
    protected void onStop() {
        if (Config.DEBUG)
            Log.d(TAG, "onStop");
        super.onStop();
    }
    public static int getNumber()
    {
        number++;
        return number;
    }
}

As you can see we don’t really do a lot here, this is a tutorial to get you started so we simply increment a number and return it (so our Unity app can call this function and receive the number).

Please note package com.test.app, this package name NEEDS to be the same in Unity! To change this, switch over to Unity and go to File > Build Settings

Start by selecting Android as the platform and click on Switch Platform. Then hit Add Current so we have an active scene for the app. When prompted to save call the file PluginTutorial.unity. Now select Player Settings… 

If you’re building something for a tablet it might be a good idea to change the Default Orientation to landscape mode, or you could select Auto Rotation. I’ve noticed that the unity app tends to go back to the homescreen when the current orientation is not the same as the one you’ve selected here.

Next up, click Other Settings and change the Bundle Identifier to match your package name, in our case edit com.Company.ProductName to com.test.app

Now switch back to your text editor and create a new file called AndroidManifest.xml which also goes into the \Android\ folder. The content of the file should be the following:

<?xml version="1.0" encoding="utf-8"?>
 
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.test.app"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />
    <application android:label="@string/app_name">
        <activity android:name=".PluginTest"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
Again, take note of the package and android:name properties.
Continuing on, we’re now ready to build and compile our Java program. Create a new file called build.xml and place it in the \Android\ folder. The contents are:
<?xml version="1.0" encoding="UTF-8"?>
 
<project name="CompilePluginTutorialAndroidJava">
    <!-- Change this in order to match your configuration -->
    <property name="sdk.dir" value="C:\android-sdk-windows"/>
    <property name="target" value="android-10"/>
    <property name="unity.androidplayer.jarfile" value="C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androiddevelopmentplayer\bin\classes.jar"/>
    <!-- Source directory -->
    <property name="source.dir" value="." />
    <!-- Output directory for .class files-->
    <property name="output.dir" value="./classes"/>
    <!-- Name of the jar to be created. Please note that the name should match the name of the class and the name
    placed in the AndroidManifest.xml-->
    <property name="output.jarfile" value="PluginTutorial.jar"/>
      <!-- Creates the output directories if they don't exist yet. -->
    <target name="-dirs"  depends="message">
        <echo>Creating output directory: ${output.dir} </echo>
        <mkdir dir="${output.dir}" />
    </target>
   <!-- Compiles this project's .java files into .class files. -->
    <target name="compile" depends="-dirs"
                description="Compiles project's .java files into .class files">
        <javac encoding="ascii" target="1.6" debug="true" destdir="${output.dir}" verbose="${verbose}" includeantruntime="false">
            <src path="${source.dir}" />
            <classpath>
                <pathelement location="${sdk.dir}\platforms\${target}\android.jar"/>
                <pathelement location="${unity.androidplayer.jarfile}"/>
            </classpath>
        </javac>
    </target>
    <target name="build-jar" depends="compile">
        <zip zipfile="${output.jarfile}"
            basedir="${output.dir}" />
    </target>
    <target name="clean-post-jar">
         <echo>Removing post-build-jar-clean</echo>
         <delete dir="${output.dir}"/>
    </target>
    <target name="clean" description="Removes output files created by other targets.">
        <delete dir="${output.dir}" verbose="${verbose}" />
    </target>
    <target name="message">
     <echo>Android Ant Build for Unity Android Plugin</echo>
        <echo>   message:      Displays this message.</echo>
        <echo>   clean:     Removes output files created by other targets.</echo>
        <echo>   compile:   Compiles project's .java files into .class files.</echo>
        <echo>   build-jar: Compiles project's .class files into .jar file.</echo>
    </target>
</project>
There are three things you need to edit here:
  • <property name=”sdk.dir” value=”C:\android-sdk-windows”/> this is the SDK directory for Android, sometimes it might also be <property name=”sdk.dir” value=”C:\android\sdk”/>
  • <property name=”source.dir” value=”.” /> needs to be your folder directory, e.g. mine is <property name=”source.dir” value=”C:\Users\Devon\Documents\PluginTutorial\Assets\Plugins\Android” />
  • The output dir: <property name=”output.dir” value=”C:\Users\Devon\Documents\PluginTutoroal\Assets\Plugins\Android\classes”/>
  • The JAR filename: <property name=”output.jarfile” value=”PluginTutorial.jar”/>

Now open up Eclipse and go to File > New > Other, in the wizard select Java Project from Existing Ant Buildfile (this might be nested in the Java directory). Select Browse and open up your build.xml file. This will create a new Eclipse project for you.

Open up the PluginTest.java file found in Android > (default package). Hover over the package com.test.app; line and select move to the appropriate package.

Now select the play button with a briefcase and select External Tools Configuration.

In the main tab, select Browse File System… and navigate to the build.xml file. Next up in the Targets tab check build-jar and clean-post jar. Now hit Apply and then hit Run.

Note that if you get an error about JAVA_HOME, go to the JRE tab and select Installed JREs… Then click add, select Standard VM and then Directory… Navigate to the Java directory (usually something like C:\Program Files\Java\ and select your jdk folder (in my case jdk1.7.0_17). Click OK and back in the JRE tab select your jdk in the Separate JRE dropdown box.

You will now have everything Unity needs to be able to communicate with your Java program. Notice the PluginTutorial.jar file in your \Plugins\Android\ folder.

Step 2: The Unity Code

Next up we will create a C# script in Unity to actually grab the number from the java code. Switch over to Unity and create a new C# script in the assets folder called NumberExample. The contents of this file:

using UnityEngine;
using System.Collections;
 
public class NumberExample : MonoBehaviour {
	public GUIText number_output_text;
    AndroidJavaClass pluginTutorialActivityJavaClass;
 
    void Start () 
	{
        AndroidJNI.AttachCurrentThread();
        pluginTutorialActivityJavaClass = new AndroidJavaClass("com.test.app.PluginTest");
    }
 
    void Update()
	{
		int number = pluginTutorialActivityJavaClass.CallStatic("getNumber");
		number_output_text.text = "nr: " + number;
    }
}

Now drag this script onto the Main Camera and create a new GUI text GameObject. Drag it onto the Number_output_text field of the script attached to the Main Camera.

Step 3: Running the app

Now go to File > Build & Run and select Build and Run. Call the apk PluginTutorial if asked for a name. And that’s it! You’ll see the number increasing on your Android device.

If you run into any problems feel free to ask questions in the comments section and I’ll try to help out as much as I can. You can download my files for the project by clicking the following link: Plugin Tutorial Project.