LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-01-2019, 11:15 AM   #1
alex.pujols
LQ Newbie
 
Registered: May 2005
Location: Texas
Distribution: Slackware64-current
Posts: 17

Rep: Reputation: 0
Question Slackware-current, bluetooth headphones, and pulseaudio. Why is this working for me?


This is an interesting post for me in that I found a workaround to my original challenges getting BT audio up for a new pair of headphones in Slackware-current. The challenge I have is I'm not %100 sure why my workaround is working and wanted to share in case anyone else can provide any thoughts or insights. If anyone has any ideas why I'm seeing this behavior in pulse please share. Thanks in advance!

So what's going on? Well, I bought a new pair of Sony 1000XM3 BT headphones and wanted to connect them to my Slackware-current ASUS UX303U laptop with a Sabarent 4.2 USB dongle. After first plugging in the USB dongle I realized that no BT unit was being detected so I rebuilt my 4.18.10 kernel with the appropriate BT drivers and Le voilą, we have BT interfaces!

Code:
bash-4.4$ lsusb | grep Blue
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Code:
bash-4.4$ lsmod | grep blue
bluetooth             401408  59 btrtl,btintel,btbcm,btusb,rfcomm
ecdh_generic           24576  3 bluetooth
rfkill                 24576  7 asus_wmi,bluetooth,cfg80211
Code:
hci1:	Type: Primary  Bus: USB
	BD Address: A4:02:B9:70:10:1A  ACL MTU: 1021:5  SCO MTU: 96:6
	UP RUNNING 
	RX bytes:2211 acl:0 sco:0 events:235 errors:0
	TX bytes:39133 acl:0 sco:0 commands:234 errors:0

hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:13  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING PSCAN 
	RX bytes:1232 acl:0 sco:0 events:74 errors:0
	TX bytes:2546 acl:0 sco:0 commands:74 errors:0
Now came, pairing and connecting the BT audio unit. I choose to do this via gui in XFCE using the Blueman-applet 2.0.7. Simple enough I loaded up XFCE 4.12, clicked on Blueman, "setup new device" then began the pairing process. Here is where things started to get a little interesting... The headphones were discovered and paired successfully, however they would not "connect". Instead I got this error in Blueman when attempting to connect...

Quote:
Connection Failed: blueman bluez.errors DBusFailedError: Protocol not available
After seeing this I started to take a look at the BT configs, google my ass off, then start to look into the connection between Blueman and Pulse.

Code:
bash-4.4$ pulseaudio --version
pulseaudio 12.2-rebootstrapped

I noticed something a little interesting. The bluetooth modules listed in default.pa where not loading on boot. When using pactl list to query loaded modules nothing was returned even though pulse was showing as running using ps -aux under process 1741.

Code:
bash-4.4$ sudo pactl list | grep blue
bash-4.4$
Code:
bash-4.4$ sudo ps -aux | grep pulse
pulse     1741  0.0  0.1 339808 22548 ?        S<l  05:49   0:00 /usr/bin/pulseaudio --system --disallow-module-loading
pooh      2374  0.0  0.2 337828 33552 tty1     Sl   05:57   0:02 /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libpulseaudio-plugin.so 14 12582952 pulseaudio PulseAudio Plugin Adjust the audio volume of the PulseAudio sound system
pooh     27144  0.0  0.0   5988  2384 pts/7    S+   07:17   0:00 grep pulse

One of the things that was nagging me, but I'm not sure if it's related to the issue is the fact that the system loaded pulse-audio is loaded with the
Quote:
--disallow-module-loading
option. I've been wondering if this has anything to do with the fact that the BT modules listed in default.pa aren't showing. Maybe someone can help me here?

Anyway, next I tried to kill pulseaudio (-k) and restart from command-line (this also works without killing the original instance and just starting a new pulse process) to see if that would provide any additional insights. A few interesting things happened here.. First upon restart I got an ofono error (though the service did restart fine).

Code:
bash-4.4$ sudo pulseaudio
E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
Now we see a new instance of pulse as process 27233. Is 1741 the instance of pulse called during boot? If so, why doesn't it load modules? hmmm

Code:
bash-4.4$ ps -aux | grep pulse
pulse     1741  0.0  0.1 339808 22548 ?        S<l  05:49   0:00 /usr/bin/pulseaudio --system --disallow-module-loading
pooh      2374  0.0  0.2 337828 33552 tty1     Sl   05:57   0:02 /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libpulseaudio-plugin.so 14 12582952 pulseaudio PulseAudio Plugin Adjust the audio volume of the PulseAudio sound system
pooh     27233  0.0  0.1 266412 23036 pts/7    Sl+  07:20   0:00 pulseaudio
pooh     27234  0.0  0.0 272212  8288 pts/7    Sl+  07:20   0:00 /usr/libexec/pulse/gsettings-helper
pooh     27497  0.0  0.0   5988  2388 pts/8    S+   07:28   0:00 grep pulse
But more importantly the Pulse audio bluetooth modules seem to correctly load after the manual (re)load at bash.

Code:
bash-4.4$ sudo pactl list | grep blue
	Name: module-bluetooth-policy
		module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
	Name: module-bluetooth-discover
	Name: module-bluez5-discover
With the BT modules now up I can access pavucontrol and notice that my headphones are now listed as an output option. Upon using mplayer to play an MP3 and chrome/ffox to load a youtube video and I can now verify that audio is working through my bluetooth headset. Even though it is working I have many lingering questions..
  1. Why does Slackware not start pulse with modules loaded? Is this specific to my setup or have others dealt with this?
  2. What is the orfono error?
  3. Is the "Connection Failed: blueman bluez.errors DBusFailedError: Protocol not available" error because blueman relies on pulse to provide the modules needed to load the BT device as a handset?
  4. Does "--disallow-module-loading" have anything to do with requireing another instance of pulse to be run?
  5. How can I best automate this?
  6. What am I missing? pulse is a newer sound system for me so I'm just looking to learn so if there is a question I should be asking, lemme know.

Thanks in advance for anyone who wants to dive in and help me understand what's going on!

Regards,
AP


--------------------

** default.pa **
Code:
bash-4.4$ cat /etc/pulse/default.pa
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)
# 
# this file sits in /etc/pulse/ directory

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### ADDED BY POOH to try and correct pulse auto detect issue
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input
 
Old 01-01-2019, 05:22 PM   #2
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 836

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
First, Pulseaudio is a piece of SW (in my opinion it should be called incomplete&unstable work/crap) that you need to treat with respect, be happy that it works and never ask why. If you're a patient person and have plenty of time to waste, you can try to make some sense of this official "documentation", that's what they call it:
https://www.freedesktop.org/wiki/Sof...Documentation/
In addition, this is the unofficial one and maybe a little more comprehensive:
https://gavv.github.io/articles/puls...nder-the-hood/

Back to your questions, I'm still using pulseaudio 9, the last one I was happy with, and I also noticed that I was not able to load modules, although the option allow-module-loading from /etc/pulse/daemon.conf should have been active (yes) by default. I went on and copied that option and removed the comment - ;
/etc/pulse/daemon.conf
Code:
; allow-module-loading = yes
allow-module-loading = yes
The last time I tried to make a bluetooth headset work, I had to put these records in /etc/pulse/default.pa
Code:
### BT modules
load-module module-bluetooth-policy
load-module module-bluez5-device
load-module module-bluez5-discover
These records will also "automate" the loading of the modules.

Besides, off the record, just to give you an example, I'm still failing to make pulseaudio work over the network.
The official "documentation" recommends to use:
Code:
load-module module-esound-protocol-tcp auth-anonymous=1
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16
Doesn't work! 127.0.0.1; is not tolerated.
https://www.freedesktop.org/wiki/Sof...work/#index1h2

And what I (google) came up with, almost (still some incorrect tcp checksums) working, is this (BTW, specifying a port is nowhere documented):
Code:
pactl load-module module-native-protocol-tcp auth-ip-acl=10.0.0.0/24 auth-anonymous=1 port=9000
But I gave up, too much time wasted already on work that has no finality.

Have fun!
 
1 members found this post helpful.
Old 01-03-2019, 09:41 AM   #3
alex.pujols
LQ Newbie
 
Registered: May 2005
Location: Texas
Distribution: Slackware64-current
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the insights Abga. Should you wish to dive back in to your specific issue I wish you the best of luck!
 
Old 01-04-2019, 03:07 PM   #4
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-14.2
Posts: 287

Rep: Reputation: 111Reputation: 111
I'm reading this while waiting on laptop to finish upgrading to -current, to see if that would fix this same issue. Something must have happened, because my sen.hd1 headphones have been working fine on that laptop under 14.2--but I do keep up with patches and kernel changes, but not which one precisely caused the change to where I get the same Dbus Service Unknown error when trying to connect to paired headset. I'm glad this thread has suggested something if I'm still getting the error when I try in -current, in a few minutes, when it's through upgrading.
 
Old 01-09-2019, 04:35 AM   #5
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-14.2
Posts: 287

Rep: Reputation: 111Reputation: 111
current didn't fix it: got a message when starting x: failed to apply network settings; You might not be able to connect to the bluetooth network via this machine; Exception: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1

I made abga's changes to daemon.conf and default.pa, but still BT headphones still failed.
 
Old 01-09-2019, 04:43 PM   #6
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 836

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Your DBus error seems to be related to the bluetooth network functionality and not to the audio. For further investigation you'll need to generate a DBus log and check which component is not properly loading, throwing the "well-known core error":
Quote:
Exception: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
https://freedesktop.org/wiki/Softwar...BindingErrors/

Now, DBus is launched in /etc/rc.d/rc.messagebus with the output directed to /dev/null
Code:
/usr/bin/dbus-daemon --system 1> /dev/null
And you'll need to temporarily direct it to a log file and study it.
Some references (skip to the last part of the post - there are a lot of stupid log paste sections in the beginning):
https://github.com/blueman-project/blueman/issues/190

Back to the audio functionality, please post the outputs of:
Code:
/usr/bin/pactl list sources short
/usr/bin/pactl list sinks short
/usr/bin/pactl list cards
 
1 members found this post helpful.
Old 01-10-2019, 07:32 AM   #7
alex.pujols
LQ Newbie
 
Registered: May 2005
Location: Texas
Distribution: Slackware64-current
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you for the insights on the dbus error abga. I will take a look at that this weekend and see what I can come up with.

Regarding the pactl outputs, see below...


Code:
bash-4.4$ sudo pactl list sources short
0	alsa_output.pci-0000_00_1f.3.analog-stereo.monitor	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
1	alsa_input.pci-0000_00_1f.3.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED

Code:
bash-4.4$ sudo pactl list sinks short
0	alsa_output.pci-0000_00_1f.3.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED

Code:
bash-4.4$ sudo pactl list cards
Card #0
	Name: alsa_card.pci-0000_00_1f.3
	Driver: module-alsa-card.c
	Owner Module: 4
	Properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xdf228000 irq 124"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "9d70"
		device.product.name = "Sunrise Point-LP HD Audio"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Profiles:
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: yes)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5965, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:analog-stereo+input:analog-stereo
	Ports:
		analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo
		analog-input-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-input-microphone"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo
		analog-output-speaker: Speakers (priority: 10000, latency offset: 0 usec)
			Properties:
				device.icon_name = "audio-speakers"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
			Properties:
				device.icon_name = "audio-headphones"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
		hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec)
			Properties:
				device.icon_name = "video-display"
			Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo
Let me know if this helps. Happy to provide any more outputs

ap
 
Old 01-10-2019, 07:37 PM   #8
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 836

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
@alex.pujols
I was replying to slac-in-the-box's post #5, but he already got some clues about his BT connectivity (blueman) issues in another thread:
https://www.linuxquestions.org/quest...0/#post5946506

You stated that your bluetooth headphones were actually working, do you also have the blueman - DBus issue slac-in-the-box has reported in post #5 ?
 
Old 01-11-2019, 09:07 AM   #9
alex.pujols
LQ Newbie
 
Registered: May 2005
Location: Texas
Distribution: Slackware64-current
Posts: 17

Original Poster
Rep: Reputation: 0
@abga, got it! I missed that originally.

My dbus error is slightly different
Code:
E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
I'll troubleshoot it this weekend. tnx

ap
 
Old 01-13-2019, 05:10 AM   #10
tramtrist
LQ Newbie
 
Registered: Jul 2018
Location: Detroit, MI / Nagoya JP
Distribution: Slackware, Debian Buster
Posts: 22

Rep: Reputation: Disabled
Having exactly the same issues as OP with my Sony bluetooth headphones.
4.19.14 kernel on -current
Exactly same error logs as well.

EDIT: After adding the modules in the abga's #2 post into default.pa nothing worked but after I ran "updatedb" I could suddenly connect via bluetoothctl ..... This makes no sense to me at all. I must have fixed it another way

Last edited by tramtrist; 01-13-2019 at 05:27 AM.
 
Old 01-13-2019, 11:16 AM   #11
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 836

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Quote:
Originally Posted by tramtrist View Post
EDIT: After adding the modules in the abga's #2 post into default.pa nothing worked but after I ran "updatedb" I could suddenly connect via bluetoothctl ..... This makes no sense to me at all. I must have fixed it another way
You always need to restart pulseaudio after changing its config.
Code:
/usr/bin/pulseaudio -k
/usr/bin/pulseaudio -D
 
Old 01-16-2019, 01:46 PM   #12
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 836

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
@alex.pujols
Had a short search on the web after your error:
Code:
E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
And found:
https://en.wikipedia.org/wiki/OFono
https://01.org/ofono
Source (can be compiled & installed):
https://mirrors.edge.kernel.org/pub/...network/ofono/

It appears to be something that can be ignored if you don't need that functionality and only use audio over BT.

Last edited by abga; 01-16-2019 at 01:49 PM. Reason: wrong ofono project URL
 
  


Reply

Tags
pulseaudio, slackare, slackware current


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Issues with rtl8723be Bluetooth & Philips SHB3060 bluetooth headphones sabaton Linux - Laptop and Netbook 1 04-18-2018 03:57 PM
[SOLVED] current 14.2RC2 Pulseaudio and headphones Nille_kungen Slackware 10 04-24-2016 10:37 AM
Alsa PulseAudio only headphones not working master channel firedrake Slackware 7 07-20-2013 05:31 AM
Stereo bluetooth headphones vs Wired Headphones WHITE_POWER General 2 06-04-2013 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration