Tuesday, December 27, 2011

Another simple LightStrike gun Mod

Ok, I've been playing around a little bit more with my  D.C.R.-012. Basically it's turned into my practice gun. I'm trying all my hacks and mods on this LightStrike gun first to learn my mistakes in one sand box as it were. At any rate, this time I decided to put a SPST push-button-style switch in. It turned out great functionally. Turned out horrific visually. First I decided to cut the clipping bracket off the back. I decided to take my new Dremel 4000 out for a spin on this mod, so I used a cutting disk to cut the piece off.

And then used a sanding band disk and buffing paste and felt pad. Lesson learned: Don't do that. Basically the plastic is far too soft to dremel at most speeds. You basically end up melting the plastic. Further I nicked the plastic where the headphone jack goes making it look even worse. Anyway, I finished up the job with a Xacto knife, which is what I should have started with. I cut a notch in each half of the case to fit the round button. Lesson #2, it's pretty hard to get this even, so either cut it out with the gun screwed back together, or put it on one side or the other, not along the lateral line.
I cut the lead going to the weapon select and soldered it to my push button. Interesting note about the capacitance sensing of the guns, they don't look for a specific value, but a delta in that value. If, for instance, you want to take a gator clip and temporarily clip a switch on, you have to do it while the gun is off. Otherwise it interprets the change in capacitance as having the button pressed and it cycles through the weapon settings continuously (which makes sense, I've increased the electron holding capacity of the wire lead. Cutting the copper tape off and putting the button on changed the initial value of the capacitance on startup but that initial value isn't important, it's changes in that value. Ok, here's what I considered the interesting part. The switch itself isn't enough. You have to put a wire lead hanging off the other end of the switch to hit the threshold needed to evoke the change. I tried some simple test and basically I need at least 3 inches of the wire I was using to get it to flip. To ensure it would trip. I used a red piece of solid core wire that's hard to see in my picture, but I basically just coiled it up in the dead space between the trigger housing and reload switch.
The End result, I have a button on the back of the gun that is now weapons select.
So now I can change weapons with one hand. I've got to tidy up the fit and finish a bit, there's gap still where the two halves meet and I cut too much on one side and will need to patch/bondo that back. But it works. I think the next switch I want to add is something like these two switch types:
These are both pictures from the radioshack.com website. The toggle with safety cover would look the coolest, but it's not a SPST. The 2nd switch is a SPST and it's lighted, so presumably you could add some more cool lights to the gun over all with this one. Anyway, we'll see if I actually get around to it. I had also thought it would be cool to have the weapon select button be a rotary switch, but as LYNX pointed out in his comment, rotary switches aren't typically SPST. I guess I could make Cam with a lobe on it to push a SPST button, but that'd be too much effort for me at this point. In the photos above, you can also see my 'learning' attempts with Amaco's Rub 'N Buff product line. I didn't prime the gun first, I simply started smearing it on, and it seemed to work as expected. The copper looks like it will give me the look I want. The silver leaf (not show) didn't work out as well as I had hoped. My local A.C. Moore only had those two colors, but now that I know how they look/work I feel a bit more comfortable about buying them online. I'll probably go for Ruby and Spanish Copper. Most of what I'm figuring out I've learned/read in various NERF gun mod sites and forums.

Still have a lot more practicing to do. It'll be interesting to see if this gun even functions by the time I'm done with it.









Tuesday, November 15, 2011

Light Strike Bits decoding spreadsheet

I've taked a few times about 'decoding the bits' so I thought I would finally get around to putting up a spreadsheet for anyone to see. A quick refresher of how I'm counting/tracking the output from the light strike devices: 65 'signals' come from the device. They come in two types: Pulses or Spaces. This is what the LIRC software refers to them as, so I just continue that. If it's wrong, it's GIGO from LIRC to me to you. The first signal is a large pulse, typically double the value of all other pulses you will get. This is the 'frame start' if you want to think of it in terms of a networking packet. The next 64 'bits' of information are alternating pulses and spaces. The pulses are constant. They're the markers between spaces to let you know when a space starts and ends. Since the pulses are simply borders for your spaces, you are left with 32 bits of data in your frame. Because I cheat and take the output from one of the LIRC utilities rather than reading the pulses directly, I count the pulses and spaces together for 64 'bits' in my coding (mostly because when I started I wasn't 100% sure if the pulses might have a hidden significance). So when you view the spreadsheet, even numbers are the spaces, odds are the pulses.

Here is the google docs spreadsheet of my light strike bit decodes.  There are four tabs, one for the rifles, one for the pistols, one for the ITS and bit math where convert the bits from binary to base10 numbers to see the relative values.  The pistols sheet is a work in progress, I only took one stab at decoding the only pistol anyone in my group has.  It had surprising results.  A laser strike from a pistol is different than the laser strike from the rifle.  It makes sense in a way.  The rifle bits add up to the number 1344, but the laser strike on the pistol is only 258 it seems.  They seem drastically different which means I should probably revalidate the values coming out of the pistol.

I'll probably create a code.google.com project to dump my simple perl code into at some point too, with the hopes that someone who is an actual developer can take it further.

Monday, November 14, 2011

test pictures

testing a picture

IMG 0027

I'm playing with a new blog editor called MarsEdit and want to see if it's worth buying.  Want to see if it can upload images directly to blogger.com blogs.

Monday, November 7, 2011

Migrating from my old blog to this new blog...

Right now my blog is hosted on PowWeb.com and it's been great, but I'm tired of managing the wordpress config myself, so I'm going to google's Blogger.com setup so it will be all tied into my existing google apps accounts for my vanity domain.  There's bound to be a lot of mistakes as I copy the posts over, so please bare with me.  I won't actually change the DNS entries until I get the stories 100% migrated.

For now I've run into the post limit for the day, so it'll have to wait until tomorrow.  Someday http://rich.whiffen.org will be here.

Light strike scope accessory tear down

So I got around to taking apart my Light Strike scope. I didn't like that my gun was black but the scope is brown. I also didn't like how it looked or the plastic used to simulate the optics of a scope.

NewImage
Other than enabling the two shot types for your gun, it wasn't that appealing to me over all and I doubted I would ever actually use it. So I decided to break it open. Break is the operative word here. Even after you remove the numerous screws hiding under the stickers (six of them I think) the scope doesn't come apart easily. The front plastic lens housing is essentially melted/glued in place. So you would not be able to take apart your scope and put it back together. I was thinking it might be fun to put a real laser pointer inside or some thing to act like a reflex sight to make it look cooler. No such luck.
NewImage
There really isn't much to the scope. It doesn't actively do anything other than flash the LEDs and enable the fire modes in software. I'm guessing some transistors and capacitors or resistors. I don't know how to tell the difference between SMD capacitors and SMD resistors. They have numbers like 101, 470 and other such values on them. The transistors have numbers too but I can't read them (they have three solder points so I'm guessing they're transistors). From there its a ribbon cable to the multicolor LED and red LED. The multicolor is the one that lights up the plastic dome on the top of the scope with your team color. The red one simply makes the red dot appear in the center of the rear optic.
NewImage
So it would be quite simple to replace those two with something else like a real laser pointer. I took a laser pointer from a trade show apart and extracted just the laser goodies out of it, so if I can find something cool the mount it in, I will likely take the red LED out and replace it with a laser pointer.
scope pcb
Here's a closer view of the PCB.

Another interesting thing I found out: the ports are not interchangeable. You cannot plug the scope into the launcher/rapid fire port. The gun shuts down if you do. So my theory that the ports were a parallel bus before is wrong. Thankfully the gun doesn't fry if you plug it in backwards or in the wrong port. Anyway, there yo have it, the internals of the scope. I might decide to take apart the rapid fire system to see what's inside there as well.

Wednesday, October 19, 2011

iCloud and iCal part two...

Well, still no traction on why iCloud spammed former clients with appointment accepts. I did get an email from Ed K. who seems to have the same problem and like me can find little or no information on it. If you're iCloud is accepting old appointments, pile on a discussion thread I started: https://discussions.apple.com/thread/3411914 and maybe we'll get some traction that way.


This is the real danger of the cloud. All of the forensic data I would normally use to track these kind of issues down are not available to me. The cloud owns them and they are not going to be forthcoming with information about errors and outages. I think that's an interesting aspect of cloud computing that is worth some discussion. Security in the cloud is an issue for a lot of people because it's very difficult to know who truly can access your data. I think it becomes even worse if someone does get your data and you need forensic data to track it down. For example if you are a new start-up and have some super-secret and valuable information that is stolen via the cloud, would Amazon give you all the information you would need to track the perpetrators down? Just because it's valuable to you, doesn't mean it has the same value to Amazon.   


As an aside, my choice of Amazon isn't meant to imply that they would or would not behave badly in that senario, just talking in hypotheticals.


My first Light Strike Mod and tear down photos

All right! It's light strike mod time! I've decided to hack my  D.C.R.-012 and do some mods to it. After you remove the stickers (which is a little too easy, the adhesive isn't very good) it looks like this:
Gun right
Gun Left
The little copper patches are the 'switches' from the stickers. They are capacitance sensor based, which is neat and disappointing at the same time, because it make putting a real switch there complicated. Anyway, on one side there are a boat load of screws that need to be removed and the orange end-cap on the barrel needs to be taken off (comes off easy). After that, you see something like this:
Inside of Gun
Picture is a bit blurry, but you get the idea.
gun close up
The 'brains' are interesting. Everything is clearly labeled in english for what it does. Things like CAP_SENSOR, LIFE, RELOAD or IR_RX so drastic mods would be pretty easy. The mount points for the attachments seem to be in parallel so they're likely only restricted by the plastic mount shape rather than the actual location. It would be interesting to see what would happen if you grafted a 3rd mount point on. Could you activate the tracker at the same time as the scope and launcher attachments?
gunfront
Looking at the IR blaster (the opaque lens) and receiver (the black circle with the silver X on it)
gunimitter.png
The IR transmitter with the cone and lens removed.


I'm not doing much today, just changing some LED colors. the life bars are 3 red LEDs. Going to make them 3 different colors (well, specifically changing two reds out)
gunleds.png
unscrewed them and soldered in a green and blue that I took out of some of my kids toys (sssshhh, don't tell! They were broken anyway). I would have rather done green -> yellow -> red but none of the toys had any yellow LEDs. I guess I could have gone white and then put a yellow film, but I'm just screwing around so what the heck.
bluegreenred
First off, this Point-and-shoot camera stinks. Second, here's the two new LEDs in place. They're rounded on the top and the originals were flat, so I get a different light distribution in my new LEDs that isn't ideal. But it does work:
gundone
So now when I get hit, I lose blue -> green -> Red health bars. Some future mods I think I might do:

  • Move the on-off switch to where the head phone jack is. The headphone jack location would allow me to turn it on and off one handed while gripping the gun.
  • Try to get a mechanical switch to work with any of the buttons. In particular, weapon select would be neat to make into some kind of rotary or dial type button. A toggle switch for single fire/semi-auto fire, etc.
  • Graft on some 'extra bits' to give the gun more profile relief. I can't for the life of me figure out why they made all these guns so flat. I have some plastic tubing and other ornaments I could put on the sides with some LEDs to spruce up the side profile.
  • Paint job. I've been stalking the Nerf Modding forums looking for tips and pointers for how to paint plastic guns. So far I have a few ideas. I'll probably just go with basic silver and red to match the grip plastics

Next I take apart my scope and rapid fire attachments.

Monday, October 17, 2011

iCloud and iCal accepting old appointments :-(

So Friday I received a bunch of out of office replies from former Co-workers who I did not email. Uh oh, some virus/malware is running somewhere. Panic level went to 11. Continued to sort through them, and a few were direct replies. I read them and Ed and Brian are asking me why I'm accepting appointments for meetings that have already past. Oh boy, this is going to be hard to track down. It could be a phone based malware, Mac/PC or an epic hack in the cloud.

Oh, did I mention I had just upgraded to iOS 5 and Mac OS X 10.7.2? Yup, sure did. Wasn't able to migrate my MobleMe stuff because the servers were too busy (which is a topic for another rant, since this problem has been solved in the industry multiple ways). So the iCloud transition has none of the fit and finish that I was expecting. Especially considering how bad MobileMe was. Even .Mac was better then MobileMe and .Mac couldn't sync for beans (again another problem that had been solved numerous ways yet ignored). Steve Jobs was supposedly personally involved with iCloud because if is tremendous dissatisfaction with MobileMe and it's reliability. Well they must not have fired the right people because iCloud has been a bumpier ride than MobileMe for me personally.

So back to my 'malware' problem. My Malware goes by the name iCloud. So when I converted my AppleStore account to iCloud (which is another problem I now have two iclouds and can't merge them) it took my home and work calendars into the iCloud. When doing so it went and accepted (and sent responses) to meetings that have already occurred. In 2007. Yup, I'm accepting 3 and 4 year old meetings that I already attended. This seems like a catchable senario to me. What possible reason for accepting a meeting that's already passed could their be? I would concede that there might be a need to accept an appointment that's up to a week old for some kind of tracking/verification purposes, but 3 years?

Icloud calendar

A bunch of googling didn't turn up others with this problem, so maybe there's something unique to how I did it. I took events from my GoogleApps email and accepted them on my .Mac enabled Laptop. I'm actually quite disappointed that iCloud dared to communicate on my behalf with out asking me. I should have been given the option to not send a response like I am with other well behaved calendar apps. I have a few more computers to upgrade. We'll see if I accept more phantom appointments. Oh well, another year, another disappointment with the Minnesota Vikings and Apple's cloud services.

 

Thursday, October 13, 2011

Decoding the Light Strike ITS

Ok, spent 10 minutes after lunch looking into the ITS signals.

ITS

You'll have to read the previous post about bits, to know what I'm rambling about, but in essence the significant bits were the even bits between 40 and 62. Not all are used, but I haven't tried all the guns and option combinations yet. So the ITS (Intelligent Targeting System) has 3 modes. Sentry mode - you have to hit the target 5 times, each time you hit it, you light up a bar with your team color. Fifth hit turns it into a sentry for your color. It blasts out random shots until it's captured by another team. Bomb Mode - similar, you get 5 hits to activate the bomb, 6th hit to set it off, which spins the device and it emits shots in every direction and makes an explosion sound. Medic Mode - 5 shots to capture again, but now when you shot it a subsequent time, it puts health bars back on your gun.

So if you activate the sentry, the bits that go high (in addition to the team bits) are: 40, 42, 44, 46 and 56 which in my 'bit math' comes out to a strength of 3848, the strongest shot yet. So far, nothing too unusual.

If you activate the Bomb, however, things get interesting. The bits that go high for blue are: 28, 40, 42, 44, 54, 56. Bit 28 is the new rascal. If you do it as Red, bits 28, 30, 40, 42, 44, 54, 56 go high (in addition to the team bits) - both 28 and 30. Yellow is just 30. Green is just 28 again. I was hoping that green would be both 28 and 30 low. That would make bit s28 and 30 a team marking, but it isn't. So why are blue and green the same, while yellow and red are different? A mystery for another day I guess.

Next up, Medic mode… this would be a fun one to clone into a smart remote or other IR blaster device. You could leave a 'stim-pack' like in the video games around the playing field. Medic mode is the most different code thus far. It broadcasts bits 8 and 40 for every team, and then you get a simple 3-bit mapping for the team color with bits 58, 60 and 62. So 58, 60 and 62 are blue, 58 is red, 58 and 62 are yellow and 50 and 60 are green. This is the first use of a bit below 10 and uses a different set of bits to mark color. What would be interesting is if you could send a 40 and 42 along with the rest to see if you get more health back per shot.

If I'm reading things right, it would seem that 2048 is the number to take a health bar on or off. So now I just need to finish writing my code to recognize these different flag values and then start painting the screen the correct color for the flag.

 

Wednesday, October 5, 2011

More Light Strike attachments and decodes

So Adam bought the G.A.R.-023
gun1refractor.pngscope.png
And two accessories, the scope and the refractor launch system.
rapidfireits
I went and bought the same scope and the rapid fire system. I also got the ITS - Intelligent Targeting System. So we now have every offensive add-on (missing the detector, but that's passive/defensive so we can go on with out it). With these attachments you get an Optic strike and Refractor strike with the scope and a launcher strike with the RLS and Rapid Fire with the RFS. The RLS and RFS strikes are actually two things, a distinct IR code and three consecutive hits. So now I have decoded these light strike mods and their data bits.
If you recall, the bits in play are: bit 40, bit 42, bit 44, bit 46, bit 50, bit 56, bit 58, bit 60, bit 62. We now get to add bit 54 and bit 46 to the mix.
High bits for Optic strike: 40, 44, 56, 58
High bits for Refractor: 40, 42, 44, 54, 56
High bits for RFL: 40, 42, 46, 58, 60
High bits for RFS: 40, 42, 60, 62
If you make that a 12-bit binary, you get:
Optic: 2572
Refractor: 3608
RFL: 3334
RFS: 3075
Making the RFL the device to have it seems. In practice it is deadly too, it takes 2+ bars off your gun per shot, but has a long recycle time. Not sure when I'll get to it, but at some point I'm going to decode the ITS. When you capture the ITS for your team it can then do three things: 1 - Sentry mode, it spins and shoots randomly, only damaging teams of other colors. 2 - Bomb mode, you can activate and detonate a bomb doing massive damage (I'm assuming, haven't set it off yet). 3 - Medic mode, when the capturing team shoots the target, it beams back a health bar. Medic mode will be the most interesting to me. What does it send? Could you program a smart remote to record that signal and then have your own version of a med-pack like in the video games? There are other light strike mods we're thinking of too. A fun one might be to make a trip wire. Set off the sensor and an IR damage flash goes off. Or a death room, a room where you continually take low damage doses. It would be like crossing the lava or nuclear waste areas in Doom or Quake.
We spend 10 minutes or so goofing around with it this morning. First time we actually did some real shooting, and it went awesome. This is going to be really fun! Got an uptick in website traffic this week. Going to have to see what search terms bring you to these posts. Probably light strike hack or light strike hacking. I wonder if I show up for light strike mod at all. Probably will after this post.

Monday, October 3, 2011

Light Strike decodes so far

Ok, so I've been working on software to work with the Light Strike laser tag system. In the long run, I still want to hack the light strike targets and light strike laser tag guns but for now I'm settling for decoding the pulses from the guns themselves. For everyone who hasn't been following along (and it's riveting, how could you not!) a quick re-cap.

Using a USB-UIRT device I am able to receive the pulses coming from the gun. The signal starts with a pulse of ~6700 (sometimes higher, sometimes lower). Followed by 32 interleaved pulses and spaces that hover around 700. The spaces and pulses are effectively 64 'bits' although it seems only the spaces are actually used, not the pulses as I previously thought. The output clearly spaces, but because that made no sense to my brain, so I said pulses in previous posts. Anyway the way I'm tracking it, I'm counting the spaces and pulses just in case I get a surprise somewhere. The spaces that have meaning hover around 3200. So in my code I just look for greater than 5000 for the 'frame start' and greater than 2000 for the 'space' to be a high bit. Keep in mind I'm counting pulses and spaces when tracking them and I start at zero (because it's not confusing enough right?), so if I say bit 4, I mean space(0), pulse(1), space(2),pulse(3),space(4). If you don't like it, divide them by 2 to get the 'space' position only (which is why I started with zero). So far here are the bits of note:

BIT 10 - always high in the two assault strikers I've tested: G.A.R.-023 and D.C.R.-012

BIT 12 - part of the team color

BIT 14 - part of the team color

12 and 14 high = blue

12 and 14 low = red

12 low and 14 high = yellow

12 high and 14 low = green

With this info, I can now determine what color shot the IR sensor and can effectively write my own target for capture the flag.

But wait theirs more! For shots:

bit 40, bit 42, bit 44, bit 46, bit 50, bit 56, bit 58, bit 60, bit 62.

High bits for Laser strike: 42, 46, 60

High bits for Stealth strike: 42, 44, 60

High bits for Pulse strike: 42, 44, 46, 60, 62

High bits for Rail strike: 40, 58, 60

High bits for Sonic strike: 40, 46, 56

So there is rather some reserve bits in the middle or the assault strikers add ons use the middle bits in the low 50's. If you read the bits from right to left starting at 40 and ending at 62, you have a 12-bit number that gets bigger the more powerful the strike. I vaguely recall 12-bits being important in the IR remote space, so maybe that's why. Maybe my math is off too. Anyway, if you take my 12 bits as binary numbers:

Laser - 1344

Stealth - 1538

Pulse - 1795

Rail - 2054

Sonic - 2312

Stealth strike may be an outlier, because I'm not sure that it's stronger than a laser strike in terms of damage done to the other guns. Anyway, since I can decode strike values, and I have orders of magnitude, I can do some fun stuff with my computer based target. For example, I can have degrees of team color. You could have a laser strike be +1, stealth +2, etc. And every time you shoot my target, the counter goes up (or the team color level bar could fill more screen) up to a maximum number, say 5 or 6. Then to recapture the flag, you would have to take away the apposing teams hits first, before you could turn it to your color, making capturing and holding a flag a little more interesting.

I'm still tweaking my perl code, but in short, I went the


open(MODE,"mode2 --driver=usb_uirt_raw --device=/dev/ttyUSB0|") || die "Unable to open mode2\n";

route to get the data. The mode2 binary from LIRC does a great job for me already, why re-invent the wheel at this point? I have it capturing the 'high' bits and printing the team color so far.




---- SHOT ----
10 - 3150
12 - 3200
14 - 3150
42 - 3150
44 - 3200
60 - 3200
---- SHOT ----
COLOR: blue
---- SHOT ----
10 - 3200
12 - 3200
14 - 3200
42 - 3200
44 - 3200
60 - 3200
---- SHOT ----
COLOR: blue
---- SHOT ----
10 - 3150
42 - 3200
44 - 3200
60 - 3150
---- SHOT ----
COLOR: red
---- SHOT ----
10 - 3200
42 - 3150
44 - 3150
60 - 3200
---- SHOT ----
COLOR: red
---- SHOT ----

So I'm getting pretty close!

Friday, September 30, 2011

Perl code for Light Strike decoding

Making progress on my quest to write a 'capture the flag' module for the light strike laser tag guns. Some googling found me this code from Kenneth L. Root. <http://the-b.org>. I hacked it into this the other day and am able to get this output now:




root@rwhiffen-OptiPlex-GX280:/tmp# ./light-strike.pl
Opening port: /dev/ttyUSB0
Opened port /dev/ttyUSB0
Shoot the gun at the IR Sensor
IR Code: 0xe6 0xc2 0x87 0x0d 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x40 0x12 0x40 0x12 0x40 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x3f 0x12 0x0e 0x12 0x40 0x12 0x0f 0x11 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x3f 0x12 0x0e 0x12 0xff
root@rwhiffen-OptiPlex-GX280:/tmp# ./light-strike.pl
Opening port: /dev/ttyUSB0
Opened port /dev/ttyUSB0
Shoot the gun at the IR Sensor
IR Code: 0xb9 0xc2 0x86 0x0e 0x11 0x0f 0x11 0x0f 0x11 0x0e 0x12 0x0e 0x12 0x40 0x12 0x3f 0x12 0x40 0x12 0x0e 0x12 0x0f 0x11 0x0e 0x11 0x0f 0x11 0x0e 0x12 0x0e 0x11 0x0e 0x12 0x0e 0x11 0x0e 0x12 0x0e 0x12 0x0f 0x11 0x0e 0x12 0x0e 0x12 0x40 0x12 0x0e 0x12 0x3f 0x12 0x0e 0x12 0x0e 0x12 0x0f 0x11 0x0e 0x12 0x0e 0x12 0x0e 0x12 0x40 0x12 0x0e 0x12 0xff
root@rwhiffen-OptiPlex-GX280:/tmp#


So I'm getting closer. The results are more inconsistent with the perl code than with the 'mode2 command, which makes me think I might want to do some 'expect' style perl coding with the app rather than direct. maybe something like:




open(MODE,"|mode2 --driver=usb_uirt_raw --device=/dev/ttyUSB0 --mode");


And then do all my interacting with the output via the MODE file handle. That would allow me to get some basic functionality going.


Wednesday, September 28, 2011

Light Strike IR decoding part 2

The continuing saga of my efforts to hack a light strike laser tag system by reading the infrared signals it puts out…

Ok so I just went from being totally stuck and posting that blog post, to being unstuck in about 30 minutes. Ok, so in the last post, I was thinking I needed to figure out what the bit encoding was for the pulses coming in. WHen you look at the in a long row, it's hard to see the patterns. So I was reading the man page for mode2, and it says there's another command line switch called --mode, which is helpfully described as " enable alternative display mode". Ok, what could it hurt right? So I ran it. Instead of getting the two column pulse/space list, you get a more helpful:


6700     650      900      700      900      700
900      700      900      700      900     3150
900     3150      900     3150      900      750
850      750      850      700      900      700
900      700      850      700      900      700
850      750      850      700      900      700
900      700      900      700      850      750
900     3200      850      700      900     3150
900      700      850      700      900      700
850      700      900      700      900      700
900     3200      900      700      900  1382500


Which is a lot easier to read, and makes deltas between two different settings stand out. That one was a blue, this one is a red.


6700     650      900      700      900      700
900      700      900      700      900     3150
900      700      900      700      900      700
900      700      900      700      900      700
900      700      900      700      900      700
900      700      900      700      900      700
900      700      900      700      900      700
900     3150      900      700      900     3150
900      700      900      700      900      700
900      700      900      700      900      700
900     3150      900      700      900  2267300


Notice how C2 R3 and C4 R3 change from 3150 to 700? That pattern holds for yellow and green as well. You end up with a pretty simple table:






If you count the spaces as clock ticks and the pulses as 'bits' you can then start to map things out. The last huge number in C6 R11 is the time between the last event and the next event. The last event recorded does not have this value, it is blank and can be discarded. The first pulse is a 'double-high' value which marks the beginning of a frame. This gives you effectively 32 bits. Now I just have to get a perl or python script to read the device instead of the 'mode2' command and I'm off to the races. That will have to wait for another day however, because I need to get back to work.

Light Strike laser tag

After reading a review on Ars Technica: Lawn warfare: Light Strike brings laser tag back home I decided I had to have some of these at the office. They're pretty cool, mostly gimmicks but they do work. I bought myself a D.C.R.-012. Am probably going to pick up some of the accessories as well. I've talked some co-workers into buying them, so we're almost ready to have some office warfare.

dcr-icon

The trick is, you can only 'death match' each other for so long. And most of the that would be on the honor system, since you can self-respawn quickly. So I've set out to try and make my own 'targets' or flags to play capture the flag with. I have some USB-UIRT devices. I found some Linux drivers at LIRC.org and a CPAN perl module for the driver. So far, so good. I'm able to detect gun output by running:

mode2 --driver=uirt2_raw --device=/dev/ttyUSB0

From the command line. It gives me output like this:

pulse 6650
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 3200
pulse 850
space 3200
pulse 850
space 3200
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 700
pulse 850
space 700
pulse 850
space 700
pulse 850
space 750
pulse 850
space 3200
pulse 850
space 700
pulse 850
space 3200
pulse 850
space 750
pulse 850
space 750
pulse 850
space 750
pulse 850
space 700
pulse 850
space 750
pulse 850
space 700
pulse 850
space 3200
pulse 850
space 750
pulse 850

Unfortunately subsequent firings do not give me identical values. Some times the pulses are 50 higher, so 6700 rather than 850. Perhaps worse still, the other three colors (that was a 'blue team' laser) seem to have the same values. Next I'm going to plug it into a windows machine and run Girder on it and see what that gives me.

Google wasn't very helpful, perhaps because Light Strike isn't a unique term to the laser tag guns. It's used in other contexts as well. So I think I'll pads this post with light strike hacking and other google-able terms. Light Strike IR hacking is a good example of what I was hoping to find a post about. ANyway, hopefully someone who is searching for linux IR hacking light strike guns will find me and we can team up.

Tuesday, July 26, 2011

Canon printer errors from Mac OS X (10.6 and 10.7)

Occasionally when printing to our Canon iR C3080 from Mac OS X 10.6 (Snow Leopard) or 10.7 (Lion) we get the following error:

Cannot continue printing because an error occurred. To continue printing, select [Raster Mode] in [Quality]-[Quality Settings]-[Graphics Mode].: 15920

Google wasn't immediately helpful, so I pieced a few things together and wanted to write them down so I can remember how I fixed it if/when it happens again.

First, We're running the canon UFRII v2.21 drivers from the canon website, so start there if you're not running the specific drivers. Next, you must have admin privileges on your Mac to make the changes I'm about to describe.

Start by going to the CUPS home page: http://localhost:631/

From here you can find out all kinds of interesting things that the system preferences app hides from you. From there, we need to go to the Printers Page. Click the Printers tab on the top of the web page. (http://localhost:631/printers/). In this screen we click on the canon iR printer we need to fix.

Screen shot 2011 07 26 at 111649 am

In my case it's canon.streamsage.com. In the page that follows there is a drop down for "Administration". In that menu we need to select "Set Default Options". On that page we need to set the "General" options by clicking the General link.

Screen shot 2011 07 26 at 112550 am

We need to scroll down a bit on this page to find the "Graphics" option the original error complained about.

Screen shot 2011 07 26 at 112651 am

And set that to Raster Mode. You have to scroll to the bottom of the list of options and click the "Set Default Options" button. It should then prompt you for the admin password. Enter it and you're all set.

 

Thursday, May 12, 2011

I think I might need to wear a watch again

Watchmaker Fossil has a new digital watch they're planning to market under the Meta Watch brand. The website ThisIsMyNext has a good write-up about it. In short, it's a bluetooth connected external display that you can push information to. The idea isn't new. SonyEricsson makes one Casio announced one. Thinkgeek.com sells more than one (one and two). There's probably others along the same line. The SonyEricsson one is the most interesting, it's not only a remote display of callerID but it also has control for your music player on the phone. It's close to what I'd like to have.


Enter the Meta Watch. It's the same idea, but it's basically a blank slate. It's not designed for a specific purpose. It's make with customization in mind. So, you could, for example, push inbox counts, weather forecasts and other data like that. I'd like to use it with my ipod touch so it could summarize the nike+ or DigiFit data. Miles per hour, distance traveled, etc. It's a pain to look at that data on the actual iPod while you're exercising. It also is supposed to have an accelerometer, which gives other possibilities. You could count reps for exercise for example. You could flick your wrist to move from view to view. When you detect the bluetooth MAC address of someone you know, your watch could say "hey, John's near by" or "hide that window, your boss is coming".   


I don't wear a watch since I started carrying a cell phone but now I might have to again.