Archive Page 11

Your Samsung Galaxy S phone’s compass is not working? Auto rotation is faulty? Check your hardware by dialing *#0*# – this is a factory test app for the phone. If the compass is broken there too, here’s how you can fix it: delete /data/system/ms3c_yamaha.cfg, and if there’s a backup file, delete it too, then reboot. If it won’t help, make sure the files are deleted and then run /system/bin/sensorcalibutil_yamaha from a root shell, follow the instructions and then reboot your phone.

If your Samsung Galaxy S displays no network/no signal, or emergency calls only, try the following things:

1. flash the device again with the modem image (download the firmware of your device from samfirmwares.com, delete everything from the .tar file except modem.bin, and then flash this file to the phone with Odin (you can get Odin and instructions from that site too)

2. maybe your nv_data.bin file or /efs directory got corrupted, make a backup of the folder, then simply delete nv_data.bin, it will be recreated for you on Galaxy S.

For this, you’ll need root. If you have a root-enabled kernel, like the Voodoo lagfix kernel, you only have to install the Superuser app and Busybox on the phone, download the Android SDK to your PC, install platform-tools in the SDK manager, go to the platform-tools directory and start adb shell.

In the shell, type su, wait for the Superuser prompt to appear on the phone (if it does not appear, open the Superuser app and try executing su again), enable root access for the command. Now go to /efs, copy everything to for example /sdcard/efs, then rm nv_data.bin.

Reflashing the device with a kernel and checking “phone EFS clear” in Odin also works (make sure you made a backup of the EFS folder just in case).

3. you can try changing the CSC (to XEU for Europe): enter *#272*imei# on the phone tab. Note: this will reset your phone to factory settings, so make sure you did a clockworkmod backup before this. Incorrect CSC setting may cause MMS not working also.

4. check if you inserted the SIM card correctly :)

My VoIP system

In the past few weeks I worked converting our home and work telephone system to VoIP. Here you can see the schematics:

I’ve used the following VoIP adapters: Linksys SPA-3000, Linksys PAP2T, Linksys SPA-1001 (all from eBay of course). I have separate Skype users for home and the shop (skype-otthon, skype-uzlet) with a country-wide landline subscription (it cost €40 for a whole year), so Skype is used for every outgoing call to landlines. We kept our PSTN lines, everyone knows our shop’s number, so it couldn’t be changed to a Skype number and at home we can keep our PSTN line without subscription (outgoing calls will cost a lot if we use it, but of course we won’t).
» …continue reading ‘My VoIP system’

If I call #88 on my VoIP system, I’ll hear a synthesized voice saying the current outside temperature.

The quality and readibility is quite bad, but the whole thing is not hard to set up, and this way my Mom & Grandma can also listen to the temperature, so it’s worth it :)

Here’s how you can do this. You’ll need two packages: aptitude install mbrola mbrola-hu1

Extract this to /usr/local/mbrola/. Make sure /usr/local/share/asterisk/sounds/ is writable by the Asterisk user. The script gettemp reads the current temperature value from the SQL database.

Asterisk extension.conf:

exten => #88,1,Macro(answertone)
exten => #88,2,System(/usr/local/mbrola/saytemp)
exten => #88,3,Wait(1)
exten => #88,4,Playback(temperature)
exten => #88,5,Goto(3)

I’ve rewritten both the English and Hungarian Duke Nukem 3D Android widgets, so the force closes and hangs are completely gone for now.

More info.

I made a widget for Android for my DIY temperature measurement system, available here. Source code is here.

Measuring temperature

See my other post about measuring temperature with USB Temper devices using a router with OpenWRT here!

I’ve bought two TEMPer USB sticks from eBay and installed one of them in my room and the other one on the pine tree in front of our house.

The outside sensor is around 3m from the ground, and my server is in my room around 13 meters from the ground, so I had to use a simple USB-RJ45 extender (this doesn’t support USB2.0 but TEMPer uses only USB1.1 so it works fine).

I have the two TEMPers on separate USB busses, so I’ve modified the source code of the driver to support using the first device on a given bus. I also had problems with one of the devices keep getting stuck with errors like “No device found” and “Protocol error”. A trace showed usb_set_configuration() gave an error. The only solution was to unplug and replug the device to the USB port. Now I modified temper.c to do the same thing: reset the USB device before use :) Seems to work pretty well.

I put the temperature values into a MySQL database every 5 minutes and I generate RRDTool graphs from the data. You can download the source code for the PHP webpage here and watch it online from my home server (slow ADSL connection) here.

An Android widget is available for the outside TEMPer data here.

For Hungary/T-Com: 425@-20,425@-20;2(0.3/0.3/1)

This means 425Hz on 300ms, silence for 300ms, and 1 second is considered a full cycle.

T-Com IPv6 test

My ISP runs an IPv6 test since the autumn of 2009. Now I write a post about my settings on my home Debian server/router which work correctly for me to use IPv6.

I have a script called /etc/network/if-up.d/adsl which starts the v4 PPPOE connection:

#!/bin/sh
pppoe-start /etc/ppp/pppoe-ipv4.conf

/etc/network/if-down.d/adsl:

#!/bin/sh
pppoe-stop /etc/ppp/pppoe-ipv4.conf
pppoe-stop /etc/ppp/pppoe-ipv6.conf
killall -9 pppd
killall -9 pppoe
killall -9 pppoe-connect

/etc/ppp/ip-up.d/ipv6 starts the v6 connection, when the v4 connection is ready. This case ppp0 will always be the v4 interface and ppp1 will be the v6 interface.

#!/bin/sh
pppoe-start /etc/ppp/pppoe-ipv6.conf

pppoe-ipv6.conf has the same settings as the ipv4 one except for one extra line: PPPD_EXTRA=”ipv6 ,”
Of course the IPv6 username is different, my original IPv4 PPP username is [email protected] and the one has to be used for the IPv6 PPP line is [email protected].

I have a script called /etc/ppp/ipv6-up.d/0initv6 which initializes everything related to the v6 connection. It can be downloaded here. Because my ISP changed the first 64 bits (I call it the “global part”) of my delegated IPv6 range once, I decided to make the script resistant to these changes. So the script creates the dhcp6s and radvd configs automatically. I turned off automatic start of dhcp6c, dhcp6s and radvd on system startup (I’ve deleted the symlinks from /etc/rc.x dirs). The ISP does not automatically give my server the IP address ::1, so the script takes care setting that using ifconfig for the interface also.

I need both dhcp6s and radvd for my Windows clients to use my server’s IPv6 connection. radvd announces the IPv6 connectivity to them and sets the default gateway, while dhcp6s gives them IPv6 addresses. The server only uses dhcp6c for obtaining the IPv6 address from the ISP, default gateway is set manually.

My dhcp6c.conf is here. The dhcp6s.conf.template is here. radvd.conf.template is here. My ip6tables config is here.

I hope these settings will help someone to connect to the IPv6 network.

Other sites mostly working? Then your MTU setting is incorrect.
Try:

ip6tables -t mangle -A FORWARD -p tcp –tcp-flags SYN,RST SYN -j TCPMSS –set-mss 1452

And in radvd.conf (interface xxx section): AdvLinkMTU 1452;

Renew your Windows clients with ipconfig /renew6 and then check MTU with netsh interface ipv6 show subinterfaces, it should be 1452. You can test whether you have an MTU issue by visiting http://test-ipv6.com (WARNING: website doesn’t always work reliably, if it shows errors, visit http://test-ipv6.ch to confirm it’s real) – it will do a large packet test and if it fails, your system is not fragmenting packets correctly.

About me

Nonoo
I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with. ... »

Twitter

Listening now

My favorite artists