Ability to edit wlan profiles (Dynamic -> Static)

General discussion about RuneAudio. Do not post any support or feature requests here.

Ability to edit wlan profiles (Dynamic -> Static)

Postby irishwill2008 » 06 Feb 2018, 15:25

Hi guys,

This message is aimed towards devs mainly but if anyone has information then feel free to post!

Basically, i am connected to a wireless network and i want to change from dynamic ip to static but i cant seem to find an option? If you go into ethernet there is an option to change from DHCP to Static. Exactly what i want but for wireless. Thing is, i dont think this is a thing? Maybe im blind and cant locate it but i have looked around the code base!

Would love this feature as i can then switch it to static without having to delete the profile and re adding it but choose static.

Hope someone has info!

Cheers.

Will.

EDIT:
Looking at network_wlan.php i see code referrencing to buttons i dont see? Will look into this myself also and see why i cant see these options (Modify) is one i think can solve my issue.. If of course it displays correctly.

So far i found a section
Code: Select all
<?php if($this->stored === 1): ?>
                    <!-- Connect -->
                    <button type="submit" class="btn btn-primary btn-lg" name="wifiprofile[action]" value="connect">Connect</button>
                    <input type="hidden" name="wifiprofile[ssid]" value="<?=urldecode($this->uri(4)) ?>">
                    <input type="hidden" name="wifiprofile[nic]" value="<?=$this->uri(3) ?>">
                <?php elseif($this->stored === 1): ?>
                    <!-- Modify profile -->
                    <button type="submit" class="btn btn-primary btn-lg" name="nic[nic]" value="<?=$this->uri(3) ?>">Modify profile</button>
                    <input type="hidden" name="nic[currentssid]" value="<?=$this->nic->currentssid ?>">
                    <input type="hidden" name="nic[newssid]" value="<?=urldecode($this->uri(4)) ?>">
                <?php else: ?>

This else if, im guessing should of been if... Il keep updating as i go along ;)
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: Ability to edit wlan profiles (Dynamic -> Static)

Postby janui » 06 Feb 2018, 16:07

Hi irishwill2008,
The only options at the moment are...
Via the user interface:
Network > WLAN0 > Wi-Fi stored profiles - SHOW > ADD a new static profile or DELETE an existing profile and ADD a new one (as you say above, no edit feature)
Via SSH:
Examples of profiles are here: /etc/netctl/examples
Profiles need to be created in this directory: /etc/netctl
Profile file name is: <your network sysid>
To activate a new profile, you must disconnect and reconnect to the network, easiest and safest way is to reboot.
Not sure if it is OK or a problem to edit the WiFi profile on the fly? Maybe it was set up the way for a reason.
janui
User avatar
janui
 
Posts: 704
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Ability to edit wlan profiles (Dynamic -> Static)

Postby irishwill2008 » 07 Feb 2018, 10:06

Hi janui,

This modify option seems to be not connected to anything specificly, there is post options in the network_ctl file for "$_POST['nic']" but this seems to be only for adding, not editing... I think they devs left this option out (Which is why i guess they left the elseif knowing it will never enter seeing as the first If is the same statement so it would enter first if rather then elseif).

I could create my own but i just thought to save myself time it could be easier if this was already included but a small bug that could of been rectified! No worries, i already created pass scripts to automatically setup lan for me to a static ip so i can easily use this and have it edit the wlan profiles instead of eth0.

Thanks!

Again, if someone does come across something or even the DEVs can assist.. If of course this is found to be a bug then please let me know! Saves me time wasting xD

Cheers again 8-)
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 6 guests
cron