Categories
Cellphone

Bluetooth issue between Samsung Galaxy S4 and Mercedes

So I got a nice sleek Samsung Galaxy S4 which is awesome! The Verizon store salesman tried to sell me on an iPhone but after I told him no thanks three times he finally let me see the Android options. I have nothing against the iPhone but just like the flexibility and options the Android gives me, plus even the sales guy admits the Galaxy is much faster than the iPhone.

But I digress… where was I? Oh, right — so the phone is AWESOME! Until I tried to pair the sonofabitch to my car, which is only 3 years old but could not do the pairing properly.

I would get the car to “see” the phone, and would enter in the PIN on the car, and the phone would pop-up and ask for the PIN, and the phone would say “paired”, but the car would eventually timeout and say it could not pair.

I tried all kinds of 4 digits PINs to see if that would make a difference, restarted the phone, removed the bluetooth entries and tried from scratch, but to no avail.

Finally I tried a single digit PIN and IT WORKED

So there you go, hope that helps someone, and now my new phone is back to AWESOME

 

Categories
Cellphone Unix

SSH/SCP times out on cellular network

I have a centos box I use when travelling and use an AT&T cellular USB modem on it for connectivity. I ran into an interesting problem when connecting in Las Vegas — I could get SSH sessions working fine up to a point, but when a lot of text was being outputted, the session would freeze and the connection would timeout.

This would happen when running “top”, or even if you started a “vi” session!

This looked like an issue with packet sizes, so I tried SCP’ing different file sizes and found that it would break at 1375 bytes when sending a file. After setting my MTU to 1370 the problem went away. The MTU was set to the default of 1500 prior.

So I must conclude that AT&T’s network in Las Vegas has a different network/routing setup than they use in other areas, because I have not see this problem before in California or a number of other states across the country.

For reference, the steps to fix this are:

ifconfig ppp0 mtu 1370

and then you can edit the config file, in my case “/etc/sysconfig/network-scripts/ifcfg-ppp0” and add:

MTU=1370

to the entries there.

 

Categories
Fun Stuff Sports

Digging my new pitching machine

I recently bought this Louisville Slugger product (the “Blue Flame”) on Amazon and I have to say it’s pretty cool!

I chose it because it does not require power (no cords, batteries, etc), it is spring operated.

I will say that when I set this thing up, the main plastic part shattered after only 5 uses… but, I contacted the vendor who sold it and they were awesome and immediately shipped me a new part and the machine has been working great since.

I’ve used this machine at a few parks around the city and people are always coming up asking “What the heck it that thing?” and find it cool and interesting. So this thing is fun to use and a good way to meet new people!

Oh, yeah, and my kids are getting to be better at hitting.

Categories
Unix

Installing CentOS 6x on KVM

I’ve been installing CentOS 5.8 VM’s for a while now using KVM/Virsh and setting the serial port so I could do “virsh console” and do the CentOS setup in text mode. Since all my servers are essentially headless I turn off graphics and do the text install.

This had been working great until I started moving up to the version 6 release, and I tried everything up to 6.4 with the same results — it would do a condensed version of the install (i.e., it would stop prompting me to customize the drive partitioning, and would not let me customize the networking among other things) and then it would prompt for “reboot”. Once it was booting, it would hang on “Starting crond”. I went into “I”nteractive mode and found the next item in the boot process was “local” which could point to graphics problems. I tried the ISOs for 6.1, 6.2, 6.3, 6.4 both the full installations and also the network installation versions, all with the same results.

So I switched to doing a graphics install with VNC. This did the trick, but was not as clean since I had to use the VNC interface to then go in and set up networking and get it ready for access. In the old text method you could easily edit and paste from window to window for the configuration, the VNC viewer prevents easy copy/paste from other windows and limits you to 24 rows as it displays the console. But at least I got 6.4 running.

Here is the virt-install command I used:

virt-install –name=vm_test –ram=8000 –vcpus=4,cores=4 \

–disk path=/home/vm/vm_test.img,size=300 –network bridge=br0 \

–location /home/vm/CentOS-6.4-x86_64-bin-DVD1.iso \

–graphics vnc,password=1234,port=5900,listen=192.168.10.10

I had to specify the listen IP otherwise it binds to localhost, and I needed to NAT my router to my internal 192 address.

After the install you can “virsh edit” your VM to remove the graphics section so you don’t have a VNC hole laying around.

My next step was to make sure I could still use “virsh console” to access from a command prompt, I’ll do a separate post on that.

Categories
Fun Stuff Movies

AVI Player for iPad

I wanted an app on my iPad 2 and mini to play videos I have on my linux media server (which consists of mostly AVI files). I found oplayer to be an excellent option for me!

The only drawback is the recent version seems to have lost the ability to remember what you were watching when you go back to the player. With the old version I could just put the iPad away overnight and when I called back oplayer the next day it would be on the same video in the same spot so I could resume. Now, the new version forces me to start from scratch and play the video from the start and manually find where I was.

I’m asking the oplayer folks about this and if they come through then this app is truly as good as I have been telling you all!

Categories
Coding

Automatically insert Current Date and Time in MySQL table

I was trying to recall how to create a field in a MYSQL table that will auto timestamp on inserts or updates, and surprisingly google did not give any direct and easy results! Seriously, the results were either off topic or packed with ads and off topic.

Here it is, simple and to the point:

`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP

Categories
Unix

CentOS bootup hangs at iptables

I experienced an odd thing the other day when I went to reboot a server it was hanging at bootup at the iptables/firewall portion of the startup sequence.

I had to do “Interactive” bootup (by hitting “I”) and then I could say “n” on the firewall section. After that it booted up fine.

I examined my iptables and some postings on the ‘net will mention that failing to have the loopback interface in the rules, i.e. “-A RH-Firewall-1-INPUT -i lo -j ACCEPT”. I verified I had that, and then I realized that I also had a rule in place that was generated by an auto-rule script that uses IPs from failed attempts in log files. Somehow it had gotten 127.0.0.1 in there! I had to remove a blocking rule for 127.0.0.1 and then it worked.

So, rule of thumb, take care of what goes in your iptables file!

Categories
Unix

Restoring damaged /boot from XEN guest

I have a number of XEN and KVM virtual machines and I just had a case where one XEN guest had a problem with the new kernel I upgraded to. It would not boot, showing Error: (2, ‘Invalid kernel’, ‘xc_dom_parse_elf_kernel: ELF image has no shstrtab\n’) when the “xm create” was performed.

So I had to get into the /boot and fix the kernel and the grub.conf. How to do that safely on an image? Well it seems you CAN mount ext3 and other filesystems, but you CANNOT mount LVM or swap partitions. So fortunately the boot partition was ext3. Here are the set of commands I used to mount the image, vm01.img:

losetup -a

losetup /dev/loop5 vm01.img

fdisk -l /dev/loop5

lomount -t ext3 -diskimage vm01.img -partition 1 /mnt

Then you can go into /mnt and alter the kernels and edit grub/grub.conf. Once mounted, you can copy over new kernel files, but typically the /boot partition is a smaller size than the rest of the disk. I actually had some files I wanted to also copy over into /lib later, and they were needed for the networking to work. So I put them in gzipped tarballs in /boot a portion at a time and then when I would boot into the uncomplete setup I could copy them into place. A hack for sure, but that’s how I got more files over throughout the process.

Then, when done:

umount /mnt

losetup -d /dev/loop5

You need to do this to cleanly close the image. Then you can “xm create” your fixed up image!

 

 

Categories
Cellphone

RMA HTC Incredible

My recent (smart)phone is an Incredible-2, and it developed a dead zone on the touch screen lately. I brought it in to Verizon and was slightly disappointed to find out that it was under warranty and they would replace it for free! Disappointed because frankly that new Samsung Galaxy looks sweeeeeet as long as you ignore the kill code that people found on it.

Anyway, new free phone sounds good, so ship it I said. I got the package in the mail with nice & easy instructions and I swapped phones quickly. Kudos to Verizon for making it easy!

The one big bonus I have now is that this phone has MUCH BETTER reception than the old one! I’m not sure why, but in the past when I would drive through the “rainbow” tunnel at the end of the Golden Gate Bridge I would ALWAYS lose signal and my calls would drop. But this new phone has no issues. I can only deduce that not every phone has a nice clean routing of the antennae through the case?

So there you go, next time you get dropped calls, trade your phone in and presto! Happy days!

 

Categories
Unix

yum install subversion fails with “package is already installed”

I have a new CentOS installation in place using utterramblings.repo and got this mesage when doing a “yum install subversion”:

Transaction Check Error:
package apr-1.4.5-1.jason.1.x86_64 (which is newer than apr-1.2.7-11.el5_6.5.i386) is already installed
package apr-util-1.3.12-1.jason.1.x86_64 (which is newer than apr-util-1.2.7-11.el5_5.2.i386) is already installed

Now some posts on the ‘net say to do a “yum downgrade” but that seems just unreasonable! Instead, the solution was to only install the X86_64 version! So the following worked:

yum install subversion.x86_64