Author Topic: Connman not saving passphrases  (Read 3325 times)

skodaczar

  • Newbie
  • *
  • Posts: 1
    • View Profile
Connman not saving passphrases
« 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.
« Last Edit: July 03, 2018, 07:27:40 am by skodaczar »

DonOregano

  • Newbie
  • *
  • Posts: 24
    • View Profile
Connman not saving passphrases
« Reply #1 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). 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...

SNi

  • Full Member
  • ***
  • Posts: 105
    • View Profile
    • http://www.sibelle.info
Connman not saving passphrases
« Reply #2 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..

epertinez

  • Newbie
  • *
  • Posts: 8
    • View Profile
Connman not saving passphrases
« Reply #3 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.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Connman not saving passphrases
« Reply #4 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.

tuk0z

  • Newbie
  • *
  • Posts: 45
    • View Profile
Connman not saving passphrases
« Reply #5 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).

mithrandir

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • http://www.mygnu.de
Connman not saving passphrases
« Reply #6 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

The
chattr +i /nvdata/APCFG/APRDEB/WIFI
part seems to have done the trick.

pbek

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • http://https://www.qownnotes.org
Connman not saving passphrases
« Reply #7 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 and other wiki entries.

Thiago Alves

  • Newbie
  • *
  • Posts: 12
    • View Profile
Connman not saving passphrases
« Reply #8 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

bled82

  • Newbie
  • *
  • Posts: 25
    • View Profile
Connman not saving passphrases
« Reply #9 on: September 11, 2019, 10:36:49 pm »
any idea where or what the file name is in sailfish ? trying to run sailfish only .

n3w_b00n

  • Newbie
  • *
  • Posts: 1
    • View Profile
Connman not saving passphrases
« Reply #10 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.
« Last Edit: October 06, 2019, 10:26:41 am by n3w_b00n »

gemini_user_j

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Connman not saving passphrases
« Reply #11 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.
Gemini PDA x27

kat_the_fritz

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Connman not saving passphrases
« Reply #12 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!