If step # 2 fails, it probably means that RepWifi is installed as a system app (i.e. it came pre-installed with Replicant)If that's the case, only if simple uninstall failed, do the following in place of step # 2:

I just released the first alpha version of my graphical application for managing wifi connection on Replicant.source code is hosted on https://git.replicant.us/contrib/Fil/RepWifiApp/I'm really a noob when it comes to git, so please feel free to point out anything I'm doing wrong.It was my first commit to any project, ever, so please be patient and help me correct things!

For now, only Replicant 6.0 is supported.Code for Replicant 4.2 is in a very primitive pre-testing state. Please be patient on that.I stopped development for 4.2 after the first few test attempts, and turned to R6.0, because on my R4.2 device the situation was very unstable and testing was too stressful.Support for R4.2 is coming, I promise, but first I will need to make a clean 4.2 installation on my device, hoping to make testing a little less cumbersome.

I'm thinking of a meaningful way to provide a compiled, ready to install, APK..In the meanwhile, attached to this post is a "debug" APK, signed with my GPG key.The fingerprint of my key is

2D36 719C A4B8 3C7A DD9D 33AE A02A 2F68 CD07 CEAD

You can import it using

gpg --recv-keys CD07CEAD

Please, verify the fingerprint before trusting any signature.Also, note that my key should be signed by Paul Kocialkowski, so use that as an additional check.

Then download BOTH the apk AND the signature, and VERIFY it before installing.To verify:

gpg --verify RepWifiApp.apk.sig RepWifiApp.apk

DO NOT INSTALL the apk if the verification fails!To install the app, connect your device and type:

adb install RepWifiApp.apk

Everything should be now set up and working.Connect the external wifi dongle, and follow the basic buttons the app provides!

Please, please, please, send feedback, of any kind!I need to know how the app performs in the long run.There are bugs, for sure, so please if you find any, report on them in this thread.If you shall find that any useful feature is missing, please request it, and I'll do my best to include it in future releases!

Replies (41)

Great job, Fil! Many thanks for working on this! I already played around with it and looked a little bit through your repo. I tested it with my home network and it worked. It does not only work great, it also looks great :)

I will do more testing and take a closer look at the code. For now, I have the following questions/suggestions:

By default, root is disabled in Replicant 6.0. It would be good if the app provides a warning if root is disabled and advise users to enable root to make the app work.

The icons look great. Have you created all of them? It would be good to clarify the licence of the graphics somewhere.

Not sure, but it could be helpful to have a check if the dongle is connected and operable. You could display an error if someone presses the scan button but there is an issue with the dongle.

(not important) The app is displayed with the name RepWifi app. Would it be possible to remove the "app" from the name? Apps usually don't have it explicitly in their name.

(not important) Would it be possible to rename the main folder from "project" to something more meaningful like "app"?

I think the next step for me would be to get it to build with the Replicant 6.0 source code and have it included by default in Replicant 6.0. Probably the best way for you to have the app distributed separately is to get it included in F-Droid. Last time I checked, they required upstream developers to have a bug tracker available. You could look into this.

As already discussed in the wifi scripts thread, certain apps (including F-Droid) don't work if cellular data is disabled. The reason is that those apps check for a network connection and the Android system has no connection registered as the app or the scripts more or less bypass the Android system and directly configure wpa_supplicant.

It would be good to find a way to "fake" enable wifi so that apps don't complain. This would also avoid confusing behavior, e.g. if in some app a setting like "only use wifi connection" is enabled and the app complains about a missing wifi connection although the wifi dongle is correctly configured.

There is an xposed module that claims to be able to fake wifi connections. I tested it some time ago when I first worked with the scripts. It didn't work at the time. There are also some notes about difficulties getting it working with Android 6. However, the source code might be helpful to find a solution for this issue.

I don't actually know.. I guess it's the standard android library.. Gotta check if the project compiles and runs fine without it..

The icons look great. Have you created all of them? It would be good to clarify the licence of the graphics somewhere.

Thanks! Honestly, I'm proud of them too :o)Yes, I "created" them myself.. but it's basically only a modification of replicant's logo.. they are for sure free-licensed.Where should I put the licensing statement? Is it enough to put it in the README?

Not sure, but it could be helpful to have a check if the dongle is connected and operable. You could display an error if someone presses the scan button but there is an issue with the dongle.

Yes, that's a really good point. I did think about that before, and I was planning to introduce the check, but I was in a rush to release, so I will include this feature in the next update.

(not important) The app is displayed with the name RepWifi app. Would it be possible to remove the "app" from the name? Apps usually don't have it explicitly in their name.

Going to change that too! ;)

(not important) Would it be possible to rename the main folder from "project" to something more meaningful like "app"?

Done!

As already discussed in the wifi scripts thread, certain apps (including F-Droid) don't work if cellular data is disabled. The reason is that those apps check for a network connection and the Android system has no connection registered as the app or the scripts more or less bypass the Android system and directly configure wpa_supplicant.

It would be good to find a way to "fake" enable wifi so that apps don't complain. This would also avoid confusing behavior, e.g. if in some app a setting like "only use wifi connection" is enabled and the app complains about a missing wifi connection although the wifi dongle is correctly configured.

There is an xposed module that claims to be able to fake wifi connections. I tested it some time ago when I first worked with the scripts. It didn't work at the time. There are also some notes about difficulties getting it working with Android 6. However, the source code might be helpful to find a solution for this issue.

I really want to get into that..I bookmarked the xposed project, and I'm going to have a look at it during the next days.. I'll see what I'm able to put up in that regard!

The icons look great. Have you created all of them? It would be good to clarify the licence of the graphics somewhere.

Thanks! Honestly, I'm proud of them too :o)Yes, I "created" them myself.. but it's basically only a modification of replicant's logo.. they are for sure free-licensed.Where should I put the licensing statement? Is it enough to put it in the README?

I think so. I'm not a licensing expert, though.

Solving the issue with fake enabling wifi would also help the folks using reverse tethering as it's basically the same issue.

I just released the first alpha version of my graphical application for managing wifi connection on Replicant.source code is hosted on https://git.replicant.us/Fil/RepWifiAppI'm really a noob when it comes to git, so please feel free to point out anything I'm doing wrong.It was my first commit to any project, ever, so please be patient and help me correct things!

Hi, is this app for general wifi use, or specifically for the Tehnoetic N150? If for the former, what particular use case is there that is not covered by the applications included with Replicant? If the latter, could you make that clear in the title please, at the moment it is not mentioned at all.

Hi, is this app for general wifi use, or specifically for the Tehnoetic N150?

Neither case. It's for ath9k-driven external WiFi adapters. The one you're referring to is just one of them.

If for the former, what particular use case is there that is not covered by the applications included with Replicant?

There isn't any free/libre application (to my knowledge) that lets you manage WiFi connection using an external interface.

If the latter, could you make that clear in the title please, at the moment it is not mentioned at all.

Some fellow Replicant-ers and I, have been working on a hack, during the last few months, that makes it doable to use an external adapter that runs with free software only for connecting to networks, directly interacting with wpa_supplicant. Until now, only command-line scripts were available.The app I just released makes it possible to accomplish the same goal, but in a graphical, user-friendly way.You can look around in the forum, to find out the whole history, starting from here

I didn't report the whole history in this post, because I was thinking that most people would understand what I was talking about.If anyone else finds out that I really need to summarize things in this thread, then I'll do.

Neither case. It's for ath9k-driven external WiFi adapters. The one you're referring to is just one of them.

OK

If for the former, what particular use case is there that is not covered by the applications included with Replicant?

There isn't any free/libre application (to my knowledge) that lets you manage WiFi connection using an external interface.

right, I see.

If the latter, could you make that clear in the title please, at the moment it is not mentioned at all.

Some fellow Replicant-ers and I, have been working on a hack, during the last few months, that makes it doable to use an external adapter that runs with free software only for connecting to networks, directly interacting with wpa_supplicant. Until now, only command-line scripts were available.The app I just released makes it possible to accomplish the same goal, but in a graphical, user-friendly way.

perhaps a title (I think you can edit the title of the thread retrospectively) something like:"Graphical app for external WiFi dongles released" would be useful? i agree, no need to include the whole history, but at least something to indicate this has a specific use case would be helpful

I didn't report the whole history in this post, because I was thinking that most people would understand what I was talking about.If anyone else finds out that I really need to summarize things in this thread, then I'll do.

I have updated RepWifiApp. The updated package is attached to this post, together with the signature.

Changes made:

enabled debug logging

fixed a bug that only allowed to save one single network.

added warnings if the external adapter is not found, and if root access is disabled or denied by the user.

Before installing the updated APK, please manually uninstall the previous version from the device:

Settings > Apps > RepWifi App > UNINSTALL

Then follow the installation instructions on the very first post in this thread.CHECK THE SIGNATURE!!! Do not install the APK if signature check fails!

To use the logging feature:

Launch RepWifi app

Click on the menu button

Select Settings > Debug > Log priority

Set priority level to "Log everything"

Then use the application normally. Logs will be written to logcat with the "RepWifi" tag.

To retrieve the logs, on the host computer use:

adb logcat | grep RepWifi

If you encounter troubles using the app, and only if asked, please copy the output in a text file and send it to me, so that I have some material to investigate on and hopefully solve the problems for you!

When you have finished fetching logs, you can disable logging again by setting the Log priority to "Logging disabled".

could it be that you forgot to commit a few xml files as part of commit 49f64a40 · Enable logging + bugfix + new features?The version before this commit builds fine with Replicant 6.0 (only one minor fix necessary).

I get the following errors with the latest version from master:

ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/SettingsActivity.java:21: xml cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/SettingsActivity.java:30: xml cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/NetworkDetailsActivity.java:105: msg_confirm_delete_network cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/NetworkDetailsActivity.java:106: yes cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/NetworkDetailsActivity.java:107: no cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/MainActivity.java:115: menu_config cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/MainActivity.java:370: msg_interface_not_found cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/MainActivity.java:401: msg_root_denied cannot be resolved or is not a field
ERROR: /home/wolfi/replicant/6.0-romsrc-official/packages/apps/RepWifi/app/src/fil/libre/repwifiapp/activities/MainActivity.java:406: msg_root_disabled cannot be resolved or is not a field

I also noticed that sometimes the indentation of the source code is not consistent. This makes it harder to read it.

We should also start documenting the Wi-Fi dongle usage in the wiki. The wiki page should be listed under the Replicant usage section on the wiki start page with a name like WifiAdapter. Maybe there is a better name, it should only be consistent with the wiki guidelines.

The page should shortly explain why external Wi-Fi dongles are currently the only solution for having Wi-Fi working with Replicant while linking to existing documentation in the wiki (if applicable).

It needs to be explained that only Wi-Fi dongles with the AR9271 chipset are supported and that an OTG-cable is needed. Maybe we could link to some external resources that explain how the chipset can be identified. Otherwise, we should list dongles that are known to work and dongles that should work but aren't tested yet or where it's not certain that the right chipset is used. Some online hardware resources for GNU/Linux users might also be helpful if the integrated chipset is listed and maybe it's enough to just link to these resources.

The app should be explained, although I think the usage is almost completely self-explanatory. A section about known issues will be needed. This section should cover similar issues as the USB networking page. Problems with low battery levels should be explained there.

The scripts should be mentioned, too. A short usage guide at the end of the wiki page and a hint that the app should be preferred is probably enough.

I'm planning to work on that, as soon as I solve the most urgent issues with the app. I promise. I "only" need time.... :)

The app should be explained, although I think the usage is almost completely self-explanatory. A section about known issues will be needed. This section should cover similar issues as the USB networking page. Problems with low battery levels should be explained there.

Same as above ;)

The scripts should be mentioned, too. A short usage guide at the end of the wiki page and a hint that the app should be preferred is probably enough.

Yep!

Any suggestions? Anything I forgot?

You already mentioned more than I was thinking about :)Currently nothing else comes to my mind..

If anybody wants to start writing the articles, I'll be at complete disposal to provide them with all information I have about the topic.Otherwise, I'll be working on it as soon as I can, which unfortunately means not very soon.

If anybody wants to start writing the articles, I'll be at complete disposal to provide them with all information I have about the topic.Otherwise, I'll be working on it as soon as I can, which unfortunately means not very soon.

I would like to start this, but unfortunately I don't have wiki editing rights. Where do I ask for them? The wiki suggests I must ask for them, can anyone help while I try to dig out Paul K's email address?

If anybody wants to start writing the articles, I'll be at complete disposal to provide them with all information I have about the topic.Otherwise, I'll be working on it as soon as I can, which unfortunately means not very soon.

I would like to start this, but unfortunately I don't have wiki editing rights. Where do I ask for them? The wiki suggests I must ask for them, can anyone help while I try to dig out Paul K's email address?

Do you have a working adapter and do you have used it successfully with the app and/or the scripts with at least one device running Replicant 6.0? It would be good if you have some experience with this before editing the WiFi adapter page. Otherwise, I can give you access.

The WifiAdapter page is now more or less ready and I linked it on the wiki index. Of course, there is still lots of room for improvement. More adapters can be added to the list and the instructions could use some verification.

If anybody wants to start writing the articles, I'll be at complete disposal to provide them with all information I have about the topic.Otherwise, I'll be working on it as soon as I can, which unfortunately means not very soon.

I would like to start this, but unfortunately I don't have wiki editing rights. Where do I ask for them? The wiki suggests I must ask for them, can anyone help while I try to dig out Paul K's email address?

Do you have a working adapter and do you have used it successfully with the app and/or the scripts with at least one device running Replicant 6.0? It would be good if you have some experience with this before editing the WiFi adapter page. Otherwise, I can give you access.

it's really disappointing the arbitrary reasons that various people involved with this project come up with to discourage others from taking part. this isn't the first time (the other times involved Paul K) that someone has put up a barrier/discouragement/demotivating response for no apparent reason. you even said yourself "if anyone wants to start writing the article..." and then went on suggest I'm not worthy of contributing. how does that work? your wiki guidelines make a specific point about focussing on the nominal subject (the software/hardware) rather than the person talking about it. do you understand how community works, do you care about contributions, or about maintaining your own personal fiefdoms? this (arbitrary exclusion) is the exact topic that free software is supposed to fight against, it is why it exists. somewhere along the way you forgot that.

If anybody wants to start writing the articles, I'll be at complete disposal to provide them with all information I have about the topic.Otherwise, I'll be working on it as soon as I can, which unfortunately means not very soon.

I would like to start this, but unfortunately I don't have wiki editing rights. Where do I ask for them? The wiki suggests I must ask for them, can anyone help while I try to dig out Paul K's email address?

Do you have a working adapter and do you have used it successfully with the app and/or the scripts with at least one device running Replicant 6.0? It would be good if you have some experience with this before editing the WiFi adapter page. Otherwise, I can give you access.

it's really disappointing the arbitrary reasons that various people involved with this project come up with to discourage others from taking part. this isn't the first time (the other times involved Paul K) that someone has put up a barrier/discouragement/demotivating response for no apparent reason. you even said yourself "if anyone wants to start writing the article..." and then went on suggest I'm not worthy of contributing. how does that work? your wiki guidelines make a specific point about focussing on the nominal subject (the software/hardware) rather than the person talking about it. do you understand how community works, do you care about contributions, or about maintaining your own personal fiefdoms? this (arbitrary exclusion) is the exact topic that free software is supposed to fight against, it is why it exists. somewhere along the way you forgot that.

I'm sorry mate, but it seems to me like you misunderstood Wolfgang's reply.Nobody here is discouraging people in taking part to the project.In facts, it is all the opposite.What Wolfi was pointing out is that you need to have (at least) some basic knowledge about the topic you are writing about, before starting to write a wiki article.This is essential to keep the wiki clean and correct, and to avoid misleading users that don't know the subject (which is primarily why one would read the wiki).He was only asking you if you have any experience in using the external dongle with the scripts and/or with RepWifi, and in facts, he even proposed to give you wiki access if you answered positively:

Wolfgang Wiedmeyer wrote:

Otherwise, I can give you access.

Also, asking people to build up a knowledge before putting their hands on the wiki is NOT "arbitrary exclusion", as you put it. It is a factual need, instead.Do you really think that anybody could write something useful and correct about any subject without knowing the very basics of it? Come on..

Please, re-read this thread, considering what I just wrote, and try to see how folks here are keen to help rather then exclude people.If you would like to participate, nobody is wanting to push you away. Just be sure you have all the prerequisites and you do things properly, before editing the wiki. If you do so, then I'm sure your help will be much appreciated.

[...]Please, please, please, send feedback, of any kind!I need to know how the app performs in the long run.There are bugs, for sure, so please if you find any, report on them in this thread.If you shall find that any useful feature is missing, please request it, and I'll do my best to include it in future releases!

I installed replicant 6.0 on a Samsung Galaxy S2. Installation successful without any errors.