Category: Digtial Pens

ScribeStation Beta Testing Open

by alocurto Email

Link: http://www.scribestation.com

ScribeStation.com has open beta testing of the new Livescribe acquisition client which can take data off of your Livescribe Pulse pen and convert it to many usable formats. Go to http://www.scribestation.com for more information and become a beta tester today!

General Acquisition Client

by alocurto Email

Link: http://www.scribestation.com

I have been getting a lot of requests with people looking to remove the stroke data (X&Y) from the pen. I am currently writing and releasing an acquisition client that will be available at www.scribestation.com and allow users of the LiveScribe Pulse to easily access their stroke and image data on their pen.

I also have plans to expose an API that will allow your applications to work with the XML data.

I plan to have this site released within a month.... so hang in there!

Thanks for all your support, comments and feedback!

-Anthony

Exploring the AFD File

by alocurto Email

Having extracted the AFD file from the pen in a previous post I started poking around the contents of it. I then started looking through the LiveScribe desktop DLLs for methods that would help me in getting data out. My goal in this whole exploration of the AFD is to get stroke data off the pen and I managed to find that in the AFD file. I created a C# project and added the following references to "C:\Program Files\Livescribe\Livescribe Desktop\LS.Desktop.AFDDB.dll". Once you add that reference to the project, you can get the stroke contents of the AFD file like so:


LS.Desktop.AFDDB.LSDocument doc = LS.Desktop.AFDDB.LSDocument.LoadDocument("YOURPATHHERE.AFD");

//Check for strokes
if (doc.HasStrokes(0))
{
Console.WriteLine("Has Strokes!");

//Go through each page
for (int pageno = 0; pageno < doc.pageInstances.Count; pageno++)
{
Console.WriteLine(string.Format("Page No {0}", pageno));

//Go through each stroke
for (int strokeno = 0; strokeno < doc.pageInstances[pageno].NumStrokes; strokeno++)
{
Console.WriteLine(string.Format("\tStroke No {0}", strokeno));

//Go through the points
foreach (Point p in doc.pageInstances[pageno].GetStroke(strokeno).Points)
{
Console.WriteLine(string.Format("\t\t({0}, {1})", p.X, p.Y));
}
}
}
}
else
{
Console.WriteLine("No Strokes!");
}

You can use that object to get other things too. If you have any questions or need help just send me an e-mail or post a comment. I would be glad to assist.

-Anthony

LiveScribe Custom Printing... ALMOST!

by alocurto Email

To custom print your own forms using the LiveScribe Pen there are a few steps. This tutorial assumes you have installed
the LiveScribe Desktop and have it all working normally. CLOSE THE LIVESCRIBE DESKTOP SOFTWARE BEFORE DOING THIS.

Locate your AFD files. By default they are located at "C:\Program Files\Livescribe\Livescribe Desktop\Printing". You will see AFD files here along with a "Printables.xml" files. Go ahead and copy the "LS_PYON_TestPage.afd" and the "Printables.xml" for backup so that you can restore them later if need be. Now, on to the file changing.

Rename "LS_PYON_TestPage.afd" to "MyTestForm.afd".

Open "Printables.xml" in notepad. Change the first Printable Node

from:

<Notepad id="1" guid="0x66d4de896a2c6c85" filename="LS_PYON_TestPage.afd" numberofpages="1" menutext="T&est Page (1 Page)..." menuorder="5" mustexist="True" />

to:

<Notepad id="1" guid="0x66d4de896a2c6c85" filename="MyTestForm.afd" numberofpages="1" menutext="Wicked Cool Document..." menuorder="5" mustexist="True" />

Now, you can open the LiveScribe Desktop and see your form listed on the menu. That is the first step... the next is actually making that document look like one you want.

Go back to the "C:\Program Files\Livescribe\Livescribe Desktop\Printing" folder, rename "MyTestForm.afd" to "MyTestForm.zip".

Extract the "MyTestForm.zip" files to a directory. Look through the files, you will see a bunch of different things. The AFD (as discovered previously) stores a bunch of information. I am not sure what it all is, or even if stroke data that I was looking for would be in there but, there are some good things in here.

Since we want to make our own custom looking form, navigate to the "\userdata\lsac_data" in the extracted file. There you will see "LS_PYON_TestPage.v1.png", that is the form background image. Change that to whatever you would like using Photoshop, or any other imaging tool. There is also a EPS file in "pages\resources", open and change that as well. Once your modifications have been completed go ahead and copy the changed file into the "MyTestForm.zip" file using a zip utility (Winzip, PKZIP, etc.). Finally, rename the file to "MyTestForm.afd".

I figured that would do the trick but the document is not printing to the printer. It says it is but then it doesn't print. So, I am looking into why that could be. I am thinking it has to do with my EPS editing. I am probably not exporting properly. There might also be some kind of check on the AFD file. I'm still not sure.... Any ideas? I plan to revist this soon. I have to get back to getting stroke data out of the AFD for now...

LiveScribe AFD File

by alocurto Email

Last I left off I was looking into what an AFD file was. I used Red Gate Softwares .NET Reflector (Originally Lutz Roeder's) and saw a lot of metion to Zip utilities and unpacking... so, I figured I'd change the extension from .AFD to .ZIP. IT WORKED! AFD files are simply ZIP files. I unzipped it and all this >:XX came out. I am going to examine the contents and post my findings.

LiveScribe Pulse Data

by alocurto Email

Now that we know how to get the pen object I am going forward looking into getting data off of the LiveScribe Pen. Using the previous example (see last posting) I have come up with this:


void pc_OnPenDocked(LS.LDSlim.PulseAccessSDK.Interop.HardwarePen pen)
{
Console.WriteLine(pen.PenID.ToString());
ulong t = 0;
LS.LDSlim.PulseAccessSDK.PenData.GetPenData(pen.PenHandle, "Test Page", ref t, @"C:\livescribedump.txt");
}

First I put livescribedump.txt as the output but after researching further (examining the LiveScribe Desktop using filewatcher, etc.) I believe that this is an AFD file. At this point it looks like AFD is the proprietary to LiveScribe so the next step is looking into how these can be viewed/modified/etc. If you want to see some images and output data from the LiveScribe Desktop software check out:

C:\Documents and Settings\alocurto\My Documents\My Livescribe\Library\2594160249046\0x66d4de896a2c6c85_18619045271\cache\userdata\lsac_data

You will want to replace my name with your account of course. I haven't had time to see if those numbers under the Library directory are random to my machine or actually identify a document.

LiveScribe Docking Client

by alocurto Email

This week I was tasked with figuring out the LiveScribe pen and what can be done to integrate it with some of our existing data entry systems. Over the next few weeks I plan to post information as I find it out. This might be useful to someone else in the future as well as a good reference for me going forward.

If you have a LiveScribe pen, install the LiveScribe desktop (I haven't tested without doing this). Simply create a C# win form application in visual studio. Add the following references:


LS.LDSlim.PluseAccessSDK
LS.LDSlim.PluseAccessSDK.Interop

Both of those can be found in: "C:\Program Files\Livescribe\Livescribe Desktop" (by default).

The PulseAccessSDK.dll needs to be in the bin for this work. What I did was simply add the PulseAccessSDK.dll file which is also found at "C:\Program Files\Livescribe\Livescribe Desktop" and set that to "Copy Always". This will ensure that it copies to the bin at compile time and my app will find it.

Next, add a using statement at the top of your form.


using LS.LDSlim.PulseAccessSDK;

Now we are ready to create the object needed.

Create a member variable:

PenConnection pc;

On the form load, do the following:


pc = PenConnection.CreateInstance();
pc.OnPenDocked += new PenConnection.PenDocked(pc_OnPenDocked);
pc.InitilizeDeviceListening();

Create the following event handler:


void pc_OnPenDocked(LS.LDSlim.PulseAccessSDK.Interop.HardwarePen pen)
{
Console.WriteLine(pen.PenID.ToString());
}

Run the application. When the pen is docked the penId will be printed to the console. There are some other cool properties on there too, just take a look at the HardwarePen object.

Next I plan to see how I can get stroke data off of the pen.