Category Archives: Computer

Trying to unbrick my router

One of my Buffalo brand routers has been behaving strangely these days. I suspected a bug in the DD-WRT firmware so I decided to update it.

But somehow it did not accept any of the firmware update files I gave. I tried all the recent revisions of DD-WRT, even tried a level of downgrading but still no luck.

Then I decided to flash the router manually with mtd.

I downloaded OpenWRT squashfs release and flashed it. But since then the router didn’t boot up.

I had to disassemble it in order to repair it.

The exact model name is WZR-HP-G450H. It had hexagonial screws but it didn’t matter to me as I do carry the screwdrivers for it.

DSC_0550

Anyway I opened it up.

According to the OpenWRT wiki there are serial ports located at the top

DSC_0561

I soldered it.

Then started minicom and tftpd. After numerous tries I found that my router only accepts firmware during initial boot, after printing the offeset message.

I tried:

1. OpenWRT image from the wiki
2. Unencrypted original firmware
3. taking a full mtd dump from another router and writing it to this router

But none of them worked so far, I also tried changing the region by altering environment variables but it didnt have any effect.

Everything fails with “Bad magic number” message.

I guess something is seriously wrong with my u-boot…

게임영상편집 팁[미리보기 재설정]

게임영상편집 많이하시는분들,

막상 영상 촬영폴더로 들어가보면

mediapreview_

이런식으로 미리보기가 전부 앞부분이라서 어떤게 어떤 영상인지 구별하기 힘드셨죠?

이를 해결할수 있는 좋은 프로그램이 있습니다.

Media Preview라고 동영상 미리보기 설정을 바꿔주는 프로그램을 이용하면 됩니다.
프리웨어라 사용제한도 없고 기능도 많습니다.

우선 최신버젼을 다운받으셔서 설치하시고

mediapreview

설정 커스터마이즈 버튼을 누른뒤에 Position Seek를 90% 정도나 그 이상으로 설정해 영상의 끝부분을 미리보기로 지정하고 적용 버튼을 누릅니다.

mediapreview0

그리고 해당되는 영상 종류를 지정해 주시구요 적용 버튼을 눌러줍시다

mediapreview2

그러면 당장 폴더에 들어가도 전에 이미 생성된 미리보기만 보일텐데요, 미리보기 캐쉬를 삭제해서 새로운 미리보기가 생성되게 해줍니다.

mediapreview3

다 끝난후 이제 다시 폴더에 들어가보면 미리보기만 딱 봐도 어떤 장면인지 감이 오실겁니다. 불편하게 일일히 열어볼필요 없습니다.

Setting arbitary destination IP for RTP packets (NAT mangling)

Gosh, those VoIP specs need to be more friendly to NAT!

In short, as RFC standards does not state anything about NAT, the server assumes that the IP included with SDP packets is the true WAN IP of the client, which is not the case in NAT scenarios and leads to problems.
This is a temporary workaround for getting voice packets go through NAT in OpenBSC. It would fix the one way audio that many people are experiencing.
I might try branching out from the main code for proper NAT support. IMO it is pretty riciculous to assume that picocells are connected to the internet directly, haha.

NAT mangling does not work with translated ports, so you need to turn off port translation in some routers.

Edit the following code

abis_rsl.c :

static void ipac_parse_rtp(struct gsm_lchan *lchan, struct tlv_parsed *tv)
{
	struct in_addr ip;
	uint16_t port, conn_id;

	if (TLVP_PRESENT(tv, RSL_IE_IPAC_LOCAL_IP)) {
		ip.s_addr = tlvp_val32_unal(tv, RSL_IE_IPAC_LOCAL_IP);
		DEBUGPC(DRSL, "LOCAL_IP=%s ", inet_ntoa(ip));
		lchan->abis_ip.bound_ip = ntohl(ip.s_addr);
	}

Add a section to replace the IP with proper one.

	if (TLVP_PRESENT(tv, RSL_IE_IPAC_LOCAL_IP)) {
		ip.s_addr = *((uint32_t *) TLVP_VAL(tv, RSL_IE_IPAC_LOCAL_IP));

		if (strcmp(inet_ntoa(ip), "/*internal IP*/") == 0)
		{
			DEBUGP(DRSL, "Overwriting internal IP to a real one\n");
			inet_aton("/*external IP*/", &ip);
		}

		DEBUGPC(DRSL, "LOCAL_IP=%s ", inet_ntoa(ip));
		lchan->abis_ip.bound_ip = ntohl(ip.s_addr);
	}

You should replace the internal IP with the internal IP of the nanoBTS. And external IP with the router’s IP as seen from the BSC

Using an ICC profile on linux

I had to find a way to use monitor ICC profiles on my linux box.

After a bit of researching I found that there is a nice application called ‘dispwin’ which is included in argyll package

sudo apt-get install argyll

dispwin /path/to/the/profile.icc

Easy.
In the same way you can write a bash script if you want to execute it on startup. I added the command to the end of /etc/mdm/Init/Default for Linux Mint 17

UPDATE: for Ubuntu MATE I added the command to /usr/lib/lightdm/lightdm-greeter-session

Geforce vs Intel Graphics SPECviewperf benchmark

SPECviewperf 11

This is a quick benchmark of mobile GPUs that I did recently with my new laptops. CPU performance is matched to i7-4700 and 8GB RAM is given for all tests. Looking at the results, it was quite surprising to find that the Intel HD 4600 performed on par with discrete graphics on many tests, and even superior when it came to SolidWorks and TcVis where it outperformed GTX860M. Especially in TcVis the Intel graphics pulled off more than double FPS compared to nvidia graphics. And it operated much cooler, keeping the fan at medium speed whereas using nvidia graphics caused the fan to roar like an engine. I suppose that the Intel graphics are more capable of handling floating point calculations than Geforce,  similar to how Quadros work. Sadly the Intel graphics threw an error and crashed on Catia tests and showed poor performance on Ensight tests, but speculating about the superior performance it showed on other tests, I think choosing Intel graphics can also be a good choice depending on the type of work you do. In addition, if you are using laptops with switchable graphics you might get rid of a big amount of heat caused by the discrete GPU.

Clevo Control Center no OSD mod

I’ve modded the Clevo Control Center not to display the OSD notifications. I didn’t like seeing it flash every time I press Caps Lock, adjusting volume etc.
I’ve heard that some versions can turn it off by manually editing the config file but it did not work for me :/
So I had to mod the executable by myself.

1

2

Those (quite annoying) notifications will be gone after you install it.

This mod is based on version 2.20.23 for Clevo W230SS
But I think it will be compatible with many other versions.

Download