nymea / berrylan

Raspberry Pi WiFi setup
http://berrylan.org
GNU General Public License v3.0
338 stars 56 forks source link

Change Advertised Name #66

Closed rnehrboss closed 2 years ago

rnehrboss commented 3 years ago

Great project.
Can you point me to where I can change the advertised name in bluetooth?

I have a situation where there might be multiple devices started at the same time, and we'd like to uniquely identify them (either through mac address or serial number) something like ACME-00000002 and ACME-00000000001. Currently we use a get serial number from /proc/cpuinfo with this code:


              def getserial():
                # Extract serial from cpuinfo file
                cpuserial = "0000000000000000"
                try:
                  f = open('/proc/cpuinfo','r')
                  for line in f:
                    if line[0:6]=='Serial':
                      cpuserial = line[10:26]
                  f.close()
                except:
                  cpuserial = "ERROR000000000"

                return cpuserial

Thanks

mzanetti commented 2 years ago

As described here: https://github.com/nymea/nymea-networkmanager, the config file is in /etc/nymea/nymea-networkmanager.conf, or, the name can also be passed via command line parameters when running nymea-networkmanager.