Is there a simple example (desktop programming C++) for Bluetooth Low Energy devices?

Hello
i am trying to code a simple desktop application (C++ in console) to connect to a custom Bluetooth low energy service. But before i go to that, i need to code a simple application to even get the GATT properties of a BLE device.
Is there any code sample that i can use? I am having a hard time going through the examples that are given with the GATT**** functions. 
And the code samples in WDK seem to be of drivers and for metro apps. None for a desktop application.
thanks a ton!

So i was able to code a program for reading (read) variables and setting notifications for (notifiable) variables from an HR BLE monitor.
Pasting it here so that it may help someone looking for an example. (may have minor bugs, but seems to work with an MIO ALPHA HR monitor). Project properties may have to be set to stdcall (Project properties->c/c++->advanced->calling convention)
//How to get notification values from a HR BLE monitor
//Ensure that you have paired the HR BLE monitor with the computer
#include <stdio.h>
#include <windows.h>
#include <setupapi.h>
#include <devguid.h>
#include <regstr.h>
#include <bthdef.h>
#include <Bluetoothleapis.h>
#pragma comment(lib, "SetupAPI")
#pragma comment(lib, "BluetoothApis.lib")
#define TO_SEARCH_DEVICE_UUID "{0000180D-0000-1000-8000-00805F9B34FB}" //we use UUID for an HR BLE device
//this is the notification function
//the way ValueChangedEventParameters is utilized is shown in
//HealthHeartRateService::HeartRateMeasurementEvent()
//a function in Windows Driver Kit (WDK) 8.0 Samples.zip\C++\WDK 8.0 Samples\Bluetooth Low Energy (LE) Generic Attribute (GATT) Profile Drivers\Solution\WpdHealthHeartRate\HealthHeartRateService.cpp
void SomethingHappened( BTH_LE_GATT_EVENT_TYPE EventType, PVOID EventOutParameter, PVOID Context)
printf("notification obtained ");
PBLUETOOTH_GATT_VALUE_CHANGED_EVENT ValueChangedEventParameters = (PBLUETOOTH_GATT_VALUE_CHANGED_EVENT)EventOutParameter;
HRESULT hr;
if (0 == ValueChangedEventParameters->CharacteristicValue->DataSize) {
hr = E_FAIL;
printf("datasize 0\n");
} else {
printf("HR ");
//for(int i=0; i<ValueChangedEventParameters->CharacteristicValue->DataSize;i++) {
// printf("%0x",ValueChangedEventParameters->CharacteristicValue->Data[i]);
// if the first bit is set, then the value is the next 2 bytes. If it is clear, the value is in the next byte
//The Heart Rate Value Format bit (bit 0 of the Flags field) indicates if the data format of
//the Heart Rate Measurement Value field is in a format of UINT8 or UINT16.
//When the Heart Rate Value format is sent in a UINT8 format, the Heart Rate Value
//Format bit shall be set to 0. When the Heart Rate Value format is sent in a UINT16
//format, the Heart Rate Value Format bit shall be set to 1
//from this PDF https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239866
unsigned heart_rate;
if (0x01 == (ValueChangedEventParameters->CharacteristicValue->Data[0] & 0x01)) {
heart_rate = ValueChangedEventParameters->CharacteristicValue->Data[1]*256 + ValueChangedEventParameters->CharacteristicValue->Data[2];
} else {
heart_rate = ValueChangedEventParameters->CharacteristicValue->Data[1];
printf("%d\n", heart_rate);
//this function works to get a handle for a BLE device based on its GUID
//copied from http://social.msdn.microsoft.com/Forums/windowshardware/en-US/e5e1058d-5a64-4e60-b8e2-0ce327c13058/erroraccessdenied-error-when-trying-to-receive-data-from-bluetooth-low-energy-devices?forum=wdk
//credits to Andrey_sh
HANDLE GetBLEHandle(__in GUID AGuid)
HDEVINFO hDI;
SP_DEVICE_INTERFACE_DATA did;
SP_DEVINFO_DATA dd;
GUID BluetoothInterfaceGUID = AGuid;
HANDLE hComm = NULL;
hDI = SetupDiGetClassDevs(&BluetoothInterfaceGUID, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
if( hDI == INVALID_HANDLE_VALUE ) return NULL;
did.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
dd.cbSize = sizeof(SP_DEVINFO_DATA);
for(DWORD i = 0; SetupDiEnumDeviceInterfaces(hDI, NULL, &BluetoothInterfaceGUID, i, &did); i++)
SP_DEVICE_INTERFACE_DETAIL_DATA DeviceInterfaceDetailData;
DeviceInterfaceDetailData.cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
DWORD size = 0;
if(!SetupDiGetDeviceInterfaceDetail(hDI, &did, NULL, 0, &size, 0) )
int err = GetLastError();
if( err == ERROR_NO_MORE_ITEMS ) break;
PSP_DEVICE_INTERFACE_DETAIL_DATA pInterfaceDetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)GlobalAlloc(GPTR , size);
pInterfaceDetailData->cbSize = sizeof (SP_DEVICE_INTERFACE_DETAIL_DATA);
if( !SetupDiGetDeviceInterfaceDetail(hDI, &did, pInterfaceDetailData, size, &size, &dd) )
break;
hComm = CreateFile(
pInterfaceDetailData->DevicePath,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
GlobalFree(pInterfaceDetailData);
SetupDiDestroyDeviceInfoList(hDI);
return hComm;
int main( int argc, char *argv[ ], char *envp[ ] )
//Step 1: find the BLE device handle from its GUID
GUID AGuid;
//GUID can be constructed from "{xxx....}" string using CLSID
CLSIDFromString(TEXT(TO_SEARCH_DEVICE_UUID), &AGuid);
//now get the handle
HANDLE hLEDevice = GetBLEHandle(AGuid);
//Step 2: Get a list of services that the device advertises
// first send 0,NULL as the parameters to BluetoothGATTServices inorder to get the number of
// services in serviceBufferCount
USHORT serviceBufferCount;
// Determine Services Buffer Size
HRESULT hr = BluetoothGATTGetServices(
hLEDevice,
0,
NULL,
&serviceBufferCount,
BLUETOOTH_GATT_FLAG_NONE);
if (HRESULT_FROM_WIN32(ERROR_MORE_DATA) != hr) {
printf("BluetoothGATTGetServices - Buffer Size %d", hr);
PBTH_LE_GATT_SERVICE pServiceBuffer = (PBTH_LE_GATT_SERVICE)
malloc(sizeof(BTH_LE_GATT_SERVICE) * serviceBufferCount);
if (NULL == pServiceBuffer) {
printf("pServiceBuffer out of memory\r\n");
} else {
RtlZeroMemory(pServiceBuffer,
sizeof(BTH_LE_GATT_SERVICE) * serviceBufferCount);
// Retrieve Services
USHORT numServices;
hr = BluetoothGATTGetServices(
hLEDevice,
serviceBufferCount,
pServiceBuffer,
&numServices,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetServices - Buffer Size %d", hr);
//Step 3: now get the list of charactersitics. note how the pServiceBuffer is required from step 2
// Determine Characteristic Buffer Size
USHORT charBufferSize;
hr = BluetoothGATTGetCharacteristics(
hLEDevice,
pServiceBuffer,
0,
NULL,
&charBufferSize,
BLUETOOTH_GATT_FLAG_NONE);
if (HRESULT_FROM_WIN32(ERROR_MORE_DATA) != hr) {
printf("BluetoothGATTGetCharacteristics - Buffer Size %d", hr);
PBTH_LE_GATT_CHARACTERISTIC pCharBuffer;
if (charBufferSize > 0) {
pCharBuffer = (PBTH_LE_GATT_CHARACTERISTIC)
malloc(charBufferSize * sizeof(BTH_LE_GATT_CHARACTERISTIC));
if (NULL == pCharBuffer) {
printf("pCharBuffer out of memory\r\n");
} else {
RtlZeroMemory(pCharBuffer,
charBufferSize * sizeof(BTH_LE_GATT_CHARACTERISTIC));
// Retrieve Characteristics
USHORT numChars;
hr = BluetoothGATTGetCharacteristics(
hLEDevice,
pServiceBuffer,
charBufferSize,
pCharBuffer,
&numChars,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetCharacteristics - Actual Data %d", hr);
if (numChars != charBufferSize) {
printf("buffer size and buffer size actual size mismatch\r\n");
//Step 4: now get the list of descriptors. note how the pCharBuffer is required from step 3
//descriptors are required as we descriptors that are notification based will have to be written
//once IsSubcribeToNotification set to true, we set the appropriate callback function
//need for setting descriptors for notification according to
//http://social.msdn.microsoft.com/Forums/en-US/11d3a7ce-182b-4190-bf9d-64fefc3328d9/windows-bluetooth-le-apis-event-callbacks?forum=wdk
PBTH_LE_GATT_CHARACTERISTIC currGattChar;
for (int ii=0; ii <charBufferSize; ii++) {
currGattChar = &pCharBuffer[ii];
USHORT charValueDataSize;
PBTH_LE_GATT_CHARACTERISTIC_VALUE pCharValueBuffer;
// Determine Descriptor Buffer Size
USHORT descriptorBufferSize;
hr = BluetoothGATTGetDescriptors(
hLEDevice,
currGattChar,
0,
NULL,
&descriptorBufferSize,
BLUETOOTH_GATT_FLAG_NONE);
if (HRESULT_FROM_WIN32(ERROR_MORE_DATA) != hr) {
printf("BluetoothGATTGetDescriptors - Buffer Size %d", hr);
PBTH_LE_GATT_DESCRIPTOR pDescriptorBuffer;
if (descriptorBufferSize > 0) {
pDescriptorBuffer = (PBTH_LE_GATT_DESCRIPTOR)
malloc(descriptorBufferSize
* sizeof(BTH_LE_GATT_DESCRIPTOR));
if (NULL == pDescriptorBuffer) {
printf("pDescriptorBuffer out of memory\r\n");
} else {
RtlZeroMemory(pDescriptorBuffer, descriptorBufferSize);
// Retrieve Descriptors
USHORT numDescriptors;
hr = BluetoothGATTGetDescriptors(
hLEDevice,
currGattChar,
descriptorBufferSize,
pDescriptorBuffer,
&numDescriptors,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetDescriptors - Actual Data %d", hr);
if (numDescriptors != descriptorBufferSize) {
printf("buffer size and buffer size actual size mismatch\r\n");
for(int kk=0; kk<numDescriptors; kk++) {
PBTH_LE_GATT_DESCRIPTOR currGattDescriptor = &pDescriptorBuffer[kk];
// Determine Descriptor Value Buffer Size
USHORT descValueDataSize;
hr = BluetoothGATTGetDescriptorValue(
hLEDevice,
currGattDescriptor,
0,
NULL,
&descValueDataSize,
BLUETOOTH_GATT_FLAG_NONE);
if (HRESULT_FROM_WIN32(ERROR_MORE_DATA) != hr) {
printf("BluetoothGATTGetDescriptorValue - Buffer Size %d", hr);
PBTH_LE_GATT_DESCRIPTOR_VALUE pDescValueBuffer = (PBTH_LE_GATT_DESCRIPTOR_VALUE)malloc(descValueDataSize);
if (NULL == pDescValueBuffer) {
printf("pDescValueBuffer out of memory\r\n");
} else {
RtlZeroMemory(pDescValueBuffer, descValueDataSize);
// Retrieve the Descriptor Value
hr = BluetoothGATTGetDescriptorValue(
hLEDevice,
currGattDescriptor,
(ULONG)descValueDataSize,
pDescValueBuffer,
NULL,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetDescriptorValue - Actual Data %d", hr);
//you may also get a descriptor that is read (and not notify) andi am guessing the attribute handle is out of limits
// we set all descriptors that are notifiable to notify us via IsSubstcibeToNotification
if(currGattDescriptor->AttributeHandle < 255) {
BTH_LE_GATT_DESCRIPTOR_VALUE newValue;
RtlZeroMemory(&newValue, sizeof(newValue));
newValue.DescriptorType = ClientCharacteristicConfiguration;
newValue.ClientCharacteristicConfiguration.IsSubscribeToNotification = TRUE;
hr = BluetoothGATTSetDescriptorValue(
hLEDevice,
currGattDescriptor,
&newValue,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetDescriptorValue - Actual Data %d", hr);
} else {
printf("setting notification for serivice handle %d\n", currGattDescriptor->ServiceHandle);
//set the appropriate callback function when the descriptor change value
BLUETOOTH_GATT_EVENT_HANDLE EventHandle;
if (currGattChar->IsNotifiable) {
printf("Setting Notification for ServiceHandle %d\n",currGattChar->ServiceHandle);
BTH_LE_GATT_EVENT_TYPE EventType = CharacteristicValueChangedEvent;
BLUETOOTH_GATT_VALUE_CHANGED_EVENT_REGISTRATION EventParameterIn;
EventParameterIn.Characteristics[0] = *currGattChar;
EventParameterIn.NumCharacteristics = 1;
hr = BluetoothGATTRegisterEvent(
hLEDevice,
EventType,
&EventParameterIn,
SomethingHappened,
NULL,
&EventHandle,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTRegisterEvent - Actual Data %d", hr);
if (currGattChar->IsReadable) {//currGattChar->IsReadable
// Determine Characteristic Value Buffer Size
hr = BluetoothGATTGetCharacteristicValue(
hLEDevice,
currGattChar,
0,
NULL,
&charValueDataSize,
BLUETOOTH_GATT_FLAG_NONE);
if (HRESULT_FROM_WIN32(ERROR_MORE_DATA) != hr) {
printf("BluetoothGATTGetCharacteristicValue - Buffer Size %d", hr);
pCharValueBuffer = (PBTH_LE_GATT_CHARACTERISTIC_VALUE)malloc(charValueDataSize);
if (NULL == pCharValueBuffer) {
printf("pCharValueBuffer out of memory\r\n");
} else {
RtlZeroMemory(pCharValueBuffer, charValueDataSize);
// Retrieve the Characteristic Value
hr = BluetoothGATTGetCharacteristicValue(
hLEDevice,
currGattChar,
(ULONG)charValueDataSize,
pCharValueBuffer,
NULL,
BLUETOOTH_GATT_FLAG_NONE);
if (S_OK != hr) {
printf("BluetoothGATTGetCharacteristicValue - Actual Data %d", hr);
//print the characeteristic Value
//for an HR monitor this might be the body sensor location
printf("\n Printing a read (not notifiable) characterstic (maybe) body sensor value");
for(int iii=0; iii< pCharValueBuffer->DataSize; iii++) {// ideally check ->DataSize before printing
printf("%d",pCharValueBuffer->Data[iii]);
printf("\n");
// Free before going to next iteration, or memory leak.
free(pCharValueBuffer);
pCharValueBuffer = NULL;
//go into an inf loop that sleeps. you will ideally see notifications from the HR device
while(1){
Sleep(1000);
//printf("look for notification");
CloseHandle(hLEDevice);
if ( GetLastError()!=NO_ERROR &&
GetLastError()!=ERROR_NO_MORE_ITEMS )
// Insert error handling here.
return 1;
return 0;
I can't run this code. I use VS2010 and Windows 8.1. When I debug my project , it show error "cannot open file 'BluetoothAPis.h'" Can you help me?

Similar Messages

  • At the very end of creating an email account the program asks for a software security device password, I have no idea what this is or where to find it.

    At the very end of creating an email account the program asks for a software security device password, I have no idea what this is or where to find it. To my knowledge I don't have a "software security device". I am using Windows 7 on an IMac.

    What is the exact prompt or error message you get?

  • Are there any free remote desktop programs

    Are there any free remote desktop or remote assistance programs available for Panther? I only need a server for the Panther computer, as I would be helping that user, but he would not need to help me. I was wondering if anyone knew of any. I wanted to try LogMeIn, but it requires Tiger. I couldn't find anything at Wikipedia's comparison of remote desktop applications. Thanks

    Look for the following at VersionTracker or MacUpdate.
    AstroAppMacX 2.11
    Share My Desktop 1.2
    Vine Server 3.0

  • Is there a simple example, I can see how to connect to a db using Flash 8 and actionscript? (not with components)

    I have been looking all over for a simple "hello world"
    example, on how to connect to a database, and pass a param, and
    return a dataset. I would like one that does not use components.
    (Actionscript only). That uses ColdFusion 7.x and Flash 8. Can
    anyone point me to one?

    Thanks Craig, I saw that example, but it was meant for Flash
    MX, and according to the Flash 8 documentation, the NetServices is
    now deprecated. Anyway, I posted my question on another site and
    some supplied me with a simple example. Here is the url if anyone
    is interested...
    sample

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Bluetooth Low Energy examples/support

    Hi,
    I'm wondering has anybody been playing around with BLE in LabVIEW and/or are there any examples out there? I don't want to emulate a serial port profile. I have a connectblue OLP425 (which uses the TI CC2540). Even just connecting to the device would be a good start! 
    Does NI have any intention of providing supporting VIs for BLE? Maybe some of the common profiles, for example? 
    Thanks,
    Niamh

    Hi Niamh,
    Since your module is the one which is doing all of the comms there is no need to directly support BLE if all you want to do is communicated to the device. Looking at the datasheet of your module it appears it communicate through different ways, such as GPIO, SPI, I2C or even UART (serial) interface. So it appears that you could use a number of communication protocols and interfaces depending on what hardware you have on hand and etc. For instance, you can use an inexpensive usb DAQ device to do some of these (such as the NI USB 6008) and there are numerous examples for implementing these protocols in LabVIEW online.
    Once you connect to the hardware reading the spec. sheet and deciding on how to approach the comms would be the most straightforward way to go.
    Saying that, there is no specific example application built for this device as far as I'm aware of and we cannot provide support for 3rd party devices directly as well unfortunately.
    Mark N
    Applications Engineer
    National Instruments UK & Ireland

  • Are there any simple LabVIEW motion program for Newport MM4006 controller

    My system consists of a PC with a IEEE488.2 from NI that connects to 2 Newport MM4006 controllers, which, in turn control a high-precision stage.
    I would like to know if you can provide me with any simple motion programs in LabVIEW. Since I am starting to learn motion programming, I would like to know if there are any existing LabVIEW VIs that allow easy inputting of the motion commands.
    I am having some trouble in ordering each motion segment's commands in LabVIEW environment, so I guess some examples might help me to clarify the correct syntax and logic in LabVIEW. Right now, I am using mostly the SendCommand sub VI in the MM4006 package downloaded from National Instruments to issue the seque
    nce of the commands that are supposed to be executed one after the other in order to perform a specific path. Do you know if there exists any other bette way of issuing a long sequence of the motion
    commands?
    Alos, can FlexMotion be used for my system? What are the requirement for usign FlexMotion in LabVIEW. Is it the best way to program a motion VI for my system?

    The FlexMotion VIs can only be used with our FlexMotion controllers, not GPIB devices. For your Newport controllers, the best thing to use is the instrument driver that you downloaded off of our website. This code was contributed to our website so we don't have any example programs to go with it. I looked on Newport's website and they mentioned that they had sample code for this controller. You might want to contact them and see what they have.
    Jack Arnold
    Application Engineer
    National Instruments

  • Are there any professional tax preparation programs available for Mac?

    After seeing how much I love my Intel iMac, my dad really wants one. He does book keeping and tax preparation for his clients from home, so he would need some type of tax software that would work with a mac.
    Keep in mind, he would need professional level software, like Taxwise. Home tax programs like Turbo Tax or Quicken wouldn't work. He needs software for e-filing, form generation, refund loans, etc.
    Do you guys know of any?

    Take a look at this link, http://www.logitech.com/en-us/product/wireless-wave-combo-mk550?crid=27&affid=31 60356
    This link, http://www.amazon.com/Kinesis-KB500USB-BLK-Advantage-Contoured-Keyboard/dp/B000L VJ9W8/ref=sr_1_2?ie=UTF8&qid=1357225947&sr=8-2&keywords=kinesis+advantage+pro

  • Is there more simple interface library than OCI for C.

    I read OCI 8.0 documentation and I think that API like CLI XOpen standard but this standard is much complicated. So I am looking for a way to interacting with server in manner such as PostgreSQL interface library or MYSQL interface library or Sybase
    DB-Library. I don't want to bind variables; I do not want to start transactions. I just need 7 functions like this.
    Connect () - initialize and make connection to server.
    SendQuery () - send query to the server (I do not want to know the type of query DML or Select I just want to send query to server which query server to execute) (each query is in its own transaction so I do not need to commit or rollback.
    StoreResult () - retrieve result set if any or information about last executed query.
    GetValue (row, field) - just retrieve data for given field without any binding do you understand that binding do not allow to write code which is not care from executed query and returned result set.
    GetResultSet info () - to have a capability to ask for type of each field in a result set.
    FreeResultSet () - free data allocated for result set.
    CloseConnection () - when connection is not more needed.
    P.S to learn how to write documentation just see Description of PostgreSQL interface library of C, which is about 30 pages.
    I hope someone will answer my question or company where I work will discard Oracle as database server to resell to our clients.

    Try downloading libsqlora. It is a wrapper around OCI but hides all complicated parameter passing to OCI calls. Searching on google or altavista would give you link to download. It is either called libsqlora or libsqlora8. It is also very simple in documentation (just about 10-12 pages as far as I can remember).
    However, just because OCI is complicated, one would discard Oracle seems to be a bit hasty thinking. Oracle has much more than just OCI. And about 70% of oracle developers either do not use OCI or use it just for minimal functions. That is because Oracle has (especially after 8i), superb 4GL (PL/SQL) for all your development needs. And if you have Oracle APP server, you could do wonder enterprise wide applications in quickest possible time. Of course I am not working for Oracle nor am I in database marketing, but these feelings I also had when I was new to Oracle that oh is it so complicated. Hope this helps?

  • HT1414 How do I sync my device to a different device's library?  Do I have to restore to factory settings and start over? Or, is there a simpler process where i can just select the library/device that I want to sync with?

    Is there an easier way other than restoring to factory settings and starting over?

    Open itunes, connect ipod, select what you want, sync.
    No need to restore.  Just sync.  It will erase the current content and replace with the content of the new computer.

  • Is there a simpler solution/directory/file structure for banner ads?

    I also have to wonder what a pain this has to be for a large website with many rotating banner ads - having all of these same files copied over and over in separate subdirectories. Flash had 2 files - a html file and swf file stored in the same directory. Am I missing something?
    the banner name - with config.xml - created by Dreamweaver
    Assets -  4 or 5 files, not counting json or sound files
    edge_includes  - and its 2 files
    images - at least they are unique
    And I, maybe wrongly, create a html file in Dreamweaver with the oam file inserted in it. 
    Bob

    From the Edge Animate JavaScript 2.0 API Docs:
    CDN Hosting
    Using the Adobe Content Distribution Network (CDN) is a great way to speed up Animate composition delivery. Compositions using the Adobe CDN all share a single URL for jQuery and the Edge Runtime. The browser caches the runtime, so the user only downloads the library once no matter how may Animate compositions they view, even if compositions are on different sites and produced by different authors.
    Don't use the CDN if your composition needs to run without an Internet connection or if you want to use your own hosting exclusively.
    The Edge Runtime CDN uses the following URL:
    <script type="text/javascript" charset="utf-8"    src="http://download.adobe.com/pub/adobe/edge/animate/2.0.0/edge.2.0.0.min.js"></script>
    So now I know what that CDN option is about.
    Bob

  • I need help setting up my Apple wireless network so that there are no conflicts with IP addresses for any of my devices.

    I have 2 Airport Extreme Base Stations, 1 is a 5th generation 802.11n and 1 is a 2nd generation 802.11n.  I have 2 Extreme Express Base Stations which are 2nd generation 802.11a/n.  The idea is to create a network that works throughout my 2 story house and extend into the garage.  It's not a large house 1400 sq ft wood construction.  The internet feed comes into the Hughes Net modem upstairs.  This is where I want the main base station (5th generation). I eventually will connect a network drive and printer to it.  I then want to place the second base station in the room directly under the upstairs room where the main base station is and connect my desk top computer to it.  In the living room I will have one of the Express Base Stations connected to the Micro Cell and house stereo system.  In the garage (50' away from the living room Express Station & 75' from the Main Base Station) I will place the other Extreme Express Base Station to be connected to the garage stereo system.  All of this is with the idea to extend the range of my network for all my devices and airplay to my stereo systems. 
    Ok, so I have a lot of wireless devices. 2 2nd geneartion iPads, 2 iPhone 4s's, 3 Wi-Fi enabled Sony TVs, Apple TV (near the house stereo Extreme Express), AT&T Micro Cell connected to house stereo Extreme Express, Lorex Security DVR system (connected to main base station upstairs), Whole-House DTV Network system,1 Macintosh Quicksilver Desktop computer, 1 MacBook Pro, and 1 Mac AirBook.  As you can see I need a lot of DHCP IP addresses.
    So, how do I go about setting this all up?  I have read countless articles and discussions but I still have conflicts.  It usually mostly, but not limited to, effects my wife's AirBook.  Not good at all!  I used to have a WDS setup but I understand that the 802.11n Airport Extreme's do not support this.  And when I try to distribute a range of IP addresses I run into problems.  So can someone please help me resolve this headache?

    Configure the Extreme connected to the Hughes Net modem as your router. In other words in AirPort Utility, Network tab > Router Mode should be set to "DHCP and NAT". It will provide IP addresses to all the devices on your network.
    All other AirPort devices on your network should be configured as bridges: Router Mode "Off".
    You may want to configure static IP addresses for any equipment that is likely to be permanently installed. For them, there is no reason to have the Extreme issue an IP address, and they can keep the same one forever.
    The Microcell may be able to connect to the Express's LAN port such devices that have to handle voice or other real time audio or video streaming are generally best installed using a strictly wired connection. The same applies to the Sony TV and AppleTV. Keep them on a wired LAN served by the Extreme, avoiding any reliance on a wireless link if at all possible.
    The way to implement a complex network like yours is to add one device at a time. Ensure it connects reliably, then add another. You have a lot of work to do.
    WDS can be implemented even with new Extremes but its performance is likely to be so unacceptable that it would be nothing more than an exercise in frustration for you.

  • Is there a shareware file recoverey program available?

    Is there a shareware file recoverey program available for Macs?
    I have an external Hard Drive with only mp3 & mp4 on it (formatted Journal Extended). The "node structure" was damaged, what ever that is, when i was using iTunes.
    The program just needes to allow me to save my files to a need hard drive
    Thanks

    This is from the DiskWarrior site:
    Question
    Is DiskWarrior capable of repairing an "Invalid Node Structure" as reported by the Apple Disk Utility?
    Answer
    Yes, DiskWarrior can repair a "Invalid Node Structure" error.
    Directory nodes contain the directory entries for your files and folders. Damage to a node renders its entire contents unusable. It also makes the nodes that are linked to by the damaged node inaccessible. That's because the links to the nodes can no longer be followed. Disk Utility reports this type of damage as an "invalid node structure."
    A disk with an invalid node structure can exhibit several symptoms. Depending upon which node is affected, it could be that the disk will not appear on the desktop. Alternatively, it could be that just some of the files on the disk will be in inaccessible nodes. If the disk is your startup disk it's also possible that it will no longer start up because the necessary Mac OS files are in an inaccessible node.
    Fixing a damaged node is a tricky operation. Depending upon the brilliance of your disk repair utility you might be able to repair the damaged node and even recover the file and folder entries it contains. Of course if the damage is bad enough there will be nothing in the node left to recover but the right utility can still put the directory back into working order.

  • Are there some simple start up instructions for a first time user of Lion Server?

    Our small office has been using MobileMe to share one central calendar on a mac mini with 4 users MBPro users.  We were also using a 3rd party application (Address Book Server (ABS)) to share a central Address Book contact database with the same 4 users.  It was all working fine.  Then we upgraded all our systems to Lion and iCloud.  Calendar sharing works fine, but it broke our contact sharing.  ABS used the old sync capability.  Now all our contacts are on iCloud, and they won't sync anymore.
    Does anyone know if there is a way to share contacts among several users in iCloud?  (I haven't found one.)
    We are now considering Lion Server, but all we need it for is sharing contacts (shared calendars under iCloud works fine).
    Can we install Lion Server for just contacts and continue to use iCloud for calendar sharing?
    Is there some simple Start up documentation available for Lion Server that I can read before I jump into it?
    How much time is it really going to take to install and manage a server system?
    We are not IT professionals.  Just a small office of professionals, who want the conveninece of shared calendars and shared contacts.  We all have our own calendars and contacts as well, and we want to be able to see them on all our devices: MBPros, iPhones, iPads etc.
    Thanks so much for your help.

    You can use Lion Server in place of the MobileMe/iCloud account. That would be your best bet. Lion Server has built into it an address book server and a calendar server which would take the place of what you are currently using.
    Lion Server is designed to be quite easy to setup and run. It is pitched as being meant for people who "don't have an IT Department." Honestly, most of it is just on/off switches. If you have a Mac Mini and all of your users are on their MacBook Pros, you pretty much have the hardware necessary. Assuming all of your machines can run Lion, you should be good to go.
    The most technical you might have to get is to get a domain name from some place like godaddy.com. The Server App actually walks ou through the whole setup process step-by-step. Not to mention that there is a vibrant community of users to be help out. And once it is up and running, there is very little you should have to do to it.
    There are a lot of technical components to any server platform, and Apple is no exception, however they do a good job at hiding it. And at $49, you do not have much to lose. Plus, you only really need to use the components you want. If all you want in address book server and ical server, then just use those. You find you want to start sharing documents, turn on file sharing. It is up to you. Don't feel pressured to have to use every component.
    Apple has posted they "Advanced Administration Guide" which has a lot of good information in it, and it is searchable. Check it out: https://help.apple.com/advancedserveradmin/mac/10.7/

  • Simple MVC desktop example wanted

    Hi,
    I've been looking and can't find a good example of MVC in a desktop application. I don't mean MVC as it is used in component development (I've seen some examples relating to Swing and Buttonmodels, for instance), but more business-object level. I'm not a Java or Swing expert, but I have been programming for a while and and am pretty comfortable writing non-UI Java classes and simple Swing apps. But I want to know how to do this right.
    Here's the simplest example I can think of to explain my confusion:
    Suppose I have a class called Customer with fields FirstName and LastName. Suppose further I want to create a desktop GUI that allows the customer to edit that model in two separate windows in such a way that changes in one edit window are immediately reflected in the other, and I want clean separation of presentation and logic.
    The example doesn't have to be in Swing, but it shouldn't require a server.
    Thanks for any help you can give on this - and, if this isn't the right place to post this query, I'd appreciate a pointer to a more appropriate forum.

    There are many ways but here is a simple example of how I do it.
    ******************************* CustomerModel.java
    import java.beans.PropertyChangeSupport;
    import java.beans.PropertyChangeListener;
    public class CustomerModel
        /** Change Support Object */
        private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
        /** bound property names */
        public static final String FIRST_NAME_CHANGED = "firstname";
        public static final String LAST_NAME_CHANGED = "lastname";
        /** First Name Element */
        private String firstName;
        /** Last Name Element */
        private String lastName;
        /** Blank Constructor */
        public CustomerModel()
            super();
         * Sets the first name element.  If value changed a notification is
         * sent to all listeners of this property
         * @param newFirstName String
        public void setFirstName(String newFirstName)
            String oldFirstName = this.firstName;
            this.firstName = newFirstName;
            propertyChangeSupport.firePropertyChange(FIRST_NAME_CHANGED, oldFirstName, newFirstName);
         * @return String
        public String getFristName()
            return firstName;
         * Sets the last name element.  If value changed a notification is
         * sent to all listeners of this property
         * @param newFirstName String
        public void setLastName(String newLastName)
            String oldLastName = this.lastName;
            this.lastName = newLastName;
            propertyChangeSupport.firePropertyChange(LAST_NAME_CHANGED, oldLastName, newLastName);
         * @return String
        public String getLastName()
            return lastName;
        /** Passthrough method for property change listener */
        public void addPropertyChangeListener(String str, PropertyChangeListener pcl)
            propertyChangeSupport.addPropertyChangeListener(str, pcl);       
        /** Passthrough method for property change listener */
        public void removePropertyChangeListener(String str, PropertyChangeListener pcl)
            propertyChangeSupport.removePropertyChangeListener(str, pcl);
    }******************************* CustomerFrame.java
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    import java.beans.PropertyChangeListener;
    import java.beans.PropertyChangeEvent;
    public class CustomerFrame extends JFrame implements ActionListener, PropertyChangeListener
        /** Customer to view/control */
        private CustomerModel customer;
        private JLabel firstNameLabel = new JLabel("First Name: ");
        private JTextField firstNameEdit = new JTextField();
        private JLabel lastNameLabel = new JLabel("Last Name: ");
        private JTextField lastNameEdit = new JTextField();
        private JButton updateButton = new JButton("Update");
         * Constructor that takes a model
         * @param customer CustomerModel
        public CustomerFrame(CustomerModel customer)
           // setup this frame
           this.setName("Customer Editor");
           this.setTitle("Customer Editor");
           this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
           this.getContentPane().setLayout(new GridLayout(3, 2));
           this.getContentPane().add(firstNameLabel);
           this.getContentPane().add(firstNameEdit);
           this.getContentPane().add(lastNameLabel);
           this.getContentPane().add(lastNameEdit);
           this.getContentPane().add(updateButton);
           // reference the customer locally
           this.customer = customer;
           // register change listeners
           this.customer.addPropertyChangeListener(CustomerModel.FIRST_NAME_CHANGED, this);
           this.customer.addPropertyChangeListener(CustomerModel.LAST_NAME_CHANGED, this);
           // setup the initial value with values from the model
           firstNameEdit.setText(customer.getFristName());
           lastNameEdit.setText(customer.getLastName());
           // cause the update button to do something
           updateButton.addActionListener(this);
           // now display everything
           this.pack();
           this.setVisible(true);
         * Update the model when update button is clicked
         * @param e ActionEvent
        public void actionPerformed(ActionEvent e)
            customer.setFirstName(firstNameEdit.getText());
            customer.setLastName(lastNameEdit.getText());
            System.out.println("Update Clicked " + e);
         * Update the view when the model has changed
         * @param evt PropertyChangeEvent
        public void propertyChange(PropertyChangeEvent evt)
            if (evt.getPropertyName().equals(CustomerModel.FIRST_NAME_CHANGED))
                firstNameEdit.setText((String)evt.getNewValue());
            else if (evt.getPropertyName().equals(CustomerModel.LAST_NAME_CHANGED))
                lastNameEdit.setText((String)evt.getNewValue());
    }******************************* MainFrame.java
    import javax.swing.JFrame;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JButton;
    public class MainFrame extends JFrame implements ActionListener
        /** Single customer model to send to all spawned frames */
        private CustomerModel model = new CustomerModel();
        /** Button to click to spawn new frames */
        private JButton newEditorButton = new JButton("New Editor");
        /** Blank Constructor */
        public MainFrame() {
            super();
        /** Create and display the GUI */
        public void createAndDisplayGUI()
            this.setName("MVC Spawner");
            this.setTitle("MVC Spawner");
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.newEditorButton.addActionListener(this);
            this.getContentPane().add(newEditorButton);
            this.pack();
            this.setVisible(true);
        /** Do something when the button is clicked */
        public void actionPerformed(ActionEvent e)
            new CustomerFrame(model);
         * Creates the main frame to spawn customer edit frames from.
         * @param args String[] ignored
        public static void main(String[] args) {
            MainFrame mainframe = new MainFrame();
            mainframe.createAndDisplayGUI();
    }

Maybe you are looking for

  • Itunes, Multiple Macs, Iphones and Icloud account vs.NAS help!

    Hi all I have a problem with the way im using Nas and how i manage multiple Itunes across multiple machines and Iphones. Background. Network - I have a Synology 2Tb NAS storage solution which is connected via a Wifi, ethernet router & modem to the ot

  • Special Keys(Ctrl-opt-esc) in Screen Share no longer working after latest update

    I typically remote into a machine back home through icloud once or twice a week to help my wife kill a program that can get stuck.  I used to be able to send command+opt+esc to get to the remote computers force quit applications window.  But now when

  • IDOC Monitoring in PI

    Hi Experts, Please Help me, Using SAP to send an IDoc directly into Gentran system, then is it possible to monitoring the status of the IDoc through WE02/WE05. Using  XI/PI to the IDoc flow to/from SAP to/from PI and then to/from Gentran, Then also w

  • Can't import HDV unless I set it for Apple Intermediate Codec

    I cannot import my HDV video for the life of me. I see it on the screen, I hit capture "clip," and it appears to be capturing fine, but when I'm done, the clips in the browser show the red line crossing through them and say "offline" when I try to pl

  • How do I trim lines?

    I am new to illustrator. Please explain in detail how to trim the dash lines so they don't go past the "edge" of the thermometor on the right.  When I try to clip or use any tools basically it deletes the entire line or distorts it.  See picture.