06 Mar 2014, 13:39
Generic-user-small

Howard Apple (1 post)

Daniel

I’m having problems getting the WiFiDirect cursors example to work . I am using 2.0.3 and V9 with 2 Nexus 7’s.

My goal is to eventually modify it to two way real time data exchange.

It compiles and runs but never gets to the point of the two cursors working. Operation of the keys is erratic especially the c key. Multiple c key presses and mouse presses are required to get the list to display.

I have read that the Nexus 7 has some soft keyboard problems. I’ve tried a bluetooth keyboard instead and this seems to solve some of the erratic behavior. However, I still cannot get it to work and am limited to one bluetooth keyboard right now.

On page 188 under Run the App, it says and I paraphrase

Run the app on each device Press d on the keyboard
Does this mean for both devices or just one ? If one, which one ?

Press c on the keyboard Again, which Nexus 7 The list border comes up but is blank for me. If I give it a mouse press, it displays the device Additional mouse presses on the device name seem to make it enter or just go away.

The text reads “You need to allow the direct connection request.” I never get this or did it happen once two weeks ago.

As additional background

1) I have been able to get the google android WiFiDirect demo to work using Eclipse. I’ve considered modifying it to send realtime data one way rather than png’s but get lost in the file details.

2) I found a modified example of your program on github called WiFiDirect RemoteCursors.pde referring to event framework. However, it throws a compile error (cannot find symbol) on the the first if statement below which I don’t know how to fix

//use event framework temporarily public void keyEvent(processing.event.KeyEvent ke) { key = ke.getKey(); keyCode = ke.getKeyCode();

if (ke.getAction() == processing.event.KeyEvent.PRESSED) //processing.event.KeyEvent.RELEASED { if (key == ‘c’)

3) I am able get the standard Wifi network method to work with a dedicated router without internet to work well. Perhaps, I should just give up on WiFiDirect.

So, should I just let it go ? Advice, please Thanks for the learning experience

howie

  You must be logged in to comment