maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   OS2008 and iPaq Bluetooth kbd (https://talk.maemo.org/showthread.php?t=12660)

BruceL 2007-12-03 11:38

OS2008 and iPaq Bluetooth kbd
 
Has anyone gotten the HP-iPaq Bluetooth keyboard to work under the OS2008 beta? I have tried both the built-in bluetooth keyboard system in the control panel AND the btkbd hack from fanoush.

fanoush 2007-12-03 12:21

Re: OS2008 and iPaq Bluetooth kbd
 
I have not included proper kernel module for new kernel into kbdd.tar.gz yet. Correct uinput.ko module is inside this archive http://fanoush.wz.cz/maemo/modules-r....6.21.0.tar.gz and you need to put it to kbdd directory and rename to uinput.ko.kernelversion where kernelversion can be found by running 'uname -r' on your OS2008-based device. It is something like 2.6.21-omap1.

I'll add it to kbdd archive ASAP, hopefully today.

fanoush 2007-12-03 12:40

Re: OS2008 and iPaq Bluetooth kbd
 
Let me know if it worked, when thinking about this maybe there is a problem with rfcomm binary. I know pand for PAN bluetooth networking is missing in OS2008 so rfcomm command may be missing too. If this is the case btkbd script needs some serious D-BUS hackery similar to the pand one.

BruceL 2007-12-03 12:56

Re: OS2008 and iPaq Bluetooth kbd
 
Thanks Fanoush,

When run ./btkbd scan I get "hcitool not found"

When I enter the address anyhow (I already know it) and run
./btkbd I get "sdptool not found"

I have found an 'sdp-query' that seems to be similar to sdptool. I'll try changing btkdb to use that and see if it works.

fanoush 2007-12-03 13:19

Re: OS2008 and iPaq Bluetooth kbd
 
Hmm, maybe whole bluez-utils package is not installed or no longer includes those basic commands? I'll check it on my device when I get home.

BruceL 2007-12-03 13:28

Re: OS2008 and iPaq Bluetooth kbd
 
bluez-utils is installed. It's possible (though unlikely) that I wrecked my bluez-utils install. sdp-query has a very similar function to sdptool ( see http://www.daemon-systems.org/man/sdpquery.1.html though that page is for sdpquery, not sdp-query.)

The built-in bluetooth system doesn't seem to know how to use the SPP profile as a keyboard. But it DOES know how to find the keyboard and pair with it as SPP. Perhaps there is a way to connect that system with uinput?

fanoush 2007-12-03 13:42

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by BruceL (Post 103815)
bluez-utils is installed. It's possible (though unlikely) that I wrecked my bluez-utils install.

It is more likely that with OS2008 all those commands are no longer included and only D-BUS is used, see http://wiki.bluez.org/

if you try 'dpkg -L bluez-utils' is there anything in /usr/bin or /usr/sbin?

BruceL 2007-12-03 14:01

Re: OS2008 and iPaq Bluetooth kbd
 
Nothing...
Here is what I get:

/home/user/MyDocs/kbdd # dpkg -L bluez-utils
/.
/usr
/usr/bin
/usr/sbin
/usr/sbin/hcid
/usr/share
/usr/share/doc
/usr/share/doc/bluez-utils
/usr/share/doc/bluez-utils/README
/usr/share/doc/bluez-utils/AUTHORS
/usr/share/doc/bluez-utils/changelog.Debian.gz
/usr/share/doc/bluez-utils/changelog.gz
/usr/lib
/usr/lib/bluetooth
/usr/lib/bluetooth/bluetoothd-service-input
/usr/lib/bluetooth/bluetoothd-service-serial
/usr/lib/bluetooth/bluetoothd-service-audio
/usr/lib/bluetooth/bluetoothd-service-network
/usr/lib/alsa-lib
/usr/lib/alsa-lib/libasound_module_ctl_bluetooth.so
/usr/lib/alsa-lib/libasound_module_pcm_bluetooth.so
/etc
/etc/dbus-1
/etc/dbus-1/system.d
/etc/dbus-1/system.d/bluetooth.conf
/etc/default
/etc/default/bluez-utils
/etc/bluetooth
/etc/bluetooth/hcid.conf
/etc/bluetooth/input.service
/etc/bluetooth/audio.conf
/etc/bluetooth/audio.service
/etc/bluetooth/network.service
/etc/bluetooth/serial.service
/etc/init.d
/etc/init.d/bluez-utils
/home/user/MyDocs/kbdd #

I'll look into doing it with D-Bus.

fanoush 2007-12-03 14:27

Re: OS2008 and iPaq Bluetooth kbd
 
Yes, that's what I feared, only hcid and all services moved to /usr/lib/bluetooth/

This will need to rewrite btkbd in python over D-BUS or do some nasty dbus-send scripting hackery. As python is a bit bloated and still not installed by default I'll try the latter. It will be similar to my recent PAN networking D-BUS experiment.

BruceL 2007-12-10 09:01

Re: OS2008 and iPaq Bluetooth kbd
 
Fanoush,
I hope you have had more success than I have. One problem is that the uinput.ko.2.6.21-omap1 module cannot be installed; "Invalid module format (-1): Exec format error"

Also, the rcomm program is missing from os2008beta. I don't know how to replace all that functionality using DBus. Obiwan, you are our only hope! :)

fanoush 2007-12-11 12:46

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by BruceL (Post 106693)
Fanoush,
I hope you have had more success than I have. One problem is that the uinput.ko.2.6.21-omap1 module cannot be installed; "Invalid module format (-1): Exec format error"

This is some trivial error, either you are not using insmod command correctly or the module is somehow corrupted. It should work.
Quote:

Originally Posted by BruceL (Post 106693)
Fanoush,
Also, the rcomm program is missing from os2008beta. I don't know how to replace all that functionality using DBus. Obiwan, you are our only hope! :)

Yes, this is major problem, btkbt script must be rewritten to use D-BUS, not rfcomm command. Will look into it as time permits. I have this keyboard too :-)

n9mjg 2007-12-22 23:32

Re: OS2008 and iPaq Bluetooth kbd
 
GOT IT WORKING!

I was able to get it working.

Here is what I did:

1. downloaded the current kernel modules as instructed above. Extracted and rename uinput.ko as instructed.
2. copy libbluetooth.so.1.0.25 from my N770 to my N800
3. ln -s libbluetooth.so.1.0.25 libbluetooth.so.1
4. copied hcitool, sdptool and rfcomm from my N770 to my N800.

Now when I run the "Turn on/off BT Keyboard" link, my Bluetoot icon in the status bar will change color letting me know when the keyboard is working.

It probably would not be a problem to include the missing libraries and programs in a new download.

FrankWalzer 2007-12-26 16:57

Re: OS2008 and iPaq Bluetooth kbd
 
n9mjg,

unfortunately I do not have an N770 to copy the files from ...

But I would really like to get my Smart keyboard working on OS2008 again.

Any chance you could post a package?

fanoush 2007-12-26 17:19

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by n9mjg (Post 114080)
GOT IT WORKING!
..
..
It probably would not be a problem to include the missing libraries and programs in a new download.

Great. A bit dirty solution but works. Can you attach hcitool, libbluetooth.so.1.0.25 etc as a temporary solution here? You can even try to have libbluetooth in kbdd directory and start hcitool etc. as
"LD_PRELOAD=./libbluetooth.so.1.0.25 hcitool" so you don't need to modify sytem directories.

I'm working on rewriting btkbd script using dbus which is cleaner and does not require older bluetooth stuff. I have it almost ready, will take day or two.

n9mjg 2007-12-26 17:28

Re: OS2008 and iPaq Bluetooth kbd
 
1 Attachment(s)
Here you are.

Hope this helps.

Have A Happy New Year!

fanoush 2007-12-26 22:58

Re: OS2008 and iPaq Bluetooth kbd
 
OK here is something that should work at least in OS2008
http://fanoush.wz.cz/maemo/kbdd_OS2008.tar.gz
Please test and report success or failure.

PORTNUM variable in btkbd.conf is no longer needed for OS2008, rfcomm port is allocated automatically.

It should work in OS2007 and 6 too so testing on these systems is welcomed too. I'll test it with my 770 too and replace main kbdd.tar.gz with this in case it works.

Eismaus 2007-12-27 10:17

Re: OS2008 and iPaq Bluetooth kbd
 
I'm going to try this.
Thanks!

Eismaus 2007-12-27 10:55

Re: OS2008 and iPaq Bluetooth kbd
 
Ok, i tried it with my new freedom mini.

i followed the readme and i was able to get the bluetooth adress with './btkbd scan'.

After ./btkbd i get this:

Root shell enabled
Error org.bluez.serial.Error.ConnectionAttemptFailed: Host ist down
rfcomm bind to <BT Adress> failed

when i tried it a second time (just to make sure, i didn't do something wrong) i get this:
Root shell enabled
Error org.bluez.serial.Error.NotSupported: The service is not supported by the rfcomm bind to <BT Adress> failed
rfcomm bind to

fanoush 2007-12-27 11:56

Re: OS2008 and iPaq Bluetooth kbd
 
host is down means that keyboard was not found (i.e. not in discoverable state, off, too far). Second error looks like keyboard does not support spp profile but it can be also other error (pairing). Dit it work with kbdd in OS2007? Best is to remove batteries from keyboard so it forgets previous pairing and try with btkbd again. Do you see pairing dialog when btkbd is run after you reinsert bateries?

BTW I tried it also with 770 with latest 2006 and 2007HE and it seems to work with iPAQ BT foldable in all those systems for me.

Also there is one change for OS2007 - virtual keyboard is no longer turned off/on by hand in btkbd, 2007 and 8 systems do it automatically so it is not needed and it does not break input in osso-xterm when keyboard is disconnected.

Eismaus 2007-12-27 14:57

Re: OS2008 and iPaq Bluetooth kbd
 
I don't know if it works in OS2007. I just got the keyboard for christmas and i have os2008 on my tablet for a while now. But i have read a few treads in this forum, that this keyboard typ only works with kbdd.

I try it again.

n9mjg 2007-12-27 15:10

Re: OS2008 and iPaq Bluetooth kbd
 
I just tested your new version on my OMIZ keyboard and it works perfectly.

Thank you so much!

Have A Great New Year!

Eismaus 2007-12-27 15:36

Re: OS2008 and iPaq Bluetooth kbd
 
Ok, i removed the batteries, waitet for 5 minutes, put them back in and tried again.

Same Error message.
Root shell enabled
Error org.bluez.serial.Error.NotSupported: The service is not supported by the
rfcomm bind to <BT Adress> failed

Something else i could try?

Rashef 2007-12-27 16:48

Re: OS2008 and iPaq Bluetooth kbd
 
Just tested with a Smart Keyboard and my N800 OS2008 works greatly!!!
Thanks, you are my myth! ;)

fanoush 2007-12-27 17:52

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by Eismaus (Post 116104)
Something else i could try?

Well, maybe reading manual or searching this forum for your specific keyboard model. There are many different Freedom keyboard models. You need to know whether your keyboard supports HID or SPP mode or both. If both then how to switch it to SPP mode. kbdd works only with keyboards in SPP mode.

wiredwolf 2007-12-29 21:22

Re: OS2008 and iPaq Bluetooth kbd
 
Hello to all you forum, I have a keyboard OMIZ (no HID) and I would like to use with n800; I wanted to ask if you kindly post me the steps to configure the keyboard bluetoot. I have download the patch at "http://fanoush.wz.cz/maemo/#kbdd" but I do not understand what to do ..

Keep in mind that I am not aware of linux, so just make copies of files and move between directories .. :-(

Thanks to all

PS:
I hope not [ot]..... Also wanted to ask .. I loaded the latest firmware and wanted to know if OS2008 2.2007.50-2 allows the operation of sdhc? (I bought a sdhc from 4gb but I can not make it go you can advise me)?

n9mjg 2007-12-31 00:40

Re: OS2008 and iPaq Bluetooth kbd
 
Hello,

For any who are having difficulty with getting this driver to work for the Omiz keyboard, here are the detailed steps I used to get mine working. Actually, the process has become considerably less difficult now that fanoush has updated the drivers. Thank You Fanoush!

1. Download the latest kbdd from http://fanoush.wz.cz/maemo/kbdd.tar.gz

2. Get to a command line on your N800 and become root (I use ssh for this).

3. cd to the directory where you downloaded kbdd

4. extract the files with tar xvzf kbdd.tar.gz

5. cd to the kbdd directory.

6. Make sure your keyboard is turned on and the green light is blinking.

7. find the keyboard with this command

./btkbd scan

8. make note of the address of the keyboard.

9. edit btkbd.conf You will need to add the address and change the keyboard type to "freedom". Here is the contents of my btkbd.conf file:

BDADDR="00:0B:0D:76:05:AB"
KBTYPE=freedom
PORTNUM=2
DEBUG=no #yes
#KEYREPEAT_DELAY=600 # delay before first key repeat (in miliseconds)
#KEYREPEAT_PERIOD=80 # repeat speed

10 now run the command:

./btkbd

If everything worked as expected you should now be able to enter input using your keyboard.

11. If this worked then run the command:

sh install_shortcut.sh

You will now be able to activate and deactivate your keyboard via the extras menu.

Good Luck!

cyberx 2008-01-01 10:13

Re: OS2008 and iPaq Bluetooth kbd
 
Hi all!
I wanna thank you all, specially Fanoush and also n9mjg! This forum is great, since I got my N800 last month you solved all issues I got!
My Zaapa BK600 is now working. I found that it was the same as a Chainpus Smartphonemate BK600 / Freedom Keyboard so I chose "KBTYPE=freedom" and it is (finally!) working with my N800/OS2008.

I just have two minor issues:
- sometimes I have to press some key twice;
- AltGr key is not recognized, and so can't use some symbols;

I must admit haven't read Fanoush' documentation yet, so I will research/google better and if I find any solution I'll post it here.

FrankWalzer 2008-01-02 10:11

Re: OS2008 and iPaq Bluetooth kbd
 
Hi Cyberx,

i have a SmartBT which is similar to the Freedom. You need to map the AltGr key to Mode_switch using Xmodmap. Then you can assign keysyms. Search the forum for examples how to use xmodmap.

Thanks to fanoush for the basic work !

cyberx 2008-01-02 17:33

Re: OS2008 and iPaq Bluetooth kbd
 
Thanks!
I was already messing with xev but with "KBTYPE=freedom" xev was not seeing AltGr beeing pressed. But after reading your post I googled for "Smart Bluetooth Keyboard" pictures to see if my Zaapa BK600 might in fact be "smartbt" instead of "freedom". And it really is!

Xev now sees AltGr (keycode 189) so I just have to use this command:
Quote:

xmodmap -e "keycode 189 = Mode_switch"

v-v 2008-01-04 14:05

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by fanoush (Post 115824)
OK here is something that should work at least in OS2008
http://fanoush.wz.cz/maemo/kbdd_OS2008.tar.gz

The link seems down, could someone reupload it? :)

Thank you very much :)

fanoush 2008-01-04 14:24

Re: OS2008 and iPaq Bluetooth kbd
 
backup site
http://fanoush.webpark.cz/maemo/
http://fanoush.webpark.cz/maemo/kbdd.tar.gz - this now includes support for OS2008 too

v-v 2008-01-04 20:55

Re: OS2008 and iPaq Bluetooth kbd
 
Thank you very much :)

I have a Level one BLK-2000 foldable bt keyboard and works very well on n800 with 0S2008 :)

BruceL 2008-01-05 08:02

Re: OS2008 and iPaq Bluetooth kbd
 
I have a strange occurrence with the new software: when running SciTE with the DBus bluetooth drivers (but not the old 770 ones) the enter key does not work. To make a new-line I have to turn off bluetooth or cut&paste a blank line. It works in all my other progs, just not SciTE.

Mikroft 2008-02-01 04:59

Re: OS2008 and iPaq Bluetooth kbd
 
Weird i can't get mine to work. It keeps saying cant find the keyboard even though I have the correct mac address in the conf file. As well it pops up a window saying bt keyboard not ready. suggestions? I'm using a bk600 bt keyboard btw. thanks.

mike_bike_kite 2008-04-17 18:33

Re: OS2008 and iPaq Bluetooth kbd
 
I was really pleased to get the freedom keyboard working this evening using the ideas/software in this thread. I just have two small niggles and wondered if anyone knew how to get round them.

1) the return key doesn't work - but I found I can type control M and this gets round the issue for the moment.

2) I did all the 11 steps in n9mjg post but find that the option in the extras menu to turn off the menu doesn't seem to work. I have to restart my N800 to type via the screen. Oddly the program in the extras menu refers to a bt keyboard but that might be normal.

Any ideas folks?

Mike

Oh and I should say I have an N800, running OS2008 with the original freedom bluetooth keybard ( I think - it was given to me:) )

wenrolland 2008-05-03 00:28

Re: OS2008 and iPaq Bluetooth kbd
 
Hi! I have the same problem as Mikroft... I have an OMIZ6220 and when I scan for it, it is found after a while. After modifying the .conf file, I lauch the btkbd and I get the same message. line 1 BDADDR... not found and "Keyboard not configured".

I really don't get it... Can anyone help please! Thanks!

W

BruceL 2008-05-03 00:34

Re: OS2008 and iPaq Bluetooth kbd
 
I believe the problem with the "return key" not working is some kind of timing error because if you press it repeatedly and rapidly you eventually get a return. It has to be rapid though; no amount of slowly repeating the return keypress will work but 4 or 5 rapid presses will usually yield a keypress.

fanoush 2008-05-03 20:36

Re: OS2008 and iPaq Bluetooth kbd
 
Quote:

Originally Posted by wenrolland (Post 177356)
After modifying the .conf file, I lauch the btkbd and I get the same message. line 1 BDADDR... not found

This means the btkbd.conf syntax is wrong. Which editor you used? Do not add any fancy characters or spaces, do not use Notes application, just
Code:

BDADDR=wh:at:ev:er
in plain text format. Use vi, nano, mcedit, joe or any other plain text editor.

wenrolland 2008-05-04 00:35

Re: OS2008 and iPaq Bluetooth kbd
 
Thank you Fanoush! I used Notes not knowing it was adding characters... I used Nano to remove the unnecessary characters and now it works great! This forum is great and Fanoush, you are very helpful! Thanks again.

piters 2008-07-07 15:36

Re: OS2008 and iPaq Bluetooth kbd
 
Hi Fanoush,
I cannot make it work on Diablo... I followed what I did before on OS2008, and now it doesn't work. I edit the config file, try to start btkbd, but the pairing dialog box does not pop up... Any hints?


All times are GMT. The time now is 12:36.

vBulletin® Version 3.8.8