Monday, June 13, 2016

RFM69HCW RFM69 Arduino radio module locking up problems not working

Ordered from sparkfun the RFM69HCW radio 433mhz module and could not get any of them to work.
Jumped onto IRC channel and found others were having the same issue.

Here is chat log from spark fun which they claim others as well are having issues.


I'm having a problem with some parts that I ordered recently. RFM69HCW is not working.

Chris F.: Hello

hi chris
I went on to the irc channel and asked for help but I was told there a quite a few people who have been complaining that there rfm69 devices are not working. Have you heard of anyone having issues?

Chris F.: Yes, we have. It's looking like RF radiation can leak into your hookup wires and that causes the Arduino sketch to lock up. I'm working on some fixes, but what has worked the best so far is keeping your wires as short as possible and placing a metal shied between the antenna and the rest of your wiring. Also, keep the USB cable as far from the antenna as possible.

how short of wires? And what type of metal shield do you recommend? Also when you say keep usb away from antenna can you detail how far exactly?

Chris F.: I don't have concrete numbers yet on how short or how far away unfortunately. For a metal shield, I use some scrap aluminum bent into a U shape and covered the wires and Arduino in that

Is the antenna is what is causing it?
Also does the regular powered device have this problem the none hcw or is it just the high powered device. I can turn down the power if that would help.

Chris F.: It's the radio waves coming from the antenna causing it. If you were to somehow move the antenna farther away that could help, but you need some coax wire to do that.

when you say you're working on a fix what exactly do you mean? A software fix or hardware fix?

Chris F.: Nothing in software or hardware (on the RMF69 board) will fix this. What I'm looking at is a new hookup guide that explains how to route your wiring to prevent the problem from cropping up in the first place. That might involve using an external antenna or using copper tape to create a shield around your hookup wires. Until we get a chance to try different things and see what works best, we're pretty much in the same boat as you are. I'm talking with an engineer on getting this done, but I don't have a time table just yet.

Monday, September 21, 2015

HP device monitor 100% cpu and memory hog

You can disable the HP monitor service from running all the time.

The file is located here

/Library/Printers/hp/Utilities/HP Utility.app/Contents/Library/LoginItems/HP Device Monitor.app/Contents/MacOS/

So here is the steps


  1. open terminal
  2. cd "/Library/Printers/hp/Utilities/HP Utility.app/Contents/Library/LoginItems/HP Device Monitor.app/Contents/MacOS/"
  3. sudo chmod a-x HP\ Device\ Monitor

Then reboot

Tuesday, September 8, 2015

Crashplan backups not connecting to headless server anymore.

The crashplan 4.3.0 version now has a secure gui method for connecting.

Install the software on your linux headless machine.

Then install a local copy on your client that will connect.


Now get the secure key using this method


  1. login to headless server
  2. cat /var/lib/crashplan/.ui_info
  3. copy the results of information
  4. go to remote machine with gui
  5. copy information into local file .ui_info
  6. port forward to remote machine
  7. start up the gui interface

Now it will connect.

Tuesday, May 12, 2015

Poor man pojo / popo object / entities entity generator from mysql

It's always very annoying when you have large tables and need to generate a basic pojo or popo plain old php object classes.

I've developed a simple way to just utilize mysql's information schema tables to get exactly what we need.

Here is a simple way to use a mysql query to generate what you need.


select
concat("public function get", UCASE(LEFT(column_name, 1)), SUBSTRING(column_name, 2), "(){ return $this->", LOWER(column_name), "; }" ) as getter,
concat("public function set", UCASE(LEFT(column_name, 1)), SUBSTRING(column_name, 2), "($value){ $this->", LOWER(column_name), "=$value; }" ) as setter
from
information_schema.columns
where
table_name = 'content';



Generates the following results:


 


Sunday, August 3, 2014

Ubuntu LVM logical volume manager resizing extending a virtual machine in esxi or vmware

First boot up the machine as normal and login as root


pvdisplay will show you current information about the lvm setup.

root@machine:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               machine-vg
  PV Size               45.76 GiB / not usable 1.81 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              28098
  Free PE               123
  Allocated PE          27975
  PV UUID               1DUlmw-Jvjc-MgSA-5gQB-35ZP-wnkb-llXfhO


Make sure before continuing you already added your additional space for the virtual machine and you have booted from gparted iso and extended the disk. If you need to know how to do this click here

List out the lvs information to get the name of the volume

root@machine:~# lvs
  LV     VG              Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  root   machine-vg -wi-ao 45.28g                                    
  swap_1 machine-vg -wi-ao   2.00g    


Extend the lvm adding the free PE available

root@machine:~# lvextend -L +8800 /dev/machine-vg/root

The +8800 will complain if it's not enough free PE available so make sure you adjust as needed to match your available PE.

Otherwise a message will appear as
 Extending logical volume root to 108.75 GiB
  Insufficient free space: 375 extents needed, but only 123 available


Now let's extend the volume

root@machine:~# resize2fs /dev/machine-vg/root
resize2fs 1.42 (29-Nov-2011)
Filesystem at /dev/machine-vg/root is mounted on /; on-line resizing required
old_desc_blocks = 4, new_desc_blocks = 7
The filesystem on /dev/machine-vg/root is now 28123136 blocks long.


Now check your diskspace free on the machine

root@machine:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/machine--vg-root  106G   35G   67G  35% /
udev                               179M  4.0K  179M   1% /dev
tmpfs                               38M  288K   38M   1% /run
none                               5.0M     0  5.0M   0% /run/lock
none                               189M     0  189M   0% /run/shm
cgroup                             189M     0  189M   0% /sys/fs/cgroup
/dev/sda1                          236M  233M     0 100% /boot


Woot you did it.

See more LVM details





Saturday, July 26, 2014

Intel processor stress test bootable usb disk/stick!

Are you're looking to have a bootable way to stress test your system without using windows because you use ESXI or another virtual environment.

First download the image for fedora intel image

I recommend you read instructions first on mac osx creating a usb bootable usb stick.

Boot up your usb stick in bios using boot from usb device or other as some bios machines say.

Once Fedora live usb stick loads up open the terminal window. To do this either click on the bottom black window icon or click applications -> terminal emulator

Once the terminal is opened up you need to install the intel software. To do this type in "/usr/local/bin/install64"   *if using a 32 bit processor the name will be install32 not install64

Hit enter key to continue

Type in lowercase "a" and hit enter to accept agreement.

Once it's installed close the terminal window and your desktop will have a new icon called "IPDT"

Double click the icon and load the processor stress testing software.

Once the stress testing software is complete it will tell you whether it passed or failed. Also take note of the processor temp's it says is under the max temps. This will let you know if theres something wrong with your cpu fan or thermal paste.

That's it enjoy.


Creating bootable usb disk/stick from iso dmg file!

Booting from a USB stick is nowadays more and more important. More and more PCs (and servers) are delivered by default without a CD/DVD drive. To install the OS of your choice, USB sticks provide you the easiest possibility. In fact, it can even work out cheaper than burning a CD or DVD that you just throw away once the version is outdated.
For most Linux distributions the ISO for burning a CD/DVD is available freely on the internet. In this post I’ll assume you have already downloaded the bootable ISO image for the OS of your choice, but how to get the ISO image onto the USB stick?
The ISO file you have downloaded contains an image of the entire media. It includes all the files necessary to boot your PC/server. This image format is sadly not directly usable to copy onto the USB stick. We first need to convert the image from an ISO to a UDRW (Read/Write Universal Disk Image Format) which we can copy to the USB stick.
Some of the steps to create a bootable USB stick could be done in the GUI as well, but as some of them can’t and you have to go to the shell anyway, I decided to do all of the steps in the shell.

Convert the ISO to UDRW format

Mac OS X provides all the tools needed to convert the ISO image to UDRW. The following command will convert the ISO image to the UDRW format.
hdiutil convert -format UDRW -o destination_file.img source_file.iso
You will notice that the destination_file.img from the command will create the file destination_file.img.dmg really. This is because the hdiutil program automatically adds the dmg file extension. This is not a problem as the file extension won’t affect the format of the image.

Prepare the USB stick

Check your USB stick and make a backup if there is any important data on it, as the next steps are going to delete everything on it.
To prepare the USb stick we are going to delete all the partitions on the stick and create an empty partition. To do this we need to know the device name of the USB stick. Open a terminal and execute the following command:
$ diskutil list
You will see a list of disks and partitions. The goal is to identify the USB stick in this output. Depending on your system configuration your output might look different from this one. This appears to show 3 physical discs but it does not. The /dev/disk1 is a virtual disk created because of the partition encryption (FileVault 2) I enabled in Mac OS X.
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:          Apple_CoreStorage                         399.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS MacOSX                 *399.2 GB   disk1
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 GB     disk2
   1:       Microsoft Basic Data UNTITLED 1              2.0 GB     disk2s1
As shown in the output above, the connected USB stick is a small 2.0 GB drive with a FAT partition on it. We are now going to remove this partition in the next step. For the following steps we will need the name of the disk which in this case is “/dev/disk2″.
With the following command the data on the disk (your USB stick) will be deleted!
$ diskutil partitionDisk /dev/disk2 1 "Free Space" "unused" "100%"
With this command the USB stick was re-partitioned to have 1 partition without formatting and 100% of the size of the stick. If you check it again with “diskutil list” you will see the changes already, also the USB stick will no longer be shown in the Finder.

Copy the image to the USB stick

Now we can copy the disk image we created to the USB stick. This is done via the dd(1)command. This command will copy the image to the disk (substitute the appropriate disk name for your USB stick here, as with the re-partitioning command):
$ dd if=destination_file.img.dmg of=/dev/disk2 bs=1m
The dd command does not show any output before it has finished the copy process, so be patient and wait for it to complete.
$ diskutil eject /dev/disk2
To eject the USB stick, use the above command. After this is done, the bootable USB stick is ready to be used.