def address_():
 ret = {}
 cmd = 'hciconfig'
 out = __salt__['cmd.run'](cmd).splitlines()
 dev = ''
 for line in out:
  if line.startswith('hci'):
   comps = line.split(':')
   dev = comps[0]
   ret[dev] = {'device': dev, 'path': '/sys/class/bluetooth/{0}'.format(dev)}
  if ('BD Address' in line):
   comps = line.split()
   ret[dev]['address'] = comps[2]
  if ('DOWN' in line):
   ret[dev]['power'] = 'off'
  if ('UP RUNNING' in line):
   ret[dev]['power'] = 'on'
 return ret

def address_ ( ) : ret = { } cmd = 'hciconfig' out = __salt__ [ 'cmd.run' ] ( cmd ) . splitlines ( ) dev = '' for line in out : if line . startswith ( 'hci' ) : comps = line . split ( ':' ) dev = comps [ 0 ] ret [ dev ] = { 'device' : dev , 'path' : '/sys/class/bluetooth/{0}' . format ( dev ) } if ( 'BD Address' in line ) : comps = line . split ( ) ret [ dev ] [ 'address' ] = comps [ 2 ] if ( 'DOWN' in line ) : ret [ dev ] [ 'power' ] = 'off' if ( 'UP RUNNING' in line ) : ret [ dev ] [ 'power' ] = 'on' return ret
get the many addresses of the bluetooth adapter cli example: .