Need assistance with Nexus 7

319 views
Skip to first unread message

2013 gradstudent

unread,
Apr 24, 2013, 9:03:37 AM4/24/13
to spa...@googlegroups.com
I am trying to setup MANET Manager on (starting with two) Nexus 7 devices.  The devices are rooted and loaded with custom rom for Nexus 7, configured with different IPs.  The application itself shows Ad-hoc mode is running, I can see the network using other devices, however they don't seem to see each other and communicate with each other.  I am attaching some screenshots.  Would really appreciate you input in this.
 
Thanks
 
Nexus 7 device 1 MANET Manager routing info.png
Nexus 7 device 2 MANET Manager routing info.png
Nexus 7 device 1 iwconfig output.png
Nexus 7 device 2 iwconfig output.png
Nexus 7 shows MANET Manger working.png

magnusw...@gmail.com

unread,
Apr 24, 2013, 9:10:21 AM4/24/13
to spa...@googlegroups.com
Hi
Sometimes I have the same problem, usually it helps to simply restart the devices. Also make sure they don't have the same User Identifier.
Hope this helps!
/Magnus

Jeffrey Robble

unread,
Apr 24, 2013, 12:28:08 PM4/24/13
to spa...@googlegroups.com
Hi,

Thanks for the screenshots. They help a lot. I'm fairly certain that the issue is related to the different "Cell" ids that show up for your two devices when you run iwconfig. I believe that for the most part all devices on the mesh must have the same cell id, or be configured to ignore the cell id.

When I run iwconfig on my Galaxy S III devices in a mesh I get "Cell: Not-Associated", which I assume means that the cell id is not used to filter out packets received over the mesh from peers. I believe that the cell id is the BSSID. Some folks have mentioned that they'd like us to implement a setting in SPAN to set the BSSID. We're still working on it.

Refer to the man page on iwconfig:

Set set the cell id to something specific you should be able to run:
/data/data/org.span/bin/iwconfig wlan0 ap 00:60:1D:01:23:45

At the moment, when I run that command on my devices it spits out:
"SET failed on device wlan0 ; Operation not supported on transport endpoint."

Which most likely means it's not supported by the wifi driver. It may require a driver modification.

I'll continue looking into this.

- stoker


--
You received this message because you are subscribed to the Google Groups "Smart Phone Ad-Hoc Networks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spandev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



stoker

unread,
Apr 24, 2013, 2:50:36 PM4/24/13
to spa...@googlegroups.com
A closer look at the wext implementation in the kernel shows that the iwconfig ap setting configures the network BSSID.

Your problem is known as "cell splitting".


After some testing I determined that:

- The "iwconfig wlan0 ap" command works if I run it as part of the adhoc.edify script when the wireless interface is first configured and brought up.

- Setting the cell id to the same value on both devices did not work. They were not able to communicate.

- Setting the cell id to "any" resulted in "Cell: Not-Associated", which did work. The devices were able to communicate.

- Setting the cell id to "off" resulted in the same behavior as setting the cell id to "any".


Refer to the following file:

Refer to the code snippet below. Add the "ap any" line to your adhoc_edify file. Let me know how it turns out for you.

     # ASUS Nexus 7
    getcfg("device.type") == "nexus7" && (
     
      # Load driver via load_wifi(), later unload driver via rmmod("dhd")
      log(load_wifi(), "Loading WiFi driver");

      log(run_program("/data/data/org.span/bin/ifconfig " + getcfg("wifi.interface") + " " + getcfg("ip.address") + " netmask " + getcfg("ip.netmask")) &&
                  run_program("/data/data/org.span/bin/ifconfig " + getcfg("wifi.interface") + " up"),  "Activating WiFi interface");
                  
      log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " mode ad-hoc"), "Setting ad-hoc mode");
      
      log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " essid " + getcfg("wifi.essid")), "Setting essid");

      log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " ap any"), "Setting cell id");
      
      log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " channel " + getcfg("wifi.channel")), "Setting channel");
      
      log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " power all"), "Setting power management");
      
      getcfg("wifi.txpower") != "auto" && (
            log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " txpower " + getcfg("wifi.txpower")), "Setting transmit power");        
      );
    );
      

- stoker

2013 gradstudent

unread,
Apr 24, 2013, 4:39:27 PM4/24/13
to spa...@googlegroups.com
Thank you very much for your quick response.  I will try out tonight and let you know.


--

2013 gradstudent

unread,
Apr 26, 2013, 3:31:33 AM4/26/13
to spa...@googlegroups.com
stoker,
 
You were right on !!!  Thanks so much.  Attached is the screen shot that shows that "cell" that becomes identical on both devices when they connect.
 
After putting the modified the code in Eclipse, uploaded the apk to two Nexus 7 and they are now communicating.  Next I will test OLSR election if I get my hand on more of these devices.  
 
There are some quarks where MANET Manager would not regognize the other device if one of them drops out of the Ad-hoc mode, goes into infrastructure based AP and tries to rejoin the Ad-hoc mode, the devices loose each other, I had to restart the devices.  Also would be nice to have an option to exit out of the app which will gracefully shutdown the application.
 
Great initiatives!!! don't stop!
Nexus 7 working after ap-any patch[1].PNG

2013 gradstudent

unread,
May 13, 2013, 11:59:15 PM5/13/13
to spa...@googlegroups.com
Tested with 3 Nexus 7 tables and Manet worked as multihop scenario.

Billy Hass

unread,
May 29, 2013, 12:28:14 PM5/29/13
to spa...@googlegroups.com
I have also tested with 3 Nexus 7 tables and MANET Manager works like a charm.

Thank you for this thread and your work!

Jeffrey Robble

unread,
May 29, 2013, 3:29:38 PM5/29/13
to spa...@googlegroups.com
You're welcome!

--

Billy Hass

unread,
May 30, 2013, 3:24:55 PM5/30/13
to spa...@googlegroups.com
I am afraid I spoke too soon...
After toggling ad-hoc mode off and back on this morning, the devices weren't able to find each other.
I spent a few hours troubleshooting, but I haven't been able to connect any of my Nexus 7's together since yesterday.

2013gradstudent, have you ran into similar problems? What steps do you take to connect your Nexus 7 devices when setting up the mesh?

Anybody else have any ideas or tips to connect the devices reliably?

Thanks,
Billy

Billy Hass

unread,
May 30, 2013, 4:11:37 PM5/30/13
to spa...@googlegroups.com
Also, just for completeness I attached four screenshots : iwconfig output and the routing info from both devices. (sorry about the spam!)
nexus7_device1_iwconfig.png
nexus7_device1_routing_info.png
nexus7_device2_iwconfig.png
nexus7_device2_routing_info.png

Billy Hass

unread,
Jun 3, 2013, 10:28:05 AM6/3/13
to spa...@googlegroups.com
Okay, so I think I found a reliable series of steps to get the Nexus 7's to connect to each other. Just start with connecting two devices, because connecting the third (or more) devices is easier once an ad-hoc cell is established. 

Turn off wi-fi; reboot; launch MANET Manager; turn on ad-hoc; open the routing tables and wait a bit; 
if they don't appear as neighbors, toggle the ad-hoc mode off and back on for one device and watch the routing tables on the other until they connect.

So far those steps successfully connected the devices every time. 

Great code quality by the way. I updated part of the wiki with the things I've picked up along the way to get MANET to work with some certainty.

- Billy

Felipe J

unread,
Jul 2, 2013, 1:15:44 PM7/2/13
to spa...@googlegroups.com
Hi,

I am using 2 nexus 7 running cyanogenmod 10.1. They do connect to each other, however, after about 5-10 minutes (sometimes less) they get disconnected and do not regain connection. Also, If I go out of range and then come back they will not rediscover each other. I have checked the iwconfig
output of both devices and they do not have the cell splitting problem, although I did follow stoker's advice an added the "ap any" line shown below to
the adhoc_edify file just to be sure. I will really appreciate any input you could provide me with. Great work by the way! keep it up!

 log(run_program("/data/data/org.span/bin/iwconfig " + getcfg("wifi.interface") + " ap any"), "Setting cell id");

TG

unread,
Oct 27, 2014, 11:11:13 PM10/27/14
to spa...@googlegroups.com
Hey Hass,

I am able to form Adhoc network with 5 Nexus 7 devices but I am trying to test the multi hop scenario. I tried to send message to the devices that are not direct neighbors, which are shown in the routing info as 2 hop neighbors, but those devices are not receiving any of them.

Have you tried multi hop scenario and able to communicate? Did you face this problem? Any suggestions?

If anyone have any idea please kindly let me know.

Regards,
TG
Reply all
Reply to author
Forward
0 new messages