Re: freebsd bluetooth
Добавлено: 2008-12-02 3:36:07
с патчем вроде поддерживаеться
У русских простые принципы в жизни: голодного - накормить, замерзшего - согреть, утопающего - спасти, охуевшего - отпиздить
https://forum.lissyara.su/
А что за патч? Сходу не нашел. Восемь месяцев назад Максим добавил "Add support for the NAP, GN and PANU profiles to the sdpd(8)." Пока это все.paradox писал(а):с патчем вроде поддерживаеться
Да, их btpand с вашим стеком хорошо портируется. Но вот проблема остается в самом запуске стека. Покручу сегодня.paradox писал(а):в нетбсд есть pan демон
поскольку я уже все портировал
то портировать эту программу уже думаю несоставит у вас сложности
Да, факт. Все равно посмотрим.paradox писал(а):да там у них фикс чуть ли не в само ядро
ну пробуй))
Нет, все нормально. Устройства пингуются, коннектятся и т.п.paradox писал(а): кстати а с родным стеком бсдшным так же лагает?
Попробовал все патчи в том PR, которые касались ubt.c и hci_unit.c -- не помогло. UBT_DEBUG и BLUETOOTH_DEBUG выводят почти все тоже, что и там в PR.paradox писал(а):ну если с родными бсдшными работают значит это токо в ubt.c нужно посмотреть и поправить....
Ради интереса отключил в BIOS USB 2.0 support, думал может без EHCI заработает. Но и с UHCI тоже самое.paradox писал(а):а то я думал мож проблема в usb стеке..
Код: Выделить всё
[20:37] ~/tmp/bluetooth> uname -v
FreeBSD 7.1-RC2 #3: Tue Dec 30 14:26:28 MSK 2008 root@eeepc.workgroup:/home/root/obj/usr/src/sys/EEE_HEAD
Код: Выделить всё
[20:25] /usr/ports> cd ~/tmp/bluetooth
[20:34] ~/tmp/bluetooth> make
===> lib (all)
===> lib/libbluetooth (all)
Warning: Object directory not changed from original /home/root/tmp/bluetooth/lib/libbluetooth
cc -O2 -fno-strict-aliasing -pipe -I/home/root/tmp/bluetooth/lib/libbluetooth -fstack-protector -c bluetooth.c
In file included from bluetooth.c:37:
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:41:29: error: netbt/bluetooth.h: No such file or directory
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:42:23: error: netbt/hci.h: No such file or directory
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:43:25: error: netbt/l2cap.h: No such file or directory
In file included from bluetooth.c:37:
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:64: error: expected ')' before 'const'
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:65: error: expected declaration specifiers or '...' before 'bdaddr_t'
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:67: error: expected declaration specifiers or '...' before 'bdaddr_t'
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:68: error: expected ';', ',' or ')' before '*' token
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:76: error: expected specifier-qualifier-list before 'bdaddr_t'
/home/root/tmp/bluetooth/lib/libbluetooth/bluetooth.h:83: error: expected specifier-qualifier-list before 'bdaddr_t'
bluetooth.c:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'host_addr'
bluetooth.c: In function 'bt_gethostbyaddr':
bluetooth.c:88: error: 'bdaddr_t' undeclared (first use in this function)
bluetooth.c:88: error: (Each undeclared identifier is reported only once
bluetooth.c:88: error: for each function it appears in.)
bluetooth.c: In function 'bt_gethostent':
bluetooth.c:127: error: 'host_addr' undeclared (first use in this function)
bluetooth.c:127: error: too many arguments to function 'bt_aton'
bluetooth.c: At top level:
bluetooth.c:277: error: expected ')' before 'const'
bluetooth.c:291: error: expected declaration specifiers or '...' before 'bdaddr_t'
bluetooth.c: In function 'bt_aton':
bluetooth.c:296: error: 'ba' undeclared (first use in this function)
*** Error code 1
Stop in /home/root/tmp/bluetooth/lib/libbluetooth.
*** Error code 1
Stop in /home/root/tmp/bluetooth/lib.
*** Error code 1
Stop in /home/root/tmp/bluetooth.
Код: Выделить всё
/bluetooth/netbt/bluetooth.h
/bluetooth/netbt/hci.h
/bluetooth/netbt/sco.h
/bluetooth/netbt/l2cap.h
/bluetooth/netbt/rfcomm.h
Код: Выделить всё
/usr/include/netbt/
Код: Выделить всё
===> lib/libprop (all)
Warning: Object directory not changed from original /home/root/tmp/bluetooth/lib/libprop
cc -O2 -fno-strict-aliasing -pipe -D_LIBPROP -D_REENTRANT -I/home/root/tmp/bluetooth/lib/libprop -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wno-uninitialized -Wno-pointer-sign -c prop_array.c
cc -O2 -fno-strict-aliasing -pipe -D_LIBPROP -D_REENTRANT -I/home/root/tmp/bluetooth/lib/libprop -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wno-uninitialized -Wno-pointer-sign -c prop_bool.c
cc1: warnings being treated as errors
prop_bool.c: In function '_prop_bool_free':
prop_bool.c:71: warning: unused parameter 'v'
*** Error code 1
paradox писал(а):покажите версиюКод: Выделить всё
gcc -v
Код: Выделить всё
[21:31] ~> gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719 [FreeBSD]
Код: Выделить всё
paradox@hosting[21:39:08]~/netbt/bluetooth/lib/libprop> uname -a
FreeBSD hosting.lissyara.su 7.1-RC2 FreeBSD 7.1-RC2 #0: Fri Dec 26 20:24:43 MSK 2008 lissyara@hosting.lissyara.su:/tmp/obj/usr/src/sys/hosting amd64
paradox@hosting[21:39:14]~/netbt/bluetooth/lib/libprop> gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719 [FreeBSD]
paradox@hosting[21:40:40]~/netbt/bluetooth/lib/libprop>
Код: Выделить всё
% dmesg | grep ubt0
ubt0: <Broadcom Corp BCM92045B3 ROM, class 224/1, rev 2.00/1.00, addr 4> on uhub0
ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, buffer size=294
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
Код: Выделить всё
% kldstat | grep ng_
16 1 0xc1654000 803c ng_ubt.ko
20 1 0xc6295000 1b000 ng_btsocket.ko
21 3 0xc62b0000 2000 ng_bluetooth.ko
23 1 0xc7205000 d000 ng_hci.ko
24 1 0xc7214000 10000 ng_l2cap.ko
25 1 0xc7226000 4000 ng_socket.ko
Код: Выделить всё
% hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfc
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfc
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfc
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfb
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfb
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:22:98:eb:af:39
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 5a:02:04
Clock offset: 0x5bfc
Inquiry complete. Status: No error [00]
Код: Выделить всё
device {
bdaddr 00:22:98:eb:af:39;
name "T700"
key nokey;
pin "1111";
}
Код: Выделить всё
00:22:98:eb:af:39 T700
Код: Выделить всё
beelinebt:
shell rfcomm_sppd -a T700 -t /dev/ttyp6
set log Chat Command
set device /dev/ttyp6
set speed 230400
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \
AT+CGDCONT=1,\\\"IP\\\",\\\"internet.beeline.ru\\\" OK \
AT+CGATT=1 OK \
\dATDT\\T TIMEOUT 40 CONNECT"
set logout "ABORT BUSY ABORT ERROR TIMEOUT 30 \
\"\" +++ATH OK-ATH-OK AT+CGATT=0 OK"
set mode background
set phone "*99***1#"
set authname beeline
set authkey beeline
set timeout 0
set ifaddr 0 0 255.255.255.0
#set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR
enable dns
Код: Выделить всё
% ppp -auto beelinebt
Loading /lib/libalias_cuseeme.so
Loading /lib/libalias_ftp.so
Loading /lib/libalias_irc.so
Loading /lib/libalias_nbt.so
Loading /lib/libalias_pptp.so
Loading /lib/libalias_skinny.so
Loading /lib/libalias_smedia.so
Working in auto mode
Using interface: tun0
ppp: Pausing until rfcomm_sppd finishes
rfcomm_sppd: Could not connect socket: Connection refused
Warning: ff02:5::/32: Change route failed: errno: Network is unreachable
от сволочи-Werror
Код: Выделить всё
WERROR=
WARNS=2
NO_WERROR=yes
NO_WARNS=
Тем не менее никакparadox писал(а):все собралось
ничего непонимаю
Прочитал. Ничего для себя не вынес.paradox писал(а):>iZEN
стяни архив который мы сдесь обсуждаем
там в редми я делал
для своего мотора gprs ppp для инета
когда уже поймешь как
можешь поробовать уже на родном блютуз стеке
хотя доков в инете полно.....
в lib/libprop помогло изменение Makefileparadox писал(а):от сволочи-Werror
пробуй по очереди один из этоих параметров добавть в MakefileКод: Выделить всё
WERROR= WARNS=2 NO_WERROR=yes NO_WARNS=
в той папаке где не собралось
скажешь какой поможеться
Код: Выделить всё
-WARNS=4
+WARNS=2
Код: Выделить всё
WARNS?= 2
+NO_WARNS=
Код: Выделить всё
CFLAGS+= -I../
+WERROR=
Код: Выделить всё
CFLAGS+= -I../
+WERROR=