Helmhurts Android App

icon2
What a fancy icon! You should probably click it.

The recent attention this humble blog received was surprising to say the least. Despite continuing to be slightly bemused by it all, let it not be said I don’t listen to the comments I receive.There is therefore an Android app here

Get it on Google Play

which is a version of the 2D FDTD simulation, and will run happily on a modern phone. My Nexus 4 manages about 1 step per second for an array size 350×600, and more up-to-date phones will surely be much quicker. There is a review here in Spanish.

 

2014-09-01 09.56.26
Try a complex room layout…
2014-09-01 12.33.27
…or a simple diffraction experiment.

You are able to input a floorplan for your house/flat/apartment etc., and it comes with the one I used in the Helmhurts post if you’d like to recreate that. The input is in the form of a .png file, which you may create as you wish. The limitations are that

  • Each pixel should represent 1 centimetre
  • Black areas represent open space
  • Coloured areas represent materials
  • Colour images will be converted into the nearest colours corresponding to a material
  • Try to keep images below approximately 500×500 pixels for the sake of RAM and CPU usage. If you have a beefy phone go crazy.

You can save the simulation output at any point, even when the simulation is running. The images are of the component of the electric field out of the plane, and are saved to internal/external storage as appropriate and exported to the camera roll. You can also save a GIF animation of your simulation.

All components of the E and H fields are simulated, though in 2D. Empty space is assigned a refractive index of 1, walls are assigned that appropriate for the material.

The frequency is fixed at 2.4 GHz, but the antenna polarisation and type (single or double) can be adjusted.

This is my first time with Android, or indeed Java, so it’s a little rough around the edges, but it runs happily enough without crashing on my phone.

I hope some of you find this interesting, as always this a bit of fun which shouldn’t be taken too seriously.

 

77 thoughts on “Helmhurts Android App

      1. I think someone is fixing to make a LOT OF MONEY.. Apple Store It $ $ ..
        I’ve been thinking about putting my Netgear NightHawk R8000 at the end of my Hallway (end of house) on the middle tier of a 4 ft stand and put Foil behind it reflecting all the signals through the house. I’m not sure Why I TINKER so much with tech.. My goal was to get access on my back patio (through brick & 4 rooms) replacing a Dlink855> DAP1522> 300N Repeater with the Netgear R8k .. and it works ~Perfect~ I guess I want to stretch my Netgear R8k signal 10 miles to my work..

        Like

      2. Hey Jason, great work. I would like to know if you could find out through your discovered algorithms and Google Maps the building that centers that entire world. And if you could the city or town that is located in the middle or center of the world. Thank you.

        Best,
        Sam

        Like

      3. I keep getting the following error when I press “run”:

        The number of iterations and plotting interval need to be integers, and the plot limit either a whole number, a decimal, or in scientific notation.

        I am doing all of those things. Please advise. I am asking here because I don’t want to leave a dodgy review if I am screwing up.

        Like

      4. It does indeed. Awesome. I also noticed that one can theoretically change the barrier materials now, but when I change the colours in my .png, the app converts it back to black and white. Any wisdom there?

        Like

      5. Are you talking about when the simulation starts? The image gets converted into ‘materials’ when you click run, but then only the outlines in monochrome are plotted for clarity when the simulation is running. To see the converted bitmap, a workaround for now is to start a simulation, stop after one step, then touch the image. This brings up the ‘router placement’ view which draws the converted bitmap. If this is in colour then the materials are being used correctly. Sorry if that’s a bit complicated, if instead I convert the image upon initial loading it can sometimes make the application hang.

        Like

  1. Please add a help section with all the descriptions and steps from the website to the app and a legend.

    Just purchased the app and love the idea, needs a bit of polishing tho, keep it going, looking forward to an update already.

    Liked by 2 people

    1. Thanks for the feedback. I tried to release an app ASAP, so unfortunately the instructions may have gotten hidden away somewhat on the play store listing. I’ll certainly update it to make it more user friendly, and add more features.

      Like

  2. How is this affected by the 5GHz band versus the 2.4GHz band? Would the refraction etc be very different? I have read about 5 being faster but worse in buildings with many walls.

    Like

  3. How would multiple antennas affect this solution? Most access points I know of have at least 2 with the intent of working around multi-path issues, much like the nodes computed by your algorithm.

    Could you release the source code to the app? I’d love to dig in, play around, and optimize it!

    Liked by 1 person

      1. perhaps app for Google chrome would provide it multiplatvorm (if anything to special used, should be capable to run, where ever the chrome does: android, windows, linux, mac, etc).

        Like

    1. Good question, it depends on the ratio if the refractive indices of glass and concrete. I don’t have that to hand, try experimenting with both! You could maybe set up a wall of varying thickness and see how the transmission changes.

      Like

    1. “Plot every” is how often to plot the fields. Making a bitmap to plot takes a little time, so if you were to set this to e.g. 10, every 10th step is plotted which might speed up the simulation.
      “Plot limit” marks the upper limit of the colour map. This is helpful in examining the fields over a wider dynamic range than the bitmap supports. If you set this to e.g. 10, the colours would get 10 times dimmer. If you set this to e.g. 0.1, the colours would get 10 times brighter.

      Liked by 1 person

  4. Smart idea – although it seems weird to use a phone for pure computation. I imagined reading the title, user walking around in his home and app measuring wifi signal strength . This would allow to measure penetration without prior knowlegde of the materials involved.
    And the math would be much harder indeed

    Like

  5. Very interesting. I am a home builder and would be nice to have an ideal of WiFi signal strength while constructing the house. Perhaps build a certain niche just for routers in the optimum position during the framing phase.

    Like

    1. The next step in this is to implement conductive materials, which shouldn’t be too difficult. When I figure out how to make configuration simple for the user it’ll be easy to include in the app.

      Like

  6. awesome idea, a desktop version is a definite as it would help me with my wireless network in our 14 warehouses:)

    Those asking for IOS – unless apple changes their policies No Wireless scanning apps will be allowed in the App store

    Like

  7. I’ve had some fun playing with this tool. I tried this out a few different ways since I have wood/plaster walls and also a couple of chimneys that act as RF barriers in my home. By using dashed instead of solid lines for my walls, I somewhat approximated the WiFi signal penetration between rooms and outside of the house. I also currently use two AP’s to help overcome dead zones, so I ran two simulations using my current AP setup and then overlaid the results together in one image, which can be seen here:

    https://drive.google.com/file/d/0B8ARP9N1rQVLdEtvZjE2QU1hSWs/edit?usp=sharing

    I would say that empirically, these results match my observations fairly well. Neat tool, great work, hope this feedback is interesting to someone else and possibly useful in further development efforts. I agree with other comments along the lines of developing a desktop app. Also, having the ability to work in reverse, real-time, to sample wifi signal strength in various locations on the map would be pretty neat.

    Liked by 1 person

    1. That looks great! Glad you like the app. The newest version supports a couple of different materials, including wood. The relative permittivity of wood is approximately half that of concrete at 2.4GHz, so you should see much more realistic transmission.

      Like

  8. Purchased! This is amazing even as it is! I’m going to throw suggestions out there because I hope you continue to work on and improve this for a long time to come, but I love this app even as it is.

    Suggestions:
    – I would love to see 3 antenna and dual band (2.4 and 5 ghz) router support.
    – If you are going to continue adding materials, maybe make “standard” options. For example, a “regular wall” that would be two sheets of drywall with interspaced 2×4’s, “insulated walls” which is the same, plus insulation. Most wall and window types are standardized by building codes, so adding a few of the more popular ones might be easy. Also, cinder block, it might be close enough to brick that it isn’t worth it, but I can think of a lot of industrial buildings this would be perfect for that use cinder block walls.
    – Desktop client, please! I would love to run this in all it’s glory on a full screen using all 4 cores.
    – Lastly… 3D, of course😛

    An idea for the materials. Perhaps you can make different shades of black correspond to different refractory indexes using an equation, and then just create a huge list (or let the community create it) of material indexes. we wouldn’t necessarily be able to tell two very close shades apart, but a computer would have no problem.

    I’m not sure if that’s a great long term solution, but it would open up the ability to be able to design floor plans with hundreds of different “materials”.

    Like

    1. Oh, I almost forgot, one more thing. This will almost certainly require a desktop client due to scale, but as long as I’m asking for the world, I would love to be able to place multiple wifi points. If I could map out my entire building (business, not home) and place routers where they are now, and see the dead zones… be still my beating heart.

      Like

      1. Hi, I’m glad you like the app and thanks for all the feedback! I’m certainly planning on adding multiple APs and varying refractive index profiles, that should be simple to implement. As for a full-powered 3D desktop client, there are existing software packages out there that will do this more effectively than I’ll be able to in my spare time! Of course they’ll also cost much more than $1.

        Like

  9. Found a way to (sort of) run it as a desktop client:) tl;dr follow these instructions: http://xmodulo.com/2013/02/how-to-install-and-run-android-vm-on-vmware-player.html
    I gave it several GB of ram and 2 cores, it looks beautiful. A full client would still be nice, the VM has limitations on screen size for one thing.

    Which leads me to another feature request… Turn on rotation please? For example, right now if I start the app on my phone and then start rotating my phone, the app doesn’t rotate with it. This is a problem for VM’s because it defaults to Horizontal. There’s ways to rotate the screen with CTRL+F9 (through F12), but if the app doesn’t rotate those don’t work. And because the app naturally wants to be vertical (for a phone), it means that it’s rotated 90 degrees counter clockwise. It makes it really fun to use the mouse to get to menus since all input is rotated as well. Heh:)

    Like

  10. “Each pixel should represent 1 centimeter” But you specified images should be under 500×500. I’m guessing you started with a full size model (1px = 1cm) drawing of your house, and then as a last step scaled it down? So each pixel actually represents a much larger distance?

    Like

    1. I’ve just heard that Chrome OS will start supporting Android apps in the near future, so that may be an option too. When the screen rotates the Android activity seems to be destroyed and recreated, which means whatever is in memory is deleted. Until I know how to stop this from happening I’ve disabled screen rotation. The 500x500px limitation was just to help advise people with less RAM on their device, the app will work with any size image as long as it fits into memory. The pixels are always mapped to 1 centimetre, so effectively for less powerful phones you can’t model very large areas. With a desktop I imagine it’ll be possible to do much more.

      Like

      1. If there’s no way around the rotation, how about an option for vertical or horizontal mode before the animation begins?

        Like

  11. Do you just recommend Paint? Or is there a different drawing software you used? Like an android app to do the png?

    I’d suggest putting this in the help menu.

    Great idea by the way, I’ve been showing all my friends!

    Like

  12. Is there any chance of doing a multiple levels? I am concerned with where to put my router in my 2 story condo and my intuition says to put it above the stairs but I just wanted to see what it looks like in different positions.

    Liked by 1 person

    1. That would be great, but requires an extension to 3D which even on a full desktop PC is prohibitively slow and memory intensive. It may be possible with some further approximations to model multiple floors, but I’m afraid I haven’t thought of a clever way to do that just yet.

      Liked by 1 person

  13. This looks great. Have you considered running a kickstarter or other crowd sourcing to make it available on other platforms? It could give you a push to get the equipment you need to test it (eg: a cheap iOS device, a multi-OS development platform, etc.). I would certainly contribute to that.

    Good luck with this and future endeavors.

    Like

    1. Hi Michael, thanks for the support. The total revenue from the Android version of the app is enough for me to get my hands on an iOS device now, the only sticking point is how much time I can afford to commit around writing my thesis – the Android app was written a few months ago when I had more time on my hands!

      If/when I do release an iOS version I’ll certainly post an update here on the blog. Cheers, Jason.

      Like

    1. As a workaround for now, the Android app is available repackaged on the Chrome Web App store. Currently only ChromeOS is supported, but in the near future Windows and OSX will be supported too (I’ve run the Chrome app on both operating systems successfully, it’s a matter of when Google supports installations from the app store).

      Like

  14. The app is single processor😦 It uses only 25% of my G2 cpu.
    Also, I marked the materials as red, blue, green, white, black, but your green is of a different shade. How can I be sure that it is being recognised correctly? Especially since in the displayed image my green areas appear with MY shade of green and not with yours.
    But good app anyway, thanks.

    Like

    1. I was right: if I use pure green it doesn’t get recognised as glass (I did a quick test). I took a screenshot of the app and I found the RGB codes for your green and now it works.
      Also, question: I don’t know about Android development and memory limits, but my image (1350×1350 pixels) uses during the simulation (no GIF) about 300 MB or less. Maybe using two processes and merging the results is feasible.

      Like

    2. Hi, thanks for purchasing the app!

      RE: single core useage: It is single-threaded so far, yes (almost – the UI and simulation threads are separate). One day when I have the time it will be fun to upgrade the simulation class to support multiple cores – I tried this on a Nexus 4 but the clock frequencies were throttled hard enough that the performance increase wasn’t significant. Perhaps newer devices will handle multiple-core workloads better.
      RE colours: The code I use to check the colours is (e.g. for green):

      if(r 127 & b < 127){ //Handle green colour etc. }

      where (r,g,b) are the colour components of the pixel between 0 and 255.

      RE: memory warning: Some day I also plan to use the new Android APIs to get the device memory allocation limits and adjust the 'warning' message accordingly. When I first released the app lots of people were complaining about crashes due to out-of-memory errors, so I added the warning message. Again, as new devices have been released the memory limits have risen and it might be safe to remove it soon.

      Like

      1. May I suggest to convert the image on load, so that I can check immediately if the matching of the colors is correct?
        Concerning throttling: I think that this article summarises that multicore is now working well http://anandtech.com/show/9518/the-mobile-cpu-corecount-debate and that for a given power/heat budget more cores, throttled, work better than a single one at high frequency.
        I mean, if the app works with multicore enabled (you did it on the N4), whether the advantage is small or big, better release it… On the other hand, if you have troubles getting it to work, then better one core only than no app at all.

        Of course, if you could work together with the other guy of the ipython notebook and have equivalent input data (multiple materials, same image format) for his script, having a desktop equivalent would be wonderful. There multicore is fine and memory is not an issue.

        Last things for the TODO:)
        Setting a grid of positions to be simulated for the router would simplify the optimisation of the placement. Right now it’s difficult, the position is entered with the touch! An additional window with a table of user-entered placement would suffice. I’m not a developer (only simple stuff on scripting and on .Net), but I think this is a modification easy to implement.

        Like

      2. To be clear: I’m already grateful for this app, I’m happy I bought it, I only think that minor changes (conversion on load, custom list of router placements) can improve it a lot with little effort:)

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s