I obviously wanted to make sure my save games and save states where all not only backed up to another local computer in my house(via rsync) but i also wanted an offsite copy. After looking around i decided to go with idrive. 5G free and they have a CLI that is supported on a surprising number of OS’s including Linux.

Setup

I set up an account and downloaded the Linux 64 bit version. It consists of a single executable that i then put in /storage/idrive. unfortunetly it requers libpopt which is not a part of lakka and lakka has no package management.

$ ldd idevsutil
 linux-vdso.so.1 (0x00007ffd0f5fe000)
 libpopt.so.0 => not found
 libdl.so.2 => /lib/libdl.so.2 (0x00007fd8a9486000)
 libc.so.6 => /lib/libc.so.6 (0x00007fd8a90e7000)
 /lib64/ld-linux-x86-64.so.2 (0x00007fd8a968a000)

Well shit. To fix this I started up a VirtualBox of, I think Arch, and scp’ed over libpopt.so.0 to /storage/idrive/. Problem solved, even if it is super hacky.

Configuration

We first have to configure our account to be able to use the CLI tool. You should create a file with your private encryption key password and another file containing your idrive password.  You can then run the –config-account option….

# ./idevsutil --config-account --enc-type=PRIVATE --pvt-key=/storage/idrive/pvt_key --user=USER_NAME --password-file=/storage/idrive/passwd
connection established

<tree message="SUCCESS" desc="ACCOUNT CONFIGURED" ⁄>

Success!. You now must fine the cmd utility server IP Address associated with your account. To do so run…

# ./idevsutil --getServerAddress USER_NAME
Password:

<tree message="SUCCESS" cmdUtilityServer="evs84.idrive.com" cmdUtilityServerIP="IP_ADDRESS" webApiServer="evsweb84.idrive.com" webApiServerIP="IP_ADDRESS"/>

HAZA! We can now finally start backing our things up.

Backing up

Create a file listing all the files and directors you want to back up. I called my file /storage/idrive/manifest

/storage/savestates
/storage/savefiles
/storage/playlists
/storage/idrive

I decided to also back up the idrive directory because it was a bit of a pain to set up. Because of this you need to add the –tmp=/tmp/idrive arguemnt to your commands. If you dont it will faile to back up some temporary files that you actually dont even want.

# ./idevsutil --pvt-key=/storage/idrive/pvt_key  --files-from=/storage/idrive/manifest / USER_NAME@CLI_IP_ADDRESS::home/lakka --password-file=/storage/idrive/passwd --temp=/tmp/idrive
connection established
building file list ...
====================================================================================
| FILE SIZE | TRANSFERED SIZE | TOTAL SIZE | PERCENTAGE | TRANSFER RATE | FILENAME |
====================================================================================
[ 2712553] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/idrive/idevsutil]
[ 48240] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/idrive/libpopt.so.0]

*** REMOVED DATA ***

[ 13179] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/savestates/Nestopia/Darkwing Duck (USA).state.auto]
[ 430181] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/savestates/Snes9x/Legend of Zelda, The - A Link to the Past (USA).state.auto]

sent 3500 bytes received 40 bytes 2360.00 bytes/sec

CRON

lastly we set up cron and or small shell script to back things up every 10 min.

Cron entry:

0,10,20,30,40,50 * * * * /storage/idrive/backup.sh > /storage/idrive/backup_`

1
date +"%H%M"`
.log 2>&1

(Not sure why wordpress is freaking the fuck out)

The backtick voodo is so i get an hours worth of backup logs that overwrite themselves after one hour. Helpful if there is an issue and i don’t have to worry about rotating or deleting old logs as it does that itself.

And the contents of the backup.sh is…

#!/bin/bash

LD_LIBRARY_PATH=/storage/idrive /storage/idrive/idevsutil --pvt-key=/storage/idrive/pvt_key --files-from=/storage/idrive/manifest / xxann5@173.255.9.166::home/lakka --password-file=/storage/idrive/passwd --temp=/tmp/idrive
date

And thats it. I can now relax and know that every 10 min all my save data will be nice and safe.

Share Button

I am rather pleased on how this turned out. I did miss one trace. though I blame Diptrace! The two traces where touching in the schismatic but they where not linked. Its easy enough to tell since linked traces have relatively large circles on them. I fixed the schismatic and re-loaded the Gerber files onto OSH Park. You can see the small wire I put in place in front of the middle switch.

Once I added that wire it started working exactly as I wanted it it. And As I was hopping my IBM T42 Thinkpad (best laptop EVER by the way) power cord power the bbps perfectly. Powering it by both the 5V USB or the 16V power cord outputs the same exact voltage. The USB data pass-through also works as expected. I have also created a Project page. You can find links to OSH Park as well as the Mouser parts list page.

Share Button

bbps

I started a new small project. I am calling it bbps (Bread Board Power Supply). I realize there are quite a few of these out there already. They are all missing one thing that would be a REALLY nice feature. USB data line pass-through. Maybe it is because I am mostly interested in making PC peripherals but I am somewhat surprised that there is nothing out there already that has the feature set I am looking for. A good potion of this design is straight from my loststone project.

Features I am looking for in a breadboard power supply…

  1. Independently selectable 3.3V and 5V for two power bars.
  2. Optional shutdown a single power bar.
  3. Provide power from both a wall wart or a USB connection.
  4. ESD protection. (I think I went a bit over board on this front)
  5. USB data line pass-through
  6. Stable. Don’t want it flopping around.

I have place the OSHPark order and will be placing the Mouser order shortly

Share Button

dsc_0647_small

Two years of blood sweet and tears and it has finally come together! A fully opensource trackball from circuit board to software.

Check out the project page for more details.

Share Button

Fail

DSC_0656small

This did not go as planed. First off I left out a trace and a resistor. Thus the enormous resistor. I did however learn allot.

When soldering SMD parts, your using to much solder. If you think your using the right amount you still using to much! I know its considered blasphemy but I have the best results by putting an ever so small dab of solder on the tip of the soldering iron. Then with flux already on the part just tap one of the pads for a split second.

Not surprisingly I had the most trouble with the QFN crystal that I am using. I used the same technique as mentioned above accept I added the solder directly to the pads without the chip on them. Then I applied more flux. Then after placing the chip touched each corner with the soldering iron to re-heat the solder. That is not what i did to start out. I attempted to remove the crystal and attempt it again. Unfortunately I am an ogre and ripped off one of the tracers. you can see the through hole i attempted to patch in.

Most would consider these soldering techniques absolutely horrible and say to never do it. I however am more interested in the results than the methods.

Finally, Network cables make for HORRIBLE patch cables. At least the cheap shit i have is. Not only is is stiff but the melting temperature of the insulation is way to low for soldering.

Share Button

I’m back

Took some time off. Been quite busy. That and I was having some issues and needed to step back.

Tonight I messed with the CPI values a bit and removed the multiplier. The multiplier works well on the desktop but in games it makes movement… strange. But the big win was replacing the 100 pF capacitor on the MC14490(debouncer) to a 1000 pF capacitor. This slowed the oscillator allowing for more time between register shifts in turn allowing for a longer debounce period. This change fixed all my bounce issues! I still want an oscilloscope to actually see the bounce and how the different debounce methods affect it. I am just guessing, which I don’t like doing.

Share Button

Progress

I have not been working much on the trackball. I did have a few hours to work on it the other weekend. The leather is a nice touch. It is very comfortable. I had a hell of a time getting the copper wire(10 gaug) in the slot i had made. I think it is coming along nicely. Has an almost steampunk look to it. There is still something a bit off with the motion though.

Share Button

So i have been using a 1.5″ x 3.5′” PVC reducer as the housing for the motion sensor as well as the stand for the billiard ball. I really could not ask for anything better. The one problem i always had was the distance between the motion sensor lens and the billiard ball According the ADNS-9500 technical manual it should be at a distance of 2.4 mm with a tolerance of +-0.22. Really? 0.22 mm tolerance. I realize in the grand scheme of things a tolerance of four tenths of a millimeter is really not all that precise.  However its not really possible to eyeball that. I was having trouble getting a good measurement so I created a cutout.  I have always really like cutaway models. So after creating the cutaway I was able to get some accurate measurements. It turns out I need to cut the upper PVC ring so it has a height of exactly 8 mm.

Share Button

HELL YES!

I have not done much with the trackball as of late. To be honest i have been a bit discouraged with Avago pulling there optical navigation chips after selling there IP’s to Pixart. I had a feeling that Pixart would eventually put there newly acquired IP’s to good use and it looks like there going to do just that. From June 4th to 8th, 2013 at Grand Hyatt Taipei in Taiwan where they will be…

Introducing our range of new products for the Navigation Sensors, like Wireless Gaming, Market’s lowest power sensors for both Laser and LED wireless application

HAPPY DAYS! I just hope that the distributors actually get them and don’t take to long to do so.

Share Button

I really put some time into fleshing out the PCB design. I am quite pleased with this first revision. This was my first attempt at designing anything like this so allot of time was spent learning what I needed to do and then how to do it. It was a bit overwhelming when I first create the PCB from the schematic (Image 2). Cluster-fuck is a good way to describe the “ratlines”. However once I got the hang of the interface I found it rather fun to lay the components out and run the traces, almost like a puzzle.  I had to redo a few parts but overall it went fairly smoothly,  it just took some time.

There are no design rule or net connectivity errors, which in programming terms means “it compiles so it must be correct” 😀 I will be taking a break for a week or two. Then come back and go through each component and each trace in both the schematic and layout files (again). The less then fun part. Then on to OSH Park

Share Button