Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,540 Views

Connect to Edison was cancelled while launching project in Eclipse IDE

Hello,

whenever I tried to run the code in the eclipse IDE, I am facing following intermittent errors. I have tried following options:

1. Flashing the Edison mini breakout board with latest image

2. Running integrated installer.

3. Ensured Edison board is connected over wifi.

4. Synchronizing libraries when asked to do.

I have shared the code below which I am currently using. Please let me if am missing anything. Your inputs will be highly valued.

CODE:

# include

# include

# include

# include

# include

# include

# include

# include

# include

void connectusingRF(int *sock,char *addr);

int main(int argc, char **argv)

{

inquiry_info *ii = NULL;

struct hci_conn_info_req *cr;

bdaddr_t bdaddr;

int8_t rssi;

int max_rsp, num_rsp;

int dev_id, sock, len, flags;

int i;

char addr[19] = { 0 };

char name[248] = { 0 };

//hema declaration

//char command[50];

char command1[50];

//strcpy(command, "btmon &" );

// system(command);*/

strcpy(command1, "hcitool lescan" );

system(command1);

// end of dec

dev_id = hci_get_route(NULL);

printf("device Id %x \n", dev_id);

sock = hci_open_dev( dev_id );

if (dev_id < 0 || sock < 0) {

perror("opening socket");

exit(1);

}

len = 8;

max_rsp = 255;

flags = IREQ_CACHE_FLUSH;

ii = (inquiry_info*)malloc(max_rsp * sizeof(inquiry_info));

cr = malloc(sizeof(*cr) + sizeof(struct hci_conn_info));

num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);

if( num_rsp < 0...

3 Replies
Highlighted
Employee
17 Views

Hi HC,

Could you please tell us which release of OS X you are using? Have you tried using the example from the Intel documentation, https://software.intel.com/en-us/blinking-an-led-with-eclipse-ide-on-the-intel-edison-board https://software.intel.com/en-us/blinking-an-led-with-eclipse-ide-on-the-intel-edison-board? We would like to know if you're only having issues with your current program or with every program that you try to upload.

Also, did you make sure to add a password to your Edison board? As you can read in the https://software.intel.com/en-us/eclipse-for-iot-troubleshooting-and-faq FAQ and troubleshooting document for Eclipse, when using a WiFi connection you must have a password set on your board.

Regards,

Pablo

0 Kudos
Highlighted
Employee
17 Views

Hi HC,

Do you have updates on this case? Were you able to try any other program to compare your results?

Regards,

Pablo

0 Kudos
Highlighted
Novice
17 Views

Hi Pablo,

The problem was with the my code. This usually happens if you leave your program running on the device and try to upload it again, because the application binary is already in use. One more interesting observation, whenever the "Team Viewer" is ON, I could not run/ debug program. Program is working now.

Thanks for your help.

 

Regards,

Hema

0 Kudos