Zones

Tuesday, February 2, 2016

Failed Odosun 1000 lumen 12W LED Light Bulb Disassembeled

I bought an Odosun 1000 lumen 12W LED light bulb some time ago. I took it from a local shop in Bucharest and I paid about 9 dollars for it. After 8 months it started exhibiting intermittent functionality and after a day or two it stopped working completely.
I disassembled it and took some pictures. Maybe this will be useful for someone out there :)

Upon visual inspection I found that the glass of the bulb was cracked.  The bulb was mounted horizontally into a metal ceiling light fixture. The crack appeared on top towards the metal fixture so I assume it was caused by the heat. There was very little space between the bulb and the metal, just a few millimeters.

Below you can see some pictures of the damaged bulb.
I removed the glass with some pliers. Below you can see the leds on a metal plate fixed with 2 screws. Two wires are coming down from beneath through a hole in the middle of the plate. The soldering does not look very good.
I unscrewed the plate. In the image below you can see how the bulb looks like with the LED plate removed. The LED plate is shown from above and below.
Then I removed the E27 metal mount and removed the PCB which was fixed with some kind of glue. The base of the bulb is made of aluminium covered with plastic as can be seen in the picture below.
I then cleaned the PCB and took some pictures of it from above and below. I also included the metal base seen from different angles.


Monday, May 5, 2014

Convert a MKS file to SRT in Ubuntu

In windows I have been using the great SubtitleEdit to do this task.
It runs well (with some small display glitches) under wine, although I only opened the subtitle without the video.

Recently I found a native, faster way to convert these files using mkvextract

First you have to identify the track you want to extract.
You can use the mkvmerge tool for this:

mkvmerge -i "filename.mkv" or
mkvmerge -i "filename.mks" (for subtile only files)

The output for a mkv file will look similar to the example below:

Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (DTS)
Track ID 2: subtitles (SubRip/SRT)
Track ID 3: subtitles (SubRip/SRT)
Chapters: 32 entries 

Form the output of the command you need to identify the Track ID of target subtitle track you wish to extract.

If you already have the MKS file use the following command to convert to SRT:

mkvextract tracks "filename.mks" 0:filename.srt

0 is the target subtitle track of the MKS file.

If you want to extract and convert one or more subtitle tracks directly form the MKV file you can use a command similar to the following:

mkvextract tracks "filename.mkv" 2:sub1filename.srt 5:sub2filename.srt

where 2 and 5 are the target subtitle tracks.

There is one more important aspect to note:
Only subtitle tracks of the type S-TEXT/UTF8 will be written as SRT files. The output file type is dependent on the track file type as stated in the mkvextract man page (link above).

The mkvmerge and mkvextract tools are part of the mkvtoolnix package which can be installed from the Ubuntu repositories.




Wednesday, December 19, 2012

Install Nas4Free on an USB Flash Drive in Ubuntu

This is a step by step description of how I installed Nas4Free on an USB Flash Drive.
Let's get down to business.

What you need:
Nas4Free
http://www.nas4free.org/
http://www.nas4free.org/downloads.html
I installed the latest version at the time this post was written:
http://sourceforge.net/projects/nas4free/files/NAS4Free-9.1.0.1/9.1.0.1.573/
2 * USB Stick
You will need 2 USB sticks, one for the LiveUSB for the installer and one to install NAS4Free to.
I have 4 or 5 USB Flash Stick lying around so this is the most straightforward method for me. And of course my NAS Box does not have an optical unit.

Instructions:

1. Download the Live USB or embedded *.img for your architecture.
I used NAS4Free-x64-LiveUSB-9.1.0.1.573.img and NAS4Free-x64-embedded-9.1.0.1.573.img in my tests

2. Insert the USB Key and write one of the images on it.
Be very careful what device you use for the output(of=) of the dd command used below.
To find out which device is your USB Drive please use
sudo parted -l
or
sudo fdisk -l
For me it was /dev/sdd
== NAS4Free-x64-LiveUSB-9.1.0.1.573.img ==
This is a raw USB image which can be used to install NAS4Free to another USB Drive or a HDD. It can be written directly to the USB Flash Drive using dd.
sudo dd if=NAS4Free-x64-LiveUSB-9.1.0.1.573.img of=/dev/sdd
I used this image.

== NAS4Free-x64-embedded-9.1.0.1.573.img ==
This is a compressed image which can be used for upgrading NAS4Free using the web interface. Use this image to run NAS4Free directly from the USB Drive you put it on. It must be decompressed before it is used with dd. For some strange reason gunzip did not like the file name so I had to pipe the fie from cat command output to gunzip. The -c parameter makes gunzip output to stdout.
cat NAS4Free-x64-embedded-9.1.0.1.573.img | gunzip -c | sudo dd of=/dev/sdd1

The comments of alexey123 (regarding the use of dd) from this forum post and others were very helpful for me. Thank you!

From this point on I will be describing what to do if you use the LiveUSB image.

3. Insert the USB Key with the Live USB Image (NAS4Free-x64-LiveUSB-9.1.0.1.573.img) into your NAS machine and configure it as a boot device from the BIOS.
The OS will boot in a minute or so and you will be presented with a numbered menu.
You will see the message "Now, the blank USB memory for installation can be inserted."
Insert you install target USB Drive, the system should notify you, and then choose the option "Install/Upgrade NAS4Free from LiveCD/LiveUSB" (it was 9 for me).
I chose the Embedded istall on a CF/USB Flash Drive option.
WARNING: All partitions on your selected USB Flash Drive will be erased.
Then choose the installation source and on the next page, the installation target (The second USB Drive you inserted).
The installation should take less than a minute. After it is finished, remove the LiveUSB Drive and reboot the machine.
Your new OS should happily boot.

That's it! Happy NASing!!.


Other useful tips:
To format a USB Drive using FAT32 you can issue the following commands:
sudo umount /dev/sdd
sudo mkdosfs -F 32 -n "Label" -I /dev/sdd
An alternative method is to use the visual tool GParted.

Wednesday, October 12, 2011

A Fix For The "device not managed" Problem In Ubuntu Network Manager

I have a laptop with two wired network cards. One of them is the builtin card and the other is a USB NIC. I use the USB card because the builtin one has a strange problem I haven't been able to solve (in both Windows and Linux).

Anyway, when I first installed Ubuntu 10.04 I had some problems with the Network Manager software. I had to use the same MAC on both the wired cards because my ISP's DHCP server used the MAC to assign IPs. NM refused to "work with" the second NIC. I was in a hurry and I replaced Network Manager with wicd. I've been using wicd until a few days ago when I decided I have to make NM work because I'm getting ready to install Ubuntu 11.10 on my new laptop. Meanwhile I changed my ISP and the NICs have different MACs.

After I reinstalled NM it showed me the "device not managed" message for both my wired NICs. I tried all the solutions I could find on the internet but none worked.

Here's how I solved the problem:
1. Run "sudo gedit /etc/network/interfaces" in a Terminal window.
- replace gedit with your favourite text editor
- the interfaces file should look like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet loopback

auto eth1
iface eth1 inet loopback


2. Delete (or commennt with #) everything in the interfaces file except

auto lo
iface lo inet loopback

- this is the loopback interface
- NM will refuse to "manage"  any network interface that has configuration options in this file

3. Go to Synaptic Package Manager and COMPLETELY Remove network-manager and network-manager-gnome packages

4. Restart

5. Now you probably don't have an active internet connection
Run "sudo dhclient eth0" in a Terminal window. Replace eth0 with the network interface you get your internet connection from. You can run "ifconfig -a" to see the names of your network interfaces. The DHCP client should acquire an IP address for your Network Interface.

6. Now reinstall Network Manager with Synaptic or Ubuntu Software Center or the command line.

7. Restart

8. Tada. Network Manager should now "manage" all your netwrk connections.

P.S.0 I'm starting to miss wicd. You could configure it to prefer a certain wired NI or to prefer the wired interfaces over the wireless ones.

P.S.1. If you now a faster way to make NM reset it's settings after step 2 please leave a comment. Thanks.