jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 2:02 am

PLEASE ONLY POST IN THIS THREAD IF YOU ARE HAVING PROBLEMS USING WIN32-RASPBIAN-WIFI-INJECTOR OR IF YOU HAVE SUGGESTIONS FOR IMPROVMENTS.

Click here for the latest release: http://www.raspberrypi.org/forums/viewt ... 59#p551759

A while back a user on here (pjadl) set out to create a program to inject wireless information (ssid, password) into a disk image. The idea was to create a truly headless setup on a model A Raspberry Pi. Due to what seems to be a spontaneous pissing contest that pjadl lost, he decided to stop coding the program.

When I helped him on this project at the start, it was understood that the program was to be released to the public. I found in late February that he had decided to trash the almost completed program. I was able to get him to release the source code and allow me to continue with the project.

This is what I was able to do with it. :D
Last edited by jasond on Wed May 21, 2014 2:22 pm, edited 1 time in total.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 2:04 am

I am starting a new thread for Win32-Raspbian-Wifi-Injector because a lot of users here feel the need shoot down stuff they don't have a need for. It just seems ignorant to me flooding a thread originally designed for new users with talk about how this program could have viruses (without any proof other than they don't know the code), or trying to figure out another way of recreating the program.

I am not sure if the moderators of raspberrypi.org will support what I am trying to do. I hope they don't allow the users who took over the old thread to take over this one too. I would like to keep this thread for people who are using this program and may have a problem while using it or have suggestions to make the program better. Please respect this.

I have included a link below to the old thread so that the other users can still continue to trash this program. This way they can't say I am trying to cover up their fictitious complaints and still give them a way to promote hatred towards this program
http://www.raspberrypi.org/forums/viewt ... 63&t=76571

As a side note, the original creator (pjadl) hates cut and paste programmers. He doesn't want hacks grabbing his code just to pass it off as their own. I truly understand this because I too have worked with pseudo-programmers before. Pjadl has stated that because of this reason, he does not want his code publicly released. And until such time that he changes his mind, I will continue to respect his wishes.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 12:02 pm

from previous thread
If a users chooses 'linksys' from the list of available networks, and 'linksys' has WEP encryption, it will change the option automatically for the user. This way you only need to know the ssid and password of the router, and not what type of setup it is.
Right - that sounds good -just remember - someone may be running on a desktop with no WiFi so need to test from that :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 12:16 pm

Are you able to give a high level overview of what your WiFi setup program does and how it updates the SDCard?

If it was packaged as an MSI so that Windows Installer can manage it then folks may see it as more trustworthy and less like a potential virus. Google turns up http://speedpackaging.com/products/msi-generator/ for doing that.

I'm happy to install anything on my Windows systems, because I know what I'm doing, but the audience you're aiming this at have been taught (and rightly so) to be averse to anything that is a random download from a random website.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 3:39 pm

DougieLawson wrote:Are you able to give a high level overview of what your WiFi setup program does and how it updates the SDCard?
My program doesn't update the SD card at all. It only works with disk image files. But I was looking at pjadl's original thread for this program on here and saw the following:
abishur wrote:I wrote a basic program that did this kind of thing over 7 months ago, only you had to write the image to the SD card first. Then I had a kid and left it at the ugly command line stage
Maybe abishur would be willing to hand over his code and allow me to create a front end to it and then source code could then be released publicly.
DougieLawson wrote:If it was packaged as an MSI so that Windows Installer can manage it then folks may see it as more trustworthy and less like a potential virus. Google turns up http://speedpackaging.com/products/msi-generator/ for doing that.
Wouldn't using MSI stop this program from being portable?

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 3:42 pm

I'd assume that MSI generator builds MSIs for all supported versions of MS Windows.

For Linux (and maybe Mac) users there are easier ways to update ext4 image files (by mounting them as -t loop).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 4:05 pm

I think Dougie was just speaking loosely. No worries as far as I'm concerned.

Updating the .IMG file, updating the SD card, both are conceptually the same thing.

(Of course, caveat: As I discussed earlier in the other thread, it may well be that under Windows, it IS harder to update the SD card directly, since Windows goes out of its way to make it hard to access devices as if they were files [the Unix way]. Still, it should be doable - one way or another...)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 4:56 pm

DougieLawson wrote:I'd assume that MSI generator builds MSIs for all supported versions of MS Windows.
But portable means to put a program on a flash key (or some other removable media) and run it on any Windows system without worries of file dependencies (assuming minimum OS requirements are met). If you use the MSI on a Windows 8 machine, you can't put the program on a flash key and run it on Vista. But I still have to look into MSI as I have never used it before.
DougieLawson wrote:For Linux (and maybe Mac) users there are easier ways to update ext4 image files (by mounting them as -t loop).
I would be interested if this program works on Linux and Mac running under Wine.
Joe Schmoe wrote:Updating the .IMG file, updating the SD card, both are conceptually the same thing.
Linux vs Windows (when trying to 'read from/write to' a non-native filesystem) are completely different. When you insert the Raspbian image on an SD card under Linux, Linux sees it as 2 partitions. On Windows, it only sees the /boot partition and doesn't allow access to the rest of the SD card. You have to unmount the SD card, and access it from a low level.

It would be interesting to see if it can be done directly on a SD card. This will have to wait until I finish with my current list of changes unless abishur is willing to share his code.

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 6:29 pm

jasond wrote:
DougieLawson wrote:For Linux (and maybe Mac) users there are easier ways to update ext4 image files (by mounting them as -t loop).
I would be interested if this program works on Linux and Mac running under Wine.
I don't think any folks running Linux would be interested in doing that. We can, more easily, dump the *.img on an SDCard with dd, eject, re-insert and mount any/all of the partitions to then edit them with stock standard Linux tools. It's easier to do that than working with WINE (which is not an emulator and only runs on X86 or X86_64 systems). That stuff can be done on a running Raspberry Pi to build a new card.

I've used those techniques to move from a NOOBS install to a native install (by shuffling partitions 5 & 6 down to partitions 1 & 2).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 10, 2014 6:51 pm

I sent a PM to abishur asking if he would release his code. Then we can do this right and have a completely open-source version of this. Let's hope he wants to help other users instead of going down pjadl's route and keeping the code to himself.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 17, 2014 4:27 am

Just in time for the weekend, here is the next version of Win32-Raspbian-Wifi-Injector with a SSID scanner.

https://github.com/jasond-/Win32-Raspbi ... ses/latest

The SSID scanner with list all the available access points and set the currently connected SSID to the default option. Also, choosing the SSID from the list will ensure the proper mode is selected for the encryption/security (open, WEP, WPA).

Image

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Sat May 17, 2014 8:52 am

This is a really neat trick and the network scan is an excellent addition.

It's, definitely, a lot easier than mounting an image on my Ubuntu system (in my case, running in Oracle's Virtualbox) and editing it the Linux way (parted to find the offset, mount -o loop,offset=... filename /mountpoint).

Your next step could be to update F:\os\Raspbian\root.tar.xz (or the other root filesystems on a NOOBS card) so you can do the same trick to NOOBS before running the first boot on a RPi.

7zip can de-compress that xz file. With NOOBS it may be easier to write something for the NOOBS installer to do the network scan and auto update.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Wed May 21, 2014 2:27 pm

DougieLawson wrote:Your next step could be to update F:\os\Raspbian\root.tar.xz (or the other root filesystems on a NOOBS card) so you can do the same trick to NOOBS before running the first boot on a RPi.
Changing which OS image that gets injected is the last thing on my list. Until this software is fully completed and functional, I will not even consider programming for another OS.

jasond
Posts: 17
Joined: Fri May 02, 2014 5:37 am

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 2:58 pm

jasond wrote:I sent a PM to abishur asking if he would release his code. Then we can do this right and have a completely open-source version of this. Let's hope he wants to help other users instead of going down pjadl's route and keeping the code to himself.
Looks like abishur doesn't want to help. He messaged me once saying he had the program somewhere but couldn't find it on this site. Then he never responded to any of my PM's again. I then got an e-mail from jamesh saying I will be banned if I let people know about abishur and his non-response.

So I guess I'll be banned, because it isn't right to perpetuate a lie while making sure you do everything to cover it up. Especially if you are a Moderator!

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 3:36 pm

You don't tug on superman's cape.

You don't spit into the wind.

And you don't fsck with moderators on this board…
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Napier
Posts: 16
Joined: Sun Jul 15, 2012 7:19 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 3:41 pm

In before the lock / deletion / random transporting of thread to an untrodden sub forum.

Sorry, Childish I know.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 3:42 pm

Yup, he got banned.

But not for the reasons he wrote above, but for sending me a load of abuse (note to people - if you send a load of abuse to a moderator, you will get banned - it's quite a simple rule to understand). Not sure why he thinks that Abishur is required to answer his PM's, or that Abishur lied, but that seems to be his what's in his head and despite repeated polite suggestions he 'let it go' he didn't.

Shame really. I really don't understand why this particular topic drags some real knuckle draggers out of the woodwork. Perhaps they all get together and have anti-raspi-mod parties or something when their Mum's out and about, and work themselves in to a world hates me frenzy.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 3:44 pm

*sigh* you started a new thread to get away from the arguments and concentrate on the program

- then you repeatedly goad a moderator in this very thread and by email/pm ...


[edit] argh all over now...

I wonder if pjadl / jasond were the same person all along... certainly acted similarly :twisted:
Android app - Raspi Card Imager - download and image SD cards - No PC required !

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 4:01 pm

I really don't understand why this particular topic drags some real knuckle draggers out of the woodwork.
Well put. But I think you do understand - or would, if you go back and re-read a post I made 10 or 20 responses back about how "No OS likes to admit that any other OS exists".

What galls the OP here is the (in their view) stubborn refusal on the part of the Raspbian maintainers (as well as us posters/peanut-gallery-observers on the thread) to get on board with the idea that there should be a Windows-based configuration utility for the Pi.

You can just see the wheels spinning. They can't understand why people aren't falling over themselves to help out in this effort.

And, of course, as I said earlier, the fact is that the only real solution to this is for the maintainers themselves to take it upon themselves. After-market kludges such as the OP wants, just aren't good ideas at all.

Finally note that if *I* were doing this, I'd change the image to look for and (if found) execute a script called "/boot/autoexec.sh" as part of the startup. That would neatly get the job done.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 4:31 pm

Joe Schmoe wrote:
I really don't understand why this particular topic drags some real knuckle draggers out of the woodwork.
Well put. But I think you do understand - or would, if you go back and re-read a post I made 10 or 20 responses back about how "No OS likes to admit that any other OS exists".

What galls the OP here is the (in their view) stubborn refusal on the part of the Raspbian maintainers (as well as us posters/peanut-gallery-observers on the thread) to get on board with the idea that there should be a Windows-based configuration utility for the Pi.

You can just see the wheels spinning. They can't understand why people aren't falling over themselves to help out in this effort.

And, of course, as I said earlier, the fact is that the only real solution to this is for the maintainers themselves to take it upon themselves. After-market kludges such as the OP wants, just aren't good ideas at all.

Finally note that if *I* were doing this, I'd change the image to look for and (if found) execute a script called "/boot/autoexec.sh" as part of the startup. That would neatly get the job done.
I think its less of a Linux vs Windows, but more a none of the maintainers know about Windows/have enough time so it has to be done in the community type of thing. I have no objection to a Windows utility, but perhaps a slight objection to a closed source one (closed source is OK if you are trying to make a living, not so sure on stuff you give away, but could be convinced either way)

As for what could/should be done on the install itself, I don't know. I'm not a maintainer of the installs and don't know what is or isn't possible.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Tue Jun 03, 2014 5:06 pm

Note: In the below, I am assuming that the goal is to follow this workflow:
  • 1) Write virgin (freshly downloaded from Rpi site) image to card
    2) Run a Windows app to configure the card
    3) Boot the card on the Pi
See at end for why this may not be an entirely valid assumption[*].
---------------------------------------------------------------
I have a solution in mind - that involves multiple parts. The Windows-y part could (and should) be done by "the community" (in this case, by jason/pj). It would be a straightforward, pure Windows (presumably .NET - probably VB.NET) thingie, and none of us would need to dirty our hearts or minds over it.

But, there is one (very small, but very critical) part of it that would require action by the Raspbian maintainers - and no one else can do it - because of the various assumptions upon which this problem is based.

Finally, but (and this is a big but), I just now realized that the whole idea falls apart if you are using NOOBS. Because it depends on the Windows app being able to write to the /boot partition on the card, and this won't work if, well you know the drill…

[*]And finally, note that the OP actually seemed to want to do it the other way - that is, to modify the .IMG file itself, rather than to modify the card after the image has been "flashed" to the card. This has other plusses and minuses, but again, completely falls apart with NOOBS, because now you're talking about modifying a .XZ file somewhere…

My point in all this is that I suspect the maintainers are now even less interested in this, if it won't work with NOOBS - given that we are trying to push NOOBS as the currently supported method.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Wed Jun 04, 2014 9:36 am

@Joe Schmoe
If users want to customise the installation of a NOOBS distro as per your above goal, then my https://github.com/procount/noobsconfig/ might offer a solution for most of the distros, but especially Raspbian. See also my previous post http://www.raspberrypi.org/forums/viewt ... nt#p541390. Of course, this is not applicable if you are not using NOOBS.

I originally developed it to separate my customisations from the NOOBS distro. When NOOBS was updated I could easily write the new NOOBS image to my SD card, copy my customisations over and reinstall Raspbian with all my customisations ready to go.

Currently it does not provide a GUI to perform the customisations, but it does allow you to configure the wifi setup, install installation scripts or other files, all from Windows or Linux (although if you want the files to be compressed you may need to do this on Linux to TAR and XZ the files first).

I personally don't like the idea of editing an .xz image file directly because you can't be sure you aren't overwriting something else. So to be safe, you need to decompress the image, modify it, then compress it again, which all takes a lot of time (and free disk space).

NOOBSCONFIG takes the approach of extending the NOOBS installation. It simply modifies the NOOBS partition.sh script so that it will install (and/or overwrite) additional files on the distro's installation after the main partitions have been written but before it reboots. It is a bit like "patching" the system files. Because it does this on the RPi itself, there is no need to edit the original image files or worry about accessing EXT partitions on Windows, you just copy over the new files you want to the SD card.

If anyone is interested I encourage them to view NOOBSCONFIG on github as I have included plenty of documentation and example files.

It would be a trivial next step for someone to write a GUI frontend for NOOBSCONFIG (maybe in Java or Python so it would work in Linux or Windows?) to allow the user to configure his preferences and write the necessary files to a "virgin" NOOBS SD card. Any takers.....?
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Easy wifi setup! It can't get easier than this. [Take 2]

Thu Jun 05, 2014 5:29 am

https://github.com/abishur/rpi-conf

As you can see from the commits I've had this up for anyone's use since June of last year. jasond PM'd once and I told him I had posted it somewhere on the forums but I would try to find it. If he felt like I was lying, he should have tried to contact me again. My apologies to all, but I'm a dad and have a full time job, I only get to poke my head in the forums briefly from time to time to help out so yes, if it's something a user can find themselves with a little effort I'm probably going to leave it to them to do the looking especially if they never follow up with me about it!

Now as I told jasond my little program operates differently than what's his name's (whose program most likely relied on the img always being exactly the same and would break when changed), that it needed to be installed on the OS to work, but there wasn't enough demand for it so I never asked for it to be incorporated and left it in the early stages. Anyone who wishes to take it further is free to do so. I had always desired a gui interface that would be simple to do some basic configurations with.
Dear forum: Play nice ;-)

Return to “General discussion”