July 7, 2011

SABROG SABROG
Lab Rat
64 posts

QtMobility 1.1/1.2 doesn’t work Haptics/Feedback in Maemo 5 (n900)

 

Tell me please, why on maemo 5 not working QtMobility Feedback API if n900 does have vibrator?

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

8 replies

July 8, 2011

chriadam chriadam
Lab Rat
178 posts

It certainly should work. When you say that it doesn’t work, have you tried the example applications or are you attempting to build your own application from scratch? On the n900 there should be an “immersion” backend plugin built, which provides the functionality offered by the API. Also, in certain profiles the vibration functionality will not be available (so please make sure you try it with the “general” profile if you’re having problems).

Please describe:
1) what you’re doing exactly
2) what you expected to see
3) what you did instead see (compile error? runtime error? nothing happening?)

Hopefully that will give us a starting point to solving the problem.

Cheers,
Chris.

July 8, 2011

SABROG SABROG
Lab Rat
64 posts

I try this from QML:

  1. HapticsEffect {
  2.     id: rumbleEffect
  3.     attackIntensity: 0.0
  4.     attackTime: 250
  5.     intensity: 1.0
  6.     duration: 100
  7.     fadeTime: 250
  8.     fadeIntensity: 0.0
  9.     running: true
  10. }

also i try this from C++:

  1. QFeedbackEffect::playThemeEffect(QFeedbackEffect::ThemeBasic/*and QFeedbackEffect::ThemeBasicButton*/)

I expecting error in console or anything vibration.

Code below returns true

  1. qDebug() << QSystemInfo().hasFeatureSupported(QSystemInfo::HapticsFeature);

My profile is Generic. Hot to determine installed Immersion plugin?

I found this page [developer.qt.nokia.com] where says, what for Maemo 5 plugin from MeeGo doesn’t work… But in Maemo 5 there DBus and vibrator, and i must write code system depended for that.

P.S.: about “.ifr” (Immersion Force Resource) files. Do you know any 3rd-party freeware software for create this?

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

July 8, 2011

chriadam chriadam
Lab Rat
178 posts

Run your application with QT_DEBUG_PLUGINS=1 ./yourapp
This should give some information about which plugins are installed. The immersion plugin should be called libqtfeedback_immersion.so, I believe.

I just read that devnet wiki, and you’re right: it says that the meego backend won’t run on maemo5. This is true, however the immersion backend should work on maemo5, I believe. The meego backend provides theme effects, while the immersion backend provides custom effects. It may very well be that theme effects don’t work on maemo5, but custom effects do.

Have you tried running the example applications which come with Qt Mobility? The hapticsquare application in particular is a good one to run. Some backends don’t support theme effects, but only support custom effects, while other backends don’t support custom effects but to support theme effects – therefore it’s important to try both (which the example does).

Regarding .ifr’s, no I’m not aware of any such software.

Cheers,
Chris.

July 8, 2011

SABROG SABROG
Lab Rat
64 posts

QT_DEBUG_PLUGINS=1 nothing change, i always see this strings when app started:

  1. loaded the Generic plugin
  2. loaded the N900 plugin

No, i don’t have libqtfeedback_immersion.so file on device. I think qtm12 package just don’t have this plugin. Also i can’t compile hapticsquare example, because current QtSDK 1.1.2 doesn’t have this. Default memo 5 toolchain have only QtMobility 1.0.2 installed, who don’t have feedback api. I don’t know how to update QtMobility to 1.2 version on Windows for Maemo 5. Sorry, my mistake. Must be i set wrong target platform to Simulator, when try compile C++ code, and when try to compile for maemo just get compilation error, and forgot about this. So i can try only test feedback on QML.

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

July 9, 2011

SABROG SABROG
Lab Rat
64 posts

Can anyone create .deb package with hapticsquare example from QtMobility and upload somewhere for test?

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

July 12, 2011

chriadam chriadam
Lab Rat
178 posts

Ah, ok – you might have more luck using the community-maintained Qt Mobility packages (from extras). Alternatively, build and deploy mobility yourself using scratchbox. If you don’t have at least Qt Mobility 1.1 installed on your Maemo5 device, you certainly won’t have the libqtfeedback_immersion.so plugin available, and the hapticsquare example will not run at all (as it requires the libqtfeedback.so etc Mobility libs).

Cheers,
Chris.

Mobility on n900 info:
http://talk.maemo.org/showthread.php?t=68123 — mobility 1.2
http://talk.maemo.org/showthread.php?t=67588 — mobility 1.1

July 12, 2011

SABROG SABROG
Lab Rat
64 posts

I already have installed 1.0.2, 1.1.0 and 1.2.0 versions on my n900. But I not found libqtfeedback_immersion.so on filesystem. Which path I need see?

I can’t use scratchbox, I use QtSDK for Windows. It SDK have only QtMobility 1.0.2 version for maemo 5 and I don’t know how to build QtMobility 1.2.0 from Windows XP for Maemo 5 for run application on n900.

I install qt-mobility-12-examples on n900, but this package don’t have few examples included hapticsquare.

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

August 8, 2011

chriadam chriadam
Lab Rat
178 posts

Hi,

It looks like this might be a packaging bug in the QtMobility 1.2 package. The QA engineer I spoke to said that the ./debian/libqtm-feedback.install file in that package does not look correct, and that it should be updated.

(I believe it should be something like:

usr/lib/libQtFeedback.so.*
opt/lib/libQtFeedback.so.*
opt/lib/qt4/imports/QtMobility/feedback/
usr/lib/qt4/imports/QtMobility/feedback/

usr/lib/qt4/plugins/feedback/libqtfeedback_immersion*.so
opt/lib/qt4/plugins/feedback/libqtfeedback_immersion*.so

usr/lib/qt4/plugins/feedback/libqtfeedback_mmk.so
opt/lib/qt4/plugins/feedback/libqtfeedback_mmk.so

and that debian/libqtm-feedback-dev.install should be something like:

#usr/lib/QtFeedback.pc usr/lib/pkgconfig/
usr/include/qt4/QtFeedback
usr/lib/libQtFeedback.so

but I could be wrong).

If you contact the community package maintainer, hopefully they’ll be able to provide updated packages. It’s possible that all of the .install files need to be updated, although I may be wrong.

Cheers,
Chris.

 
  ‹‹ need advice about video in app      QCamera - Setting resolution of captured preview image using QImageEncoderSettings does not work ››

You must log in to post a reply. Not a member yet? Register here!