How to use obex-data-server to transfer a file on ARM-xScale platform (原创)

1.
接上文 obex-data-server 已经运行起来了
接下来就可以运行obex-data-server/test 下的ods-dbus-test 来测试OPP 功能了
# ./ods-dbus-test 00:1B:FB:17:6B:E1 OPP /test.txt
** Message: CreateBluetoothSession ("00:1B:FB:17:6B:E1", "00:00:00:00:00:00", "OPP")
** Message: Object path: /org/openobex/session0
** Message: Session connected: /org/openobex/session0
** Message: SendFile ("/test.txt")
** (process:317): WARNING **: Error: Message did not receive a reply (timeout by message bus)

再看一下./obex-data-server 进程的log发现输出如下错误

** Message: session_connect_result_cb
** Message: LOCK
** Message: ods_filename_to_utf16 error: Conversion from character set 'UTF8' to 'UTF16BE' is not supported
Segmentation fault

 

2.
在完颜的提醒下,发现glib-2.18下确实没有把iconv的库编译进去。于是立即下载 libiconv-1.12 并编译
cross compile libiconv-1.12
./configure --host=arm-xscale-linux-gnu --prefix=/usr/arm-xscale-linux-gnu
make & make install

 

3.
重新编译glib-2.18
echo ac_cv_type_long_long=yes>arm-linux.cache
echo glib_cv_stack_grows=no>>arm-linux.cache
echo glib_cv_uscore=no>>arm-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux.cache
echo ac_cv_func_posix_getgrgid_r=yes>>arm-linux.cache
./configure --host=arm-xscale-linux-gnu --cache-file=arm-linux.cache --prefix=/usr/arm-xscale-linux-gnu --with-libiconv=gnu

configure出错
checking for libiconv_open in -liconv... no
configure: error: *** No iconv() implementation found in C library or libiconv


查看config.log
configure:8418: checking for libiconv_open in -liconv
configure:8453: arm-xscale-linux-gnu-gcc -o conftest -g -O2   conftest.c -liconv   >&5
/opt/gcc-4.1.2-glibc-2.4/arm-xscale-linux-gnu/lib/gcc/arm-xscale-linux-gnu/4.1.2/../../../../arm-xscale-linux-gnu/bin/ld: cannot find -liconv

发现iconv 根本不支持pkgconfig,参./configure --help的帮助 加入 CFLAGS LDFLA

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值