OESF Portables Forum

Model Specific Forums => Gemini PDA => Gemini PDA - Linux => Topic started by: skodaczar on July 03, 2018, 07:23:37 am

Title: Connman not saving passphrases
Post by: skodaczar on July 03, 2018, 07:23:37 am
Hello all,

Possibly clueless newbie question spoiler alert...

I have flashed my wifi-only Gemini to dual-boot and am generally loving it. One niggle is that Conmann doesn't remember my network and passphrase/password after I reboot, meaning I need to enable network access, find my network and type in my passphrase whenever I switch from Android to Debian.

How can I make Connman remember my network and passphrase and, ideally, reconnect whenever I reboot?

Thanks for your patience with a new user.
Title: Connman not saving passphrases
Post by: DonOregano on July 03, 2018, 09:17:16 am
Well, strangely enough I had the same problem while I had my Gemini flashed without a proper NVRAM (as described in https://www.oesf.org/forum/index.php?showto...p;#entry288378) (https://www.oesf.org/forum/index.php?showtopic=35296&st=0&gopid=288378&#entry288378)). When I reflashed with my backed up NVRAM passwords got saved correctly again.

Most likely that is not your issue, though. But I thought it worth mentioning anyway...
Title: Connman not saving passphrases
Post by: SNi on July 04, 2018, 06:13:11 pm
Mine keeps my WiFi password, etc. and other setups, EXCEPT every time I switch to Debian it doesn't retain the time zone..
Title: Connman not saving passphrases
Post by: epertinez on July 12, 2018, 03:28:21 am
Did anybody figure out how to solve it? Where is the data supposed to be stored? It happens to me both with Connman and with Synergy. Did anybody found a workaround? Having to activate Wifi, choose Wifi spot and Passphrase makes the system little usable.
Title: Connman not saving passphrases
Post by: Adam Boardman on July 12, 2018, 06:16:26 am
I only ever had issues with connman storing passwords with the very first DebianTP1 and after an apt upgrade etc it has since worked fine. Whilst it was refusing to remember anything it was also getting a new IP address from my router via DHCP which indicates that its reading/setting of the MAC address was also confused.
Title: Connman not saving passphrases
Post by: tuk0z on July 04, 2019, 10:27:35 am
Same issue with Connman forgetting my WiFi network and passphrase everytime I reboot.
Have a Gemini WiFi flashed with Flashtool and images from 2019-06. Gemian is up-to-date, no other sources added than Debian backports (problem pre-existed).
Title: Connman not saving passphrases
Post by: mithrandir on July 05, 2019, 06:28:37 am
Recently there has been reported an issue with the new firmware. The mac id changed on reboot. Conman stores the keys per mac id, thus the saved one from the boot before is not being used.
@see: https://www.oesf.org/forum/index.php?showto...35793&st=45 (https://www.oesf.org/forum/index.php?showtopic=35793&st=45)

The
chattr +i /nvdata/APCFG/APRDEB/WIFI
part seems to have done the trick.
Title: Connman not saving passphrases
Post by: pbek on July 25, 2019, 02:39:21 am
Since Android is generating a new mac address for your wifi interface at every reboot and Connman is storing the mac address in its services you would need to enter your wifi passwords every time you reboot.

Fortunately there is a way to lock the mac address.

1) install hexedit:
Code: [Select]
sudo apt install hexedit
2)
Code: [Select]
sudo hexedit /nvdata/APCFG/APRDEB/WIFI and set a mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0)

3) set the i attr on the file:
Code: [Select]
sudo chattr +i /nvdata/APCFG/APRDEB/WIFI
This will lock down the mac address.

I've updated DebianTP3 Wiki (https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP3#connman) and other wiki entries.
Title: Connman not saving passphrases
Post by: Thiago Alves on July 25, 2019, 08:39:10 am
Quote from: pbek
2)
Code: [Select]
sudo hexedit /nvdata/APCFG/APRDEB/WIFI and set a mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0)
It doesn't let me write to the file, even on root. I tried changing permissions but it also failed:
Code: [Select]
sudo chmod +w /nvdata/APCFG/APRDEB/WIFI
chmod: changing permissions of '/nvdata/APCFG/APRDEB/WIFI': Operation not permitted
Title: Connman not saving passphrases
Post by: bled82 on September 11, 2019, 10:36:49 pm
any idea where or what the file name is in sailfish ? trying to run sailfish only .
Title: Connman not saving passphrases
Post by: n3w_b00n on October 06, 2019, 10:22:03 am
Quote from: pbek
Fortunately there is a way to lock the mac address.

1) install hexedit:
Code: [Select]
sudo apt install hexedit
2)
Code: [Select]
sudo hexedit /nvdata/APCFG/APRDEB/WIFI and set a mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0)

3) set the i attr on the file:
Code: [Select]
sudo chattr +i /nvdata/APCFG/APRDEB/WIFI
Hello.

I have executed these steps several times with hexedit and the i attr, but unfortunately they have no effect. Every time I reboot, the mac address in the file /nvdata/APCFG/APRDEB/WIFI is changed back to the old one and I need to reconnect the wireless network. What am I doing wrong? Did I miss something?

I'm not sure if I made the correct input, so I added a picture. My Gemini PDA runs Android 8.1 and Debian.
Title: Connman not saving passphrases
Post by: gemini_user_j on April 14, 2020, 07:16:59 am
Quote from: n3w_b00n
Quote from: pbek
Fortunately there is a way to lock the mac address.

1) install hexedit:
Code: [Select]
sudo apt install hexedit
2)
Code: [Select]
sudo hexedit /nvdata/APCFG/APRDEB/WIFI and set a mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0)

3) set the i attr on the file:
Code: [Select]
sudo chattr +i /nvdata/APCFG/APRDEB/WIFI
Hello.

I have executed these steps several times with hexedit and the i attr, but unfortunately they have no effect. Every time I reboot, the mac address in the file /nvdata/APCFG/APRDEB/WIFI is changed back to the old one and I need to reconnect the wireless network. What am I doing wrong? Did I miss something?

I'm not sure if I made the correct input, so I added a picture. My Gemini PDA runs Android 8.1 and Debian.

Your clue is in the photo: You started inputting data on field number 6 counting from 1, try starting your input one field to the left.
Title: Re: Connman not saving passphrases
Post by: kat_the_fritz on September 19, 2021, 12:10:59 pm

1) install hexedit:
Code: [Select]
sudo apt install hexedit
2)
Code: [Select]
sudo hexedit /nvdata/APCFG/APRDEB/WIFI and set a mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0)

3) set the i attr on the file:
Code: [Select]
sudo chattr +i /nvdata/APCFG/APRDEB/WIFI

Followed your instructions on latest sailfish os (4.2.0.21) and finally wifi password is remembered after reboot. Only difficulty is that hexedit seems to be broken a little bit (first line is not displayed correctly), so inserting the MAC at the correct address is not so straigtforward. I did the editing on my PC.

THANKS!