Initialize structure main_opts, set its pagable and connectable, also set its default name;
Parse the command line options;
Check if single instance, otherwise exit;
Create and bind HCI socket server;
Load main.conf options;
Call g_io_add_watch to add io channels;
Get D-Bus system path;
Register to the D-Bus system bus;
Start SDP server;
initialize SDP server;
Register the public browse group root;
Register SDP server’s service record;
Creating L2CAP socket server l2cap_sock;
Create local unix socket unix_sock;