The source code posted by Des is all you need. You don’t need anything more from “thetechguide” link, just follow the directions at the top of this post. The patch is just for reference at this point.
Ah, sorry, my mistake
Should I just remove it from the archive then?
Cheers, Des.
the patch and resulting patched .c file can now be found at : baconbuttie.co.uk/asterisk/chan_bluetooth/
thanks to john (jrigg)
hello.
i want to install the chan_bluetooth on my asterisk 1.4 using jrigg’s batch ( baconbuttie.co.uk/asterisk/chan_bluetooth/ ).
But i have a very big probleme…
in this site where the way to do that is explained, crazygreek.co.uk/content/chan_bluetooth
i see :
[quote]- Edit channels/Makefile in the asterisk source distribution, and:
(1) add chan_bluetooth.so to the variable CHANNEL_LIBS, so you
have something like this:CHANNEL_LIBS=chan_bluetooth.so chan_modem.so chan_sip.so
chan_modem_aopen.so
chan_modem_bestdata.so chan_modem_i4l.so
chan_agent.so chan_mgcp.so chan_iax2.so
chan_local.so chan_skinny.so[/quote]
but in the channels/Makefiles, i don’t find any variable CHANNEL_LIBS… so i can not add chan_bluetooth.so to the variable that does not exist…
i make a grep in the asterisk 1.4 sources directory and there is no CHANNEL_LIBS in any file… (but there was a CHANNEL_LIBS in the makefile of asterisk 1.2)
do you know why ?
I really really hope someone will help me… i don’t know what to do.
Thank you.
All you have to do is put the chan_bluetooth.c in the channels directory and it will automatically be picked up and compiled.
However, I’m having trouble compiling. I don’t know if I didn’t get the differences done correctly or what. I get the errors:
chan_bluetooth/chan_bluetooth.c:1218: error: too few argu
ments to function `ast_channel_alloc’
chan_bluetooth/chan_bluetooth.c:3387: error: `AST_MODULE’ undeclared here (not in a function)
chan_bluetooth/chan_bluetooth.c:3387: error: initializer element is not constant
chan_bluetooth/chan_bluetooth.c:3387: error: (near initialization for `__mod_info.name’)
Perhaps someone could post the latests chan_bluetooth.c file ? I may have some other problems though. I had to manually copy the includes from the asterisk source dir back to /usr/include/asterisk. Should have had to do this ? Is the chan_bluetooth.c looking in the wrong place for includes ?
Any help would be appreciated.
i was working with Asterisk 1.2.15. I installed everything to make work the bluetooth connection as a GSM interface but unfortunately the audio from the remote mobile could not heared in my Xlite (soft phone). After this forum i decided to migrate to asterisk 1.4 as it seems there are some improvements. Following your steps, i downloaded asterisk 1.4 and copy the chan_bluetooth to channels folder. However i got the next errors when i do “make”
[CC] chan_bluetooth.c -> chan_bluetooth.o
chan_bluetooth.c:354: warning: initialization from incompatible pointer type
chan_bluetooth.c:393: warning: no previous prototype for ‘sock_err’
chan_bluetooth.c:402: warning: no previous prototype for ‘parse_clip’
chan_bluetooth.c:551: warning: no previous prototype for ‘set_buffer’
chan_bluetooth.c:575: warning: no previous prototype for ‘get_buffer’
chan_bluetooth.c: In function ‘sco_thread’:
chan_bluetooth.c:632: warning: unused variable ‘wlen’
chan_bluetooth.c: In function ‘blt_new’:
chan_bluetooth.c:1218: error: too few arguments to function ‘ast_channel_alloc’
chan_bluetooth.c:1223: warning: passing argument 1 of ‘snprintf’ discards qualifiers from pointer target type
chan_bluetooth.c: At top level:
chan_bluetooth.c:1824: warning: no previous prototype for ‘ag_unknown_response’
chan_bluetooth.c:1834: warning: no previous prototype for ‘ag_cgmi_response’
chan_bluetooth.c:1855: warning: no previous prototype for ‘ag_cgmi_valid_response’
chan_bluetooth.c:1870: warning: no previous prototype for ‘ag_clip_response’
chan_bluetooth.c:1877: warning: no previous prototype for ‘ag_cmer_response’
chan_bluetooth.c:1886: warning: no previous prototype for ‘ag_cind_status_response’
chan_bluetooth.c:1895: warning: no previous prototype for ‘ag_cind_response’
chan_bluetooth.c:1903: warning: no previous prototype for ‘ag_brsf_response’
chan_bluetooth.c: In function ‘try_connect’:
chan_bluetooth.c:2284: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c: In function ‘handle_incoming’:
chan_bluetooth.c:2463: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
chan_bluetooth.c: In function ‘handle_incoming_sco’:
chan_bluetooth.c:2514: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
chan_bluetooth.c:2524: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c:2532: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c: In function ‘blt_parse_config’:
chan_bluetooth.c:2982: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:2984: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3005: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3008: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3011: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c: At top level:
chan_bluetooth.c:3175: warning: initialization from incompatible pointer type
chan_bluetooth.c:3187: warning: no previous prototype for ‘remove_sdp_records’
chan_bluetooth.c:3270: warning: function declaration isn’t a prototype
chan_bluetooth.c: In function ‘load_module’:
chan_bluetooth.c:3279: warning: implicit declaration of function ‘unload_module’
chan_bluetooth.c: At top level:
chan_bluetooth.c:3359: warning: no previous prototype for ‘unload_module’
chan_bluetooth.c:3368: warning: function declaration isn’t a prototype
chan_bluetooth.c:3377: warning: function declaration isn’t a prototype
chan_bluetooth.c:3383: warning: function declaration isn’t a prototype
chan_bluetooth.c: In function ‘role2str’:
chan_bluetooth.c:370: warning: control reaches end of non-void function
make[1]: *** [chan_bluetooth.o] Error 1
make: *** [channels] Error 2
I removed my asterisk 1.2.15 before doing that with:
rm -rf /etc/asterisk
rm -f /etc/zaptel.conf
rm -rf /var/log/asterisk
rm -rf /var/lib/asterisk
rm -rf /var/spool/asterisk
rm -rf /usr/lib/asterisk
I really do not know what to do, any suggestion?
I am working in a mandriva 2007. I downloaded the svn asterisk and follow the intructions from saghul.net/blog/2007/02/02/h … -14-trunk/ . So far i check the connections with nokia 6830 and nokia 6111. It is just perfect!!! I am expecting to check it with a nokia 6233 but i guess it might be working as perfect as the rest!!
Good job!!
chan_cellphone (what you’re using) and chan_bluetooth are different apps.
Sorry about that,
After checking that chan_bluetooth has no support, I decided to look for the chan_cellphone options. I am pretty sure that chan_bluetooth just works with some sony ericssons but not with nokias and all motorolas.
According to that i might made a mistake posting that in this forum, sorry about that, but it is true that if you migrate to a svn asterisk trunk and use the chan_cellphone most of the nokias at list will work!!
not flaming, just wanted to point out that a) it’s a different application, and b) it’s 1.4 trunk only.
it’s also a shame that dev stopped on it, but i know theo has been busy with his current venture(s).
I have some problems compilling chan_bluetooth.c
[CC] chan_bluetooth.c -> chan_bluetooth.o
chan_bluetooth.c:268: warning: no semicolon at end of struct or union
chan_bluetooth.c:354: warning: initialization from incompatible pointer type
chan_bluetooth.c:393: warning: no previous prototype for ‘sock_err’
chan_bluetooth.c: In function ‘sock_err’:
chan_bluetooth.c:396: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c: At top level:
chan_bluetooth.c:402: warning: no previous prototype for ‘parse_clip’
chan_bluetooth.c:551: warning: no previous prototype for ‘set_buffer’
chan_bluetooth.c:575: warning: no previous prototype for ‘get_buffer’
chan_bluetooth.c: In function ‘sco_thread’:
chan_bluetooth.c:632: warning: unused variable ‘wlen’
chan_bluetooth.c: In function ‘blt_new’:
chan_bluetooth.c:1218: error: too few arguments to function ‘ast_channel_alloc’
chan_bluetooth.c:1223: warning: passing argument 1 of ‘snprintf’ discards qualifiers from pointer target type
chan_bluetooth.c: At top level:
chan_bluetooth.c:1824: warning: no previous prototype for ‘ag_unknown_response’
chan_bluetooth.c:1834: warning: no previous prototype for ‘ag_cgmi_response’
chan_bluetooth.c:1855: warning: no previous prototype for ‘ag_cgmi_valid_response’
chan_bluetooth.c:1870: warning: no previous prototype for ‘ag_clip_response’
chan_bluetooth.c:1877: warning: no previous prototype for ‘ag_cmer_response’
chan_bluetooth.c:1886: warning: no previous prototype for ‘ag_cind_status_response’
chan_bluetooth.c:1895: warning: no previous prototype for ‘ag_cind_response’
chan_bluetooth.c:1903: warning: no previous prototype for ‘ag_brsf_response’
chan_bluetooth.c: In function ‘try_connect’:
chan_bluetooth.c:2284: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c: In function ‘handle_incoming’:
chan_bluetooth.c:2463: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
chan_bluetooth.c: In function ‘handle_incoming_sco’:
chan_bluetooth.c:2514: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
chan_bluetooth.c:2524: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c:2532: warning: pointer targets in passing argument 5 of ‘getsockopt’ differ in signedness
chan_bluetooth.c: In function ‘blt_parse_config’:
chan_bluetooth.c:2982: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:2984: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3005: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3008: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c:3011: warning: assignment discards qualifiers from pointer target type
chan_bluetooth.c: At top level:
chan_bluetooth.c:3175: warning: initialization from incompatible pointer type
chan_bluetooth.c:3187: warning: no previous prototype for ‘remove_sdp_records’
chan_bluetooth.c:3270: warning: function declaration isn’t a prototype
chan_bluetooth.c: In function ‘load_module’:
chan_bluetooth.c:3279: warning: implicit declaration of function ‘unload_module’
chan_bluetooth.c: At top level:
chan_bluetooth.c:3359: warning: no previous prototype for ‘unload_module’
chan_bluetooth.c:3368: warning: function declaration isn’t a prototype
chan_bluetooth.c:3377: warning: function declaration isn’t a prototype
chan_bluetooth.c:3383: warning: function declaration isn’t a prototype
make[1]: *** [chan_bluetooth.o] Error 1
make: *** [channels] Error 2
My asterisk source is 1.4.1
have you tried using trunk rather than a release ?
Same error
( svn checkout svn.digium.com/svn/asterisk/trunk asterisk-trunk )
i’ve just checked out trunk, patched with chan_cellphone16 and it’s fine. did you run bootstrap.sh before configure ? have you met all the dependencies for the module ?
Yep, i’ve tried the same - patching with chan_cellphone16 and it’s working. Tonight i’ll test it with my cell phone.
But chan_cellphone.c and chan_bluetooth.c are different channels, right?
totally different … and from different people. chan_cellphone seems to be getting a lot more dev input at the moment, and is shaping up to be an absolute killer of an app, especially now it has headset support and looks like SMS messaging is going to be part of it too.