maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   The Other Half (https://talk.maemo.org/forumdisplay.php?f=59)
-   -   Producing Qwerty OtherHalf --order counter: 75/75 --ordering closed (https://talk.maemo.org/showthread.php?t=91535)

dirkvl 2014-01-04 13:53

Re: Building OtherHalf keyboard prototype
 
Quote:

Originally Posted by Dave999 (Post 1403707)
Donated. would be possible to get jolla involved in this?

If they would answer their email! :p

http://media.giphy.com/media/MaUwo5MXoIkCY/giphy.gif

kimmoli 2014-01-04 13:53

Re: Building OtherHalf keyboard prototype --find "software experts"
 
maybe i need to get my own TCA8424 evkit too...

dirkvl 2014-01-04 14:01

Re: Building OtherHalf keyboard prototype --find "software experts"
 
Quote:

Originally Posted by kimmoli (Post 1403711)
maybe i need to get my own TCA8424 evkit too...

http://nl.mouser.com/Search/Refine.aspx?Keyword=tca8424

Morpog 2014-01-04 14:20

Re: Building OtherHalf keyboard prototype --find "software experts"
 
dirkvl, it's better to get in contact with Jolla devs by IRC or mailinglist.

Several of them are around on freenode server on #jollamobile and #sailfishos

dcihlar 2014-01-04 15:19

Re: Building OtherHalf keyboard prototype --find "software experts"
 
Today I don't have much time to analize, but i've found some interesting sources.
There are no userspace applications communicating over the i2c except for csd. Only the kernel modules.

Sources:
For cover switch (toh-event):
https://github.com/KonstaT/sailfisho...sc/toh-event.c
This module loads toh-core on cover key event.

For eeprom (toh-core):
https://github.com/KonstaT/sailfisho...vers/mfd/toh.c

If an eeprom with valid data is present, toh will appear in /sys fs.

From toh-core source eeprom data structure format can be extracted and than tested.


Looking at /boot/config*, it looks like support for TCA8418 is not enabled. (I didn't check if it is compatible with 8424).

Maybe an plugin like the /usr/lib/tohd/tohd-plugin-nfc-nxp.so has to be written.

dirkvl 2014-01-04 15:48

Re: Building OtherHalf keyboard prototype --find "software experts"
 
Quote:

Originally Posted by dcihlar (Post 1403736)
For eeprom (toh-core):
https://github.com/KonstaT/sailfisho...vers/mfd/toh.c

If an eeprom with valid data is present, toh will appear in /sys fs.

From toh-core source eeprom data structure format can be extracted and than tested.

The whole workings of the eeprom is very valuable in my eyes! If the eeprom could carry out commands, download files and install programs and deamons etc, all custom OH's can really be made plug&play.

This is a make or break condition for usage of the OH for the general public!

butler 2014-01-04 21:55

Re: Building OtherHalf keyboard prototype
 
Quote:

Originally Posted by dirkvl (Post 1403687)
The TCA8424 documentation says:
...

The example in the datasheet uses mixed R/W i2c transactions that are not available from userspace through i2c-dev interface. I still think that it should be possible to split a read transaction into two.

Here is a python code that may read values of the first registers, if it fails on the first write(), try changing address to 0x77.
Code:

#!/usr/bin/python

import fcntl
import os
import struct

class I2C(object):
    I2C_SLAVE = 0x0703

    def __init__(self, fname):
        self.fd = os.open(fname, os.O_RDWR)

    def __del__(self):
        os.close(self.fd)
   
    def select_device(self, devaddr):
        if fcntl.ioctl(self.fd, self.I2C_SLAVE, devaddr) < 0:
            return IOError('ioctl error')
   
    def write(self, data):
        os.write(self.fd, data)
 
    def read(self, count):
        data = ''
        while 1:
            d = os.read(self.fd, count - len(data))
            if len(d)==0:
                raise IOError("EOF while reading %d bytes" % count)

            data += d
            if len(data) == count:
                return data

if __name__ == '__main__':
    port = I2C('/dev/i2c-1')
    port.select_device(0x76) # or 0x77
    for i in range(10):
        port.write(struct.pack('<H', i))
        v = ord(p.read(1))
        print "reg=%02Xh val=%02Xh" % (i, v)

Copy it to a file and run "python filename.py" as root. My best guess is that it won't destroy your phone... I cannot test it on mine, since I have none, and won't have for a month at least. If the code works, I'll clean it up, and it should be easy to work with, as no compilation is required.

One more thing... It looks like this chip supports generic i2c HID interface and there is a module in mainline kernel for it. Try "modprobe i2c-hid" to see if the module is compiled and available... In any case it shouldn't work, as i2c lacks autoprobing and the proper way is to specify the device in the devicetree file...

Edit: Tried the code on n900 (and fixed it a bit), n900 is still alive )

kimmoli 2014-01-04 22:30

Re: Building OtherHalf keyboard prototype --find "software experts"
 
we had lots of progress today with dirkvl.

input and output reports are both working (leds blinking on evkit , and usage id's change when shorting matrix)

dirkvl 2014-01-05 11:41

Re: Building OtherHalf keyboard prototype --find "software experts"
 
looks 'a bit' hackish
http://oi42.tinypic.com/2mbthk.jpg

filmed with my trusty old N9, software provided bij kimmoli!
https://vimeo.com/83421811

dcihlar 2014-01-05 23:58

Re: Building OtherHalf keyboard prototype --find "software experts"
 
Quote:

Originally Posted by dirkvl (Post 1403747)
The whole workings of the eeprom is very valuable in my eyes! If the eeprom could carry out commands, download files and install programs and deamons etc, all custom OH's can really be made plug&play.

This is a make or break condition for usage of the OH for the general public!

Unfortunately, it's not what I meant to say. :(
toh (as in toh-core kernel module) appears somewhere in the /sys fs. And in it's directory eeprom configuration items.

Henque19 2014-01-06 15:57

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Great work!
Dirkvl, I've got €30 heading your way.

I'm probably not the only one, but I do have a 3D-printer and limited modelling skills so when you're at the prototyping stage I can lend a hand.

dirkvl 2014-01-06 19:06

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
At the moment I am at the point that I'm confident that the software side will work -thanks to kimmoli!- so it is time to design and order some pcb's.

3D printer would be practical, but forthe first prototype it will probably better to have one available nearby! :)

kimmoli 2014-01-06 19:09

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1404339)
3D printer would be practical, but forthe first prototype it will probably better to have one available nearby! :)

I use Felix printer (http://shop.felixprinters.com/workshop.html) and assume their hq is at least in your country ??

dirkvl 2014-01-06 19:14

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
my faculty has three 3d-printers, so will probably try that first when I have a design made

HtheB 2014-01-07 00:26

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
what about integrating the oled screen hack in the keyboard?
would that be possible?

Akkumaru 2014-01-07 07:51

Possible but more work i guess? :p

gordon_pcb_designer 2014-01-07 07:59

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Hi to all guys,
I'm following the great job you all are making here and i've to say i admire you so much ;) as i don't understand a lot about programming and so.. but in case you'll need an hand for design a pcb or so, i'm here! ;)
Anyway, is very stimulating to follow you!! go ahead!!

dirkvl 2014-01-07 08:05

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by HtheB (Post 1404411)
what about integrating the oled screen hack in the keyboard?
would that be possible?

everything is possible! but no.

Quote:

Originally Posted by gordon_pcb_designer (Post 1404448)
Hi to all guys,
I'm following the great job you all are making here and i've to say i admire you so much ;) as i don't understand a lot about programming and so.. but in case you'll need an hand for design a pcb or so, i'm here! ;)
Anyway, is very stimulating to follow you!! go ahead!!

Maybe, good with error checking gerber files? :)

gordon_pcb_designer 2014-01-07 08:29

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1404451)
everything is possible! but no.



Maybe, good with error checking gerber files? :)

Yes if you need that, I normally use Cam350..

EDIT: it seems i can't send you private messages, i suppose due my few post here.. if you're pleased you could try to message me, hope i'll be able to answer at least and share the way you want use to send me needed files to check and so.. anyway I'm here waiting news :)

matimilko 2014-01-08 18:35

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1404339)
At the moment I am at the point that I'm confident that the software side will work -thanks to kimmoli!- so it is time to design and order some pcb's.

3D printer would be practical, but forthe first prototype it will probably better to have one available nearby! :)

First thank You for great work on TOH keyboard!
I don't know much about programming, but if can help on hardware, making keyboard and mechanism for I can try.
On TOH isn't much space to make some good mechanism like on N97, I think slide out is only possible and of course we all want thin keyboard.
Connection should be over cables?

mdengler 2014-01-09 04:24

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
donated - good luck!

matimilko 2014-01-09 08:04

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by mdengler (Post 1405015)
donated - good luck!

Me also. It's enough Maybe for beer on the meeting ;)

dirkvl 2014-01-09 08:31

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Nice! Everything helps. Been ordering a lot of parts.

Working on the pcb for the very-very first n900-keyboard non-sliding proto. When that order is out the door I'll make a 3D case for it. When that all works it is time to get very serious :)

Willebra 2014-01-09 13:12

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Really interesting, thanks, made a donation.

dirkvl 2014-01-10 12:03

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
The first PCB has been sent to China for production! They will make 10, but it is only for a N900 keyboard and domesheet!

http://oi39.tinypic.com/24mckli.jpg

Anyway, I also ordered this one:
http://i42.tinypic.com/33l0cnp.jpg

Which is a complete piece of ****, but the hinge is very nice and the keyboard is very okay (although the clickyness is very cheap-feeling)!

Ow, to prove it is a piece of ****, spot the difference!
http://oi40.tinypic.com/2a7e89j.jpg

gordon_pcb_designer 2014-01-10 14:36

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Well done, i'm very curious about final result for this great job!

@dirkvl: my offer is always valid, just seen some "issues" to set on pcb, or at least little improvements to make look it better :D

dirkvl 2014-01-10 15:11

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by gordon_pcb_designer (Post 1405419)
Well done, i'm very curious about final result for this great job!

@dirkvl: my offer is always valid, just seen some "issues" to set on pcb, or at least little improvements to make look it better :D

haha yes i know, but since this is for just one very alpha proto i didn't bother optimalizing the design ;)

if this works and the software is ready we can perhaps look into designing a pcb for a larger batch!

Henque19 2014-01-10 17:28

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1405428)
haha yes i know, but since this is for just one very alpha proto i didn't bother optimalizing the design ;)

if this works and the software is ready we can perhaps look into designing a pcb for a larger batch!

Great progress!
I would humbly suggest waiting a bit with a larger batch and perhaps build it around another keyboard than the N900. Since the Jolla is larger, a fourth row of keys makes a lot of sense in my opinion.

Depends on what is meant by "larger batch" I suppose, but a larger keyboard is probably better for most people

gordon_pcb_designer 2014-01-10 18:36

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1405428)
haha yes i know, but since this is for just one very alpha proto i didn't bother optimalizing the design ;)

if this works and the software is ready we can perhaps look into designing a pcb for a larger batch!

:D Good, now you can understand why in my opinion i'm just perfectionist, AKA @@breaker for my collegues :D
Anyway was just for joke a little, at this point sure you've just to try everything.

dirkvl 2014-01-13 12:05

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Currently working on a 3d model for my n900-keyboard, for the last proof-of-concept build.
http://i39.tinypic.com/28m1kx5.jpg

On the software side there is a lot of progress, but still a lot to be done. Kimmo, can you perhaps elaborate on this? Maybe there a parts of the software other people can help with!

Vlad_on_the_road 2014-01-13 12:13

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1404344)
my faculty has three 3d-printers, so will probably try that first when I have a design made

You could also try a nearby hackerspace (http://hackerspaces.org/wiki/Netherlands) if you are lucky enough to have one close to where you live. Who knows, you might meet interesting people there, skilled enough to help you :)

dirkvl 2014-01-13 12:20

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by Vlad_on_the_road (Post 1406080)
You could also try a nearby hackerspace (http://hackerspaces.org/wiki/Netherlands) if you are lucky enough to have one close to where you live. Who knows, you might meet interesting people there, skilled enough to help you :)

Thanks! I have already confirmed that I can print on my faculty! I can just hand of an usb-stick and they do the rest :)

kimmoli 2014-01-13 12:52

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by dirkvl (Post 1406078)
On the software side there is a lot of progress, but still a lot to be done. Kimmo, can you perhaps elaborate on this? Maybe there a parts of the software other people can help with!

I did work on this during weekend, but it seems that i have to wait official support (next SDK release?) from Jolla to get the interrupt line working. I tried to write my own kernel module driver for it, but i wasn't able to get the kernel compiled (needed to create correct Module.symvers -file). Otherwise the module builds, and modinfo shows correct (afaik) vermagic etc., but even modprobe --force does not start it. :confused:

I need this also for my other project to get interrupt from proximity sensor.

dirkvl 2014-01-13 13:40

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kimmoli (Post 1406090)
I did work on this during weekend, but it seems that i have to wait official support (next SDK release?) from Jolla to get the interrupt line working. I tried to write my own kernel module driver for it, but i wasn't able to get the kernel compiled (needed to create correct Module.symvers -file). Otherwise the module builds, and modinfo shows correct (afaik) vermagic etc., but even modprobe --force does not start it. :confused:

I need this also for my other project to get interrupt from proximity sensor.

Okay! And the keyboard library with all the keys and combo's with modifiers? Is that something that can be developed separately?

rainisto 2014-01-13 15:34

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kimmoli (Post 1406090)
I did work on this during weekend, but it seems that i have to wait official support (next SDK release?) from Jolla to get the interrupt line working. I tried to write my own kernel module driver for it, but i wasn't able to get the kernel compiled (needed to create correct Module.symvers -file). Otherwise the module builds, and modinfo shows correct (afaik) vermagic etc., but even modprobe --force does not start it. :confused:

I need this also for my other project to get interrupt from proximity sensor.

I might have working kernel compilation env (disclaimer: havent tested it for a while), so if you need some module to be compiled, then you could try pinging me.

kimmoli 2014-01-13 15:43

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by rainisto (Post 1406116)
I might have working kernel compilation env (disclaimer: havent tested it for a while), so if you need some module to be compiled, then you could try pinging me.

ooOo... My first attempt is just a Hello module. But i was "so close" with my own environment... (Tried to consult my friends about it and they just wondered why i have sb2 in another vm ...?)

Raim 2014-01-13 16:12

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kimmoli (Post 1406090)
I did work on this during weekend, but it seems that i have to wait official support (next SDK release?) from Jolla to get the interrupt line working.

Following the previous posts, there is a toh-event input driver in the kernel source.

However, from reading in the source it seems like the toh-event driver only handles gpio_cover/irq_cover for attaching/detaching TOH at the moment. The cover_irq/irq_int is not registered to an interrupt handler...

I guess they did not do it yet as you probably want some way to control whether you want to get a falling or rising edge or both as an interrupt.

rainisto 2014-01-13 16:51

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kimmoli (Post 1406121)
ooOo... My first attempt is just a Hello module. But i was "so close" with my own environment... (Tried to consult my friends about it and they just wondered why i have sb2 in another vm ...?)

Just tested building kernel in MerSDK, and seems to work, mb script didnt complain and it generated kernel rpm packages. But yes my compile env is a bit different than normal users would use, I havent tried compiling yet inside vm.

kjokinie 2014-01-13 17:03

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kimmoli (Post 1406090)
I did work on this during weekend, but it seems that i have to wait official support (next SDK release?) from Jolla to get the interrupt line working. I tried to write my own kernel

You can get INT line interrupts to userspace via the kernel gpio sysfs. Something along the lines of:

# Export INT gpio 67 to the sysfs
echo 67 > /sys/class/gpio/export
# Configure INT gpio67 to generate events on falling edge.
echo falling > /sys/class/gpio/gpio67/edge
# Check current value
cat /sys/class/gpio/gpio67/value

Then you can use poll() to get notified of events. Use POLLPRI event type.

Hope this helps.

kimmoli 2014-01-13 17:13

Re: Building OtherHalf keyboard prototype --exciting times! last call to jump in and help!
 
Quote:

Originally Posted by kjokinie (Post 1406139)
Hope this helps.

It will !! thanks for this. I was thinking that there must be such method to do this. 67 was the magic.

@dirkvl - i will code later, i'll send you updated daemon and app.


All times are GMT. The time now is 10:49.

vBulletin® Version 3.8.8