基于Qt的检测U盘移植arm--- org.freedesktop.Hal was not provided by anyservice
用Qt的dbus模块检测U盘插拔,最重要移植到tiny210开发板上。现在已经在pc上调试成功了,经过重重困难,在arm上移植了带dbus的qt的lib,dbus-1.0.2,在pc交叉编译的时候顺利通过,但就是运行的时候报错:
[root@FriendlyARM /ayan]# ./Esto-server -qws
111111111
22222222222
"?????????QDBusInterface?" "The name org.freedesktop.Hal was not provided by any
.service files"
Object::connect: No such signal QDBusAbstractInterface::DeviceAdded(QString)
Object::connect: (receiver name: 'Widget')
Object::connect: No such signal QDBusAbstractInterface::DeviceRemoved(QString)
Object::connect: (receiver name: 'Widget')
我的源程序:
qDebug()<<"111111111";
QDBusInterface *dBusInterface = new QDBusInterface(DBUS_HAL_SERVICE,
DBUS_HAL_PATH,
DBUS_HAL_INTERFACE,
QDBusConnection::systemBus(),
this);
qDebug()<<"22222222222";
if(!dBusInterface->isValid())
qDebug()<<tc->toUnicode("初始化错误,找不到QDBusInterface!")<<QDBusConnection::systemBus().lastError().message();
connect(dBusInterface, SIGNAL(DeviceAdded(QString)), this, SLOT(slotDeviceAdded(QString)));
connect(dBusInterface, SIGNAL(DeviceRemoved(QString)), this, SLOT(slotDeviceRemoved(QString)));
问题就出在两个信号的连接上!
这里提示The name org.freedesktop.Hal was not provided by any
.service files是不是我的tiny210开发板不支持HAL?? 我查看了一下,根目录下没有/org/.........这些目录。
是不是还要移植HAL?? 这方便资料好少啊 希望大家指点一下。。。。。。。。。。。
我之前的移植过程参见:http://blog.csdn.net/yanzi1225627/article/details/7859599