libfreespace.NET 0.2 release

104 views
Skip to first unread message

Neel Goyal

unread,
Nov 6, 2009, 3:49:33 PM11/6/09
to libfre...@googlegroups.com

The libfreespace team is happy to announce libfreespace.NET 0.2

 

Changes in this release include:

-          Fixes for marshalling device name and freespace versions

-          DeltaX, DeltaY message field fixes

 

This release should be paired with libfreespace 0.4.  You can find more information and download source and binaries from https://launchpad.net/libfreespace.net

 

Thanks,

 

Neel

info...@gmail.com

unread,
Jun 15, 2014, 5:23:53 PM6/15/14
to libfre...@googlegroups.com
HI Dear Neel
i wanne use libfreespace.NET 0.2 but i cant use because of complicated Errors. plz Help me and answer these Questions :
- How Can i use it ? can i use it with VisualStudio 2010 or 2012?
- according to ur texts  u said : This release should be paired with libfreespace 0.4. what does it mean ? plz explain it for me 
- would u plz tell me all the tasks that i must do to use the  libfreespace.NET 0.2 STEP BY STEP?
Best Regards
Infokade



On Saturday, November 7, 2009 12:19:33 AM UTC+3:30, Neel Goyal wrote:

The libfreespace team is happy to announce libfreespace .NET 0.2

Merrill

unread,
Jun 16, 2014, 3:05:04 PM6/16/14
to libfre...@googlegroups.com
Hi Infokade,

Thanks for the question.  The libfreespace.NET v0.2 and libfreespace v0.4 are some of our older software versions, but as long as you are using the correct type of device it should work.  If you are using one of our the more recent Freespace devices (FSM-9, Scoop, etc) then these versions will not work.  Do you know what type of device you are working with?  Unfortunately libfreespace.NET v0.2 is the most recent C# library for libfreespace, so if you need to use C# then that is the latest supported version.

Libfreespace.NET is simply the C# wrapper that works with a standard Libfreespace library.  This means that you need to get a support Libfreespace.dll binary for use with Libfreespace.NET.  For Libfreespace.NET v0.2, you need to get libfreespace v0.4 (you can download the source or prebuilt binaries from https://launchpad.net/libfreespace/0.4)

Libfreespace.NET v0.2 is supported by VS2005.  You can find further details including build instructions in the README.txt that is included with the source.  You can also view the file directly at this link (http://bazaar.launchpad.net/~libfreespace-devteam/libfreespace.net/0.2/view/head:/README.txt)

Thanks,
-Merrill

info...@gmail.com

unread,
Jun 17, 2014, 6:20:02 AM6/17/14
to libfre...@googlegroups.com
Hi Dear Merrill
thank u very much .
MY Device is FSM-9. 
plz help me because i dont know  Visual C++ and need to use RREAD from this Device .
would  u plz  tell me step by step that what can i do  to run libfreespace v0.7?
i Run it but have several Errors. i am so confuse .plz help
BR
Infokade

Merrill

unread,
Jun 18, 2014, 5:50:50 PM6/18/14
to libfre...@googlegroups.com
Hello Infokade,

Can you describe what errors you are seeing?

The libfreespace-examples are very good resources to see how to basic tasks with libfreespace including reading motion data, configuring the module, etc.  I would recommend starting there.  You can download the source and pre-built binaries of the examples from our download page on the libfreespace home page.

Thanks,
-Merrill

info...@gmail.com

unread,
Jun 19, 2014, 11:00:53 AM6/19/14
to libfre...@googlegroups.com
HI
thnk u very much .
this is one of the errors :

Run-Time Check Failure #2 - Stack around the variable 'pp.51040' was corrupted.
 BR
Infokade

On Saturday, November 7, 2009 12:19:33 AM UTC+3:30, Neel Goyal wrote:

Merrill

unread,
Jun 19, 2014, 4:47:08 PM6/19/14
to libfre...@googlegroups.com
Hi Infokade,

Please provide more details about the specific software that you are using to generate that error.

The FSM-9 supports the libfreespace-examples out of the box.  The README provides step by step instructions for the build process, so please follow that closely.  Also pay attention to the Required Tools section for libfreespace and libfreespace-examples as the build will not work without the required tools.

Thanks,
-Merrill

info...@gmail.com

unread,
Jun 20, 2014, 8:03:17 AM6/20/14
to libfre...@googlegroups.com
Hi Merril
thank u very much for ur answer.
there are some thing  that i tell u :
the first one and important one is that i can test my FSM-9 with libfreespace-examples ( i mean only testint with EXE files) but i cant RUN the Source files,
and the second one is : i used Visual Studio 2010 for running the files.

would u plz tell me  the steps that i must do to run libfreespace with visual studio 2010?
BR
Infokade

Merrill

unread,
Jun 20, 2014, 9:58:32 AM6/20/14
to libfre...@googlegroups.com
Hello Infokade,

Please see the README files in the libfreespace and libfreespace-example source packages.  They provide step by step instructions for building libfreespace and the examples in Visual Studio 2010.  Thanks.

-Merrill

info...@gmail.com

unread,
Jul 27, 2014, 4:48:01 PM7/27/14
to libfre...@googlegroups.com
Hi Merrill
i used libfreespace-examples with VS 2010 to communicate with Fsm9 . the Project
is attached and have several errors that commented in
LFS_Fiemware07_01.cpp. would u plz help me to solve them?
LFS_Fiemware07_01.cpp :
/ LFS_fiemware07_01.cpp : Defines the entry point for the console application.
//

//#include "stdafx.h"
/**
 * This file is part of libfreespace-examples.
 *
 * Copyright (c) 2009-2013, Hillcrest Laboratories, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in
 *       the documentation and/or other materials provided with the
 *       distribution.
 *     * Neither the name of the Hillcrest Laboratories, Inc. nor the names
 *       of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written
 *       permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
//#ifdef WIN32
//#include "stdafx.h"
//#include <windows.h>
//#else
//#include <stdlib.h>
//#include <unistd.h>
//#endif
#include "stdafx.h"
#include <windows.h>

#include <stdio.h>
#include <freespace/freespace.h>
#include <freespace/freespace_printers.h>
#include "freespace/appControlHandler.h"

#include <string.h>

#define BUFFER_LENGTH 1024

// Cross platform sleep macro
#ifdef _WIN32
#define SLEEP    Sleep(100)
#else
#define SLEEP    sleep(1)
#endif

/**
 * Callback that handles product ID response messages received from devices
 * @param id the device the message is from
 * @param message a pointer to the message to send
 * @param cookie not used in this example
 * @param result FREESPACE_SUCCESS if a packet was received; else error code
 */
static void receiveMessageCallback(FreespaceDeviceId id,
                                   struct freespace_message* message,
                                   void* cookie,
                                   int result) {
                                       
    struct freespace_ProductIDResponse* pr = &(message->productIDResponse);
    
    if (result == FREESPACE_SUCCESS && message != NULL) {
        if (message->messageType == FREESPACE_MESSAGE_PRODUCTIDRESPONSE) {
            printf("Received product ID response message from device ID: %d\n", id);
            if (pr->deviceClass == 1) {
                printf("    Device class:   dongle\n");
            } else if (pr->deviceClass == 2) {
                printf("    Device class:   handheld\n");
            } else {
                printf("    Device class:   unknown\n");
            }
            printf("    Part Number:    %d\n", pr->swPartNumber);
            printf("    Build Number:   %d\n", pr->swBuildNumber);
            printf("    Serial Number:  %d\n", pr->serialNumber);
            printf("    Version Number: %d.%d.%d\n", pr->swVersionMajor, pr->swVersionMinor , pr->swVersionPatch);
        }
    } else if (result == FREESPACE_ERROR_NO_DATA) {
        printf("Message with no data received from device ID %d.\n", id);
    } else {
        printf("Problem with message received from device ID %d.\n", id);
    }
}


/**
 * Callback that 
 *  - displays the devices that have been inserted into and removed from the system.
 *  - requests the firmware version of any devices that have been inserted into the system.
 * Implements freespace_hotplugCallback
 * @param event The type of event.
 * @param id The affected device.
 * @param cookie Not used for this application.
 */
void hotplugCallback(enum freespace_hotplugEvent event,
                     FreespaceDeviceId id,
                     void* cookie) {
    int rc=0;
    struct freespace_message message;

    switch (event) {

        case FREESPACE_HOTPLUG_INSERTION:
            // Get and print USB HID information about the device.
            printf("Device Inserted: %d\n", id);
            // --------------> error #1
//rc = printDeviceInfo(id);
            if (rc != FREESPACE_SUCCESS) {
                printf("Could not display device info: %d\n", rc);
                return;
            }

            // Open the device to be able to communicate with it
            // --------------> error #2
//rc = freespace_openDevice(id);
            if (rc != FREESPACE_SUCCESS) {
                printf("Error opening device.\n");
                return;
            }

            // Set the handler that handles messages received from the device.
            // --------------> error #3
//freespace_setReceiveMessageCallback(id, receiveMessageCallback, NULL);

            // Create and send a product ID request message to the device
            memset(&message, 0, sizeof(message)); // Start with a clean message struct
            message.messageType = FREESPACE_MESSAGE_PRODUCTIDREQUEST;
            // Allow message.dest to have the default value of 0. This will cause the message
            // to go to the remote or the module
            
       // --------------> error #4
//rc = freespace_sendMessageAsync(id, &message, 100, NULL, 0);
            if (rc != FREESPACE_SUCCESS) {
                printf("Error sending productID request\n");
                return;
            }
            // To communicate with a dongle set the dest field to 1
            message.dest = 1;
                    // --------------> error #5
//rc = freespace_sendMessageAsync(id, &message, 100, NULL, 0);
            if (rc != FREESPACE_SUCCESS) {
                printf("Error sending productID request\n");
                return;
            }

            break;

        case FREESPACE_HOTPLUG_REMOVAL:
            printf("Device Removed: %d\n", id);
            break;

        default:
            printf("Unrecognized freespace_hotplugEvent.\n");
            break;
    }
}

/**
 * main
 * This example uses the asynchronous API to
 *  - detect removal or additon of devices
 *  - get the product ID information from added devices
 * Devices may or may not be connected when this example is launched
 * Devices may be add/removed (pugged/unplugged) while this example is running.
 */

int _tmain(int argc, _TCHAR* argv[])
{
    int numIds;
    int deviceIds[FREESPACE_MAXIMUM_DEVICE_COUNT];
    int rc=0;
    
    // Flag to indicate that the application should quit
    // Set by the control signal handler
    int quit = 0;
            // --------------> error #6
//printVersionInfo(argv[0]);
// --------------> error #7
    //addControlHandler(&quit);

    // Initialize the freespace library
    // --------------> error #8
//rc = freespace_init();
    if (rc != FREESPACE_SUCCESS) {
        printf("Initialization error. rc=%d\n", rc);
        return 1;
    }

    // Set the callback to catch the initial devices.
    printf("Detecting the Freespace devices already connected...\n");
    // --------------> error #9
//freespace_setDeviceHotplugCallback(hotplugCallback, NULL);
       // --------------> error #10
//freespace_perform();

    printf("Waiting for Freespace devices to be inserted...\n");
    printf("Type Ctrl-C to exit\n");
    while (!quit) {
        // Easy event loop - just poll freespace_perform periodically
        // rather than waiting on select or WaitForMultipleObjects
        SLEEP;

        // Callbacks are called from within the perform call.

       // --------------> error #11
//freespace_perform();
    }

    printf("Exiting\n");
    printf("Cleaning up all devices...\n");
    // --------------> error #12
//rc = freespace_getDeviceList(deviceIds, FREESPACE_MAXIMUM_DEVICE_COUNT, &numIds);
    if (rc == FREESPACE_SUCCESS) {
        int i;
        for (i = 0; i < numIds; i++) {
            // --------------> error #13
//freespace_closeDevice(deviceIds[i]);
        }
    } else {
        printf("Error getting device list.\n");
    }

    // --------------> error #14
//freespace_exit();
return 0;
}

BR
Infokade

info...@gmail.com

unread,
Jul 28, 2014, 3:09:06 AM7/28/14
to libfre...@googlegroups.com
Hi Merril

i used libfreespace-examples with VS 2010 to communicate with Fsm9 . the Project
is attached and have several errors that commented in
LFS_Fiemware07_01.cpp. would u plz help me to solve them?
LFS_Fiemware07_01.cpp :
// LFS_fiemware07_01.cpp : Defines the entry point for the console application.
BR
Infokade
Reply all
Reply to author
Forward
0 new messages