JTK – Notes and Ramblings Things we have found …


hostapd and mythbuntu

Filed under: General,MythTV — taing @ 10:16 pm

We were looking to use the wireless card in the Acer Revo mythbuntu box as a wireless access point to extend the wifi coverage in the system. The solution is the hostapd package and a bit of configuration.

In our setup, there is a separate machine acting as primary gateway/router to the internet/DSL modem. We want the new “access point” to have the same SSID and security settings as the existing WAP. We will configure it to use a different B/G channel. The Acer Revo is connected to the main WAP and the router/gateway by wired ethernet so we will bridge the wired ethernet to the wireless interface. In this configuration the existing router/gateway will provide the DHCP services and gateway to the internet.

There were two main articles on the web I used as reference: http://www.su-root.eu/computing/turn-your-linux-computer-in-a-wireless-access-point-using-hostapd and http://blog.robin.smidsrod.no/2008/08/08/how_to_setup_an_atheros_based_access_poi.

The basic steps are to install hostapd, enable IP forwarding disable “NetworkManager” and configure the bridge. The final step is to make this automatic at startup. Our systems are running Mythbuntu Lucid (10.4) and all went well.

The Avec Revo units have a wireless card based on an Atheros chipset. This allows you to use the ath9k kernel driver. For this driver the you must use hostapd to set Master mode for the card. You will not be able to do this with iwconfig alone.

After installing hostapd via apt-get, the second part of the setup is to disable “NetworkManager” and create the appropriate bridge configuration is /etc/network/interfaces :
auto lo
iface lo inet loopback

iface eth0 inet manual

auto br0
iface br0 inet dhcp
#for testing you may want to leave wlan0 out of the bridge and add manually when hostapd is running
bridge-ports eth0 wlan0

iface wlan0 inet manual

For testing you can add or remove the wlan0 interface from the bridge using brctl addif br0 wlan0 or brctl delif br0 wlan0.

You will need to enable IP forwarding with echo 1 > /proc/sys/net/ipv4/ip_forward. If you have iptables or other firewall setup you will need to edit the config to allow the correct traffic.

The sample /etc/hostapd/hostapd.conf file from the link article worked well:
#wireless interface to use as AP

#bridge device (needed for madwifi & nl80211 drivers)

#driver interface type (hostapd/wired/madwifi/prism54/test/none/nl80211/bsd)
# Use nl80211 for wifi drivers that implement MAC80211 interface
#You should set this to your relevant driver interface type

#Enables logging to standard output (useful for debugging)

#Set SSID to use

# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g)
# note your card may not support every mode.

#Channel to use (1-13)



#Enable WPA2

#Set passphrase for WPA

# Set of accepted cipher suites (encryption algorithms) for pairwise keys
wpa_pairwise=TKIP CCMP
# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value)

For testing you can start hostapd with sudo hostapd -d /etc/hostapd/hostapd.conf. Once all is working well you can make this a bit more automatic. If you have wlan0 set as part of br0 in /etc/network/interfaces, the only step left is to edit /etc/defaults/hostapd to set RUN_DAEMON="yes". This will allow hostapd to start at boot and allow you to use /etc/init.d/hostapd start|stop|restart to control.

For debugging you can use brctl show to view the members of the bridge. You can use hostapd_cli to control the operation of the WAP service.


Change the Master Google Account for an Android Phone

Filed under: General — taing @ 9:46 pm

For my Samsung Moment from Sprint I wanted to change the main Google account without factory defaulting the phone. I followed the instructions found at http://androidforums.com/ally-all-things-root/337386-remove-main-google-account-android-without-doing-factory-reset.html.

The core is to rename /data/system/account.db to /data/system/account.db.bak. You will ten need to enter the new account info when you attempt to access any of the google services – for example Market.


Problem after Mythbuntu 11.10 upgrade

Filed under: General,MythTV — taing @ 10:28 pm

After upgrading Mythbuntu to 11.10 we encountered an error that showed in syslog as a segfault in Unity-Greeter. Fortunately the system was still accessible via SSH and console. The solution was found in a thread on ubuntuforums.com.

The core of the solution is to edit /etc/lightdm/lightdm.conf and remove this line:

Galaxy Tab 7.0+ Root w/ recovery

Filed under: General — taing @ 12:22 pm

We found very simply instructions for rooting our Galaxy 7.0 Plus at the xda developers forum.

Copy the zip file to the root of an external microsd card.

Restart in Recovery Mode – press and hold Volume Up while powering up.

Use the volume up/down buttons to move the highlight up and down, and the power button to select the highlighted option.

1. Select “apply update from external storage”

2. Select the file you placed on your storage card (starts with “p6210_CWMR”.)

3. Sit back and watch it run. Read the information that is being sent to the screen. If there’s an error, it’ll display some message. If it works, it’ll display a message starting with the word “Done!”

4. Select “reboot system now.”

You now have a CWM-based recovery installed, and your tablet is rooted.

Install the SuperUser application directly from the android market.


The attached zip file is from December 10, 2011.p6210_CWMR_20111210

Galaxy Tab 7+ sdcard r/w

Filed under: General — taing @ 11:56 am

The Galaxy Tablet 7.0 Plus does not be default allow third party File management application write to the external sdcard. This is a permissions issue. The solution found at the xda developers forum is:

Simple solution for external sdcard write access on Android 3.2…if you’re rooted

I’ve found a simple solution for gaining write access to the external sdcard (/mnt/sdcard2) on Android 3.2. The sdcard is mounted r/w, but the owning group is media_rw which is linked to the WRITE_MEDIA_STORAGE permission. Unfortunately, this permission was not required for access to the external sdcard prior to 3.2 so most file management utilities do not request it when they run…meaning they only have read access to the card.

The simple solution, if you’re rooted, is as follows:
1. Using a root-enabled file manager, navigate to /system/etc/permissions and make sure you have mounted the file system r/w.
2. Edit platform.xml and find the WRITE_EXTERNAL_STORAGE permission.
3. Add an additional group definition for this permission… 4. Save the changes to the file.
5. Restart your tablet.

After this change, any apps that request the WRITE_EXTERNAL_STORAGE permission (which includes almost anything that access either of the sdcards) will gain group membership in both sdcard_rw AND media_rw, giving them r/w access to both sdcard filesystems.

To mount the filesystem read only use mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

I found an easy solution was to copy the platform.xml file to somewhere with easy access from the PC, edit the file on the PC and copy it back to the system location with a su-ed shell.

Kies kill SyncToy

Filed under: General,Router/PC Config — taing @ 11:50 am

After installing Samsung Kies software for the Galaxy Tab SyncToy started giving a “failed to create provider” error. The solution is to “repair” the MS Sync Framework. This is easily done from “Add/Modify Programs”.

Powered by WordPress