Author Topic: GH60 prototype betatesting [Call for layouts, GUI testing]  (Read 183352 times)

0 Members and 1 Guest are viewing this topic.

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #300 on: Wed, 13 March 2013, 08:51:20 »
The FW works all right, you just cannot program the layout.
If you have a winxp somewhere, you can use it to program the keyboard, and then use it in 7.
Though this FW is buggy in general;)

Komar, do you need someone to work on a windows API to get the firmware to work on win7/8? Or is it the firmware itself that's broken on anything over XP?

Cheers,
Yes, I do. It's only a problem with the GUI. I don't know why it works in xp but not in 7 or 8, but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers.
I need someone to write code in python that will send and receive interrupt packets (raw reports) to and from a hid class device.
An example of how to do this in C is the teensy raw hid test program here: http://www.pjrc.com/teensy/rawhid.html
If this can't be done in python, I don't mind a small helper binary program and a python library which calls it to perform communication.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #301 on: Wed, 13 March 2013, 11:33:19 »
The FW works all right, you just cannot program the layout.
If you have a winxp somewhere, you can use it to program the keyboard, and then use it in 7.
Though this FW is buggy in general;)

Komar, do you need someone to work on a windows API to get the firmware to work on win7/8? Or is it the firmware itself that's broken on anything over XP?

Cheers,
Yes, I do. It's only a problem with the GUI. I don't know why it works in xp but not in 7 or 8, but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers.
I need someone to write code in python that will send and receive interrupt packets (raw reports) to and from a hid class device.
An example of how to do this in C is the teensy raw hid test program here: http://www.pjrc.com/teensy/rawhid.html
If this can't be done in python, I don't mind a small helper binary program and a python library which calls it to perform communication.

I'll check it out. Maybe this requires some .NET stuff to function on windows correctly. I don't know yet though.

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: GH60 prototype betatesting
« Reply #302 on: Wed, 13 March 2013, 13:05:08 »
... but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers ...
I'm not sure here but I think that the winapi is not multi-platform. Anyway I do prefer LibUsb.

Why would you have to install a driver? the libusb dlls are the "drivers", you just need a different .inf with the "configuration" I'm wrong?
« Last Edit: Wed, 13 March 2013, 13:11:52 by agodinhost »
Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #303 on: Wed, 13 March 2013, 13:10:43 »
... but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers ...
I'm not sure here but I think that the winapi is not multi-platform. Anyway I do prefer LibUsb.

Of course libusb stays for linux, I only mean for windows, since most users will prefer if they don't have to do anything to make it work.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: GH60 prototype betatesting
« Reply #304 on: Wed, 13 March 2013, 13:22:20 »
Of course libusb stays for linux, I only mean for windows, since most users will prefer if they don't have to do anything to make it work.
Why don't you use the same idea already used into the Arduino IDE?
It just open one COM port (it's java, they use the TXRXComm library) when it needs any "serial" communication.
The compiled firmware itself (the hex files) is uploaded using avrdude at the command line (in background, sure).

Even when using those "FTDI USB Drivers" it works fine (these FTDI drivers are LibUsb based most times)

Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #305 on: Wed, 13 March 2013, 13:32:55 »
I don't know. Perhaps it was easier to implement rawhid at the time I worked on this.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: GH60 prototype betatesting
« Reply #306 on: Wed, 13 March 2013, 13:41:40 »
I don't know. Perhaps it was easier to implement rawhid at the time I worked on this.
You know your code better than me - I still didn't poked on it ...

Do you have any other option Komar?
Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #307 on: Thu, 14 March 2013, 23:16:58 »
I just re-read the first post, and figured out what my "problem" was.
Don't keyboard in the middle of the night when you are sick and exhausted from coughing :)) .


Back to figuring out how to program a layout from windows 8.


Anybody tried to run the gui under windowsxpmode in windows 8? I'm going to try that after some sleep.
« Last Edit: Thu, 14 March 2013, 23:23:30 by Glissant »

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Re: GH60 prototype betatesting
« Reply #308 on: Fri, 15 March 2013, 00:28:58 »
I just re-read the first post, and figured out what my "problem" was.
Don't keyboard in the middle of the night when you are sick and exhausted from coughing :)) .


Back to figuring out how to program a layout from windows 8.


Anybody tried to run the gui under windowsxpmode in windows 8? I'm going to try that after some sleep.

I tried it under XP compatible mode in Win7 with no luck.

I went back to using hasu's FW. You have to have WinAVR to compile the keymap to hex, then use Flip to flash the FW.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #309 on: Fri, 15 March 2013, 01:10:50 »
I had no luck with virtualbox running XP either. I just ended up running ubuntu in virtualbox and flashing the layout via the gui that way :).
Is there a sneaky way of setting blank keys with the gui? I see the layer switcher is blank, but setting it blank just reverts to the last valid key for me. Loving being able to customize with the gui so far. Can't wait to see where we end up with it.

Going to look into testing the board with hasu's fw later today.

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #310 on: Fri, 15 March 2013, 01:30:00 »
I had no luck with virtualbox running XP either. I just ended up running ubuntu in virtualbox and flashing the layout via the gui that way :) .
Is there a sneaky way of setting blank keys with the gui? I see the layer switcher is blank, but setting it blank just reverts to the last valid key for me. Loving being able to customize with the gui so far. Can't wait to see where we end up with it.

Going to look into testing the board with hasu's fw later today.

This is a bug. You can use 0x00 to make blank keys.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #311 on: Fri, 15 March 2013, 08:12:20 »
If you guys are still having problems I can try and check out the code this weekend and attempt to debug it.

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #312 on: Fri, 15 March 2013, 11:35:14 »
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.


Edit: Just saw keymap.c . :)) Well at least I am slowly but surely figuring everything out.
« Last Edit: Fri, 15 March 2013, 12:53:10 by Glissant »

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: GH60 prototype betatesting
« Reply #313 on: Fri, 15 March 2013, 11:48:46 »
You can use my layout firmware if you want to try it, just need to flash it using FLIP.

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: GH60 prototype betatesting
« Reply #314 on: Fri, 15 March 2013, 12:01:42 »
Glissant, this one is just like a Poker...
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #315 on: Fri, 15 March 2013, 12:17:22 »
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.

There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.


Reconnecting the keyboard should help as well.
« Last Edit: Fri, 15 March 2013, 12:19:07 by komar007 »
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #316 on: Fri, 15 March 2013, 15:40:00 »
I'm not sure if recognized is the right word for what happened. I was unable to communicate with the keyboard with the libusb driver for some reason. It was as if it had frozen. A reboot of my computer didn't fix it either. Unplugging and reconnecting the keyboard didn't solve the issue. I didn't spend a lot of time trying to figure out the issue as I had already spent enough time trying to get the gui to run xD.

I might take some time tomorrow to see if I can figure out what happened.

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: GH60 prototype betatesting
« Reply #317 on: Fri, 15 March 2013, 15:40:55 »
Did you get it working with the hasu FW?
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #318 on: Fri, 15 March 2013, 15:42:10 »
Yes, it's running fine with hasu's firmware with different layouts =).

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #319 on: Fri, 15 March 2013, 16:44:22 »
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.

There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.


Reconnecting the keyboard should help as well.

Komar,

do you have a link to the UI github?

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #320 on: Fri, 15 March 2013, 16:53:05 »
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.

There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.


Reconnecting the keyboard should help as well.

Komar,

do you have a link to the UI github?

Cheers,

Here it is: https://github.com/komar007/ukbdc_gui
You can see that some classes are production-ready and others are crap;)
So the next release will be mainly code cleanup. The bugs are mainly because of how bad this code is, so I'm basically rewriting it from scratch class by class now.
That's why please don't do too much on those ugly classes or you'll have a hard time merging in later.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #321 on: Fri, 15 March 2013, 16:57:49 »
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.

There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.


Reconnecting the keyboard should help as well.

Komar,

do you have a link to the UI github?

Cheers,

Here it is: https://github.com/komar007/ukbdc_gui
You can see that some classes are production-ready and others are crap;)
So the next release will be mainly code cleanup. The bugs are mainly because of how bad this code is, so I'm basically rewriting it from scratch class by class now.
That's why please don't do too much on those ugly classes or you'll have a hard time merging in later.

How would you like me to proceed given this information Komar?

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #322 on: Sat, 16 March 2013, 02:13:35 »
How would you like me to proceed given this information Komar?

Cheers,
You can do whatever you want, just bear in mind this will code will be changing a lot soon.
If you have any questions concerning the code, just drop me a PM.

I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.

I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.

Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.


Edit: Just saw keymap.c . :)) Well at least I am slowly but surely figuring everything out.

I just found the bug. I didn't zero a malloc'ed area:P


EDIT: I updated the op with the new version with the bug fixed. I also added a version preprogrammed with layout, so that you can test on systems where the GUI doesn't work yet. Link: ukbdc_gh60-0.2_rc2_std_layout.hex
« Last Edit: Sat, 16 March 2013, 04:34:24 by komar007 »
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline hasu

  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: GH60 prototype betatesting
« Reply #323 on: Sat, 16 March 2013, 06:19:24 »
I tried new v0.2 feature PWM controled Caps Lock LED and it really works like charm, haha. I love it!

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #324 on: Sat, 16 March 2013, 07:34:55 »
Thanks;)
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #325 on: Sat, 16 March 2013, 09:09:35 »
Ahhh. That's more like it. I finally got my raspberry pi set up on my network. That way I can now just connect my Gh60 board to it when I want to program my layout.

Excellent work, komar :) .

On that note, I am unsure if you have gotten any error reports from what happens in win8 and winxp.


This is from win8, but the error is the same under a virtualbox guest winxp.
Code: [Select]

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
    return self.func(*args)
  File "D:\GH60\ukbdc_gui\gui.py", line 757, in <lambda>
    command = lambda: command("program"),
  File "D:\GH60\ukbdc_gui\gui.py", line 664, in on_menu_action
    u.attach()
  File "D:\GH60\ukbdc_gui\ukbdc_lib\ukbdc.py", line 124, in attach
    idProduct = self.productId
  File "D:\GH60\ukbdc_gui\usb\core.py", line 846, in find
    raise ValueError('No backend available')
ValueError: No backend available


Just tell me if I should stop talking and just keeping stuff to myself xD.




I have a couple of questions too.
Can I program GH60 with komar's firmware to have fn-lock. And if so, can I make it turn the LED on if fn is locked to a specific layer?

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #326 on: Sat, 16 March 2013, 09:19:45 »
Ahhh. That's more like it. I finally got my raspberry pi set up on my network. That way I can now just connect my Gh60 board to it when I want to program my layout.

Excellent work, komar :) .

On that note, I am unsure if you have gotten any error reports from what happens in win8 and winxp.


This is from win8, but the error is the same under a virtualbox guest winxp.
Code: [Select]

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
    return self.func(*args)
  File "D:\GH60\ukbdc_gui\gui.py", line 757, in <lambda>
    command = lambda: command("program"),
  File "D:\GH60\ukbdc_gui\gui.py", line 664, in on_menu_action
    u.attach()
  File "D:\GH60\ukbdc_gui\ukbdc_lib\ukbdc.py", line 124, in attach
    idProduct = self.productId
  File "D:\GH60\ukbdc_gui\usb\core.py", line 846, in find
    raise ValueError('No backend available')
ValueError: No backend available

Thanks, unfortunately I know what happens, I just don't know why, but I hope with a few people already looking into the code, we'll manage to fix that.

Just tell me if I should stop talking and just keeping stuff to myself xD.

I have a couple of questions too.
Can I program GH60 with komar's firmware to have fn-lock. And if so, can I make it turn the LED on if fn is locked to a specific layer?
Certainly do talk. This is beta testing!

Do I understand correctly that fn-lock means you press fn, the layer changes, and then press again to change back?
If so, you can do it. Just set key press action to go to another layer, and on that another layer set a key press action to go to the first layer (as opposed to key release, which is how most keyboards with layers work).
Currently there's no LED control except behaving as caps lock though.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: GH60 prototype betatesting
« Reply #327 on: Sat, 16 March 2013, 09:34:06 »
We needed Glissant doing beta testing from the beginning!

I didn't even think about using my Raspberry Pi to program the GH60 using the gui...
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #328 on: Sat, 16 March 2013, 09:38:42 »
Ah yes, of course. That makes perfect sense when I'm looking at it. I was just stuck on the Poker way of doing it where the combination fn+space changes the layer so that the rshift, rgui, menu and rctrl are arrow keys. But the way that you are proposing will work just fine.
I'm hoping we might be able to include LED control in the future :) .

Sorry to hear that the issue is being a pain in your behind. I was searching google for a while trying to see if I could help, but I'm useless as nothing I tried worked. Well at least I can upload layouts in linux =D.


J.D. I'm just hoping I won't add too much nonsense or misinformation because of my inexperience :).

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: GH60 prototype betatesting
« Reply #329 on: Sat, 16 March 2013, 21:07:31 »
I just want to scream and smash this right now due to how ridiculously frustrating dealing with the firmware is to someone that only knows C as a letter. I really wanted to update with the functioning wake from sleep, but apparently a LOT of other things were changed too and the keymap I had before won't work. I just get a bunch of errors about keymap_key_to_keycode and undefined overlay_bit. I have no idea what the f*ck it is talking about. I don't think the older version I used before had any of whatever that is. I didn't use whatever those are before, so why the f*ck do I have to 'define' them now when I have no idea what it is and there is no reference to them anywhere in my keymap.c?
I am tired of trying to understand C and I have no interest in learning anything about it. Will someone who understands this stuff please just make update firmware for me with my desired layout?
Code: [Select]
     /* Layer 0: qwerty */
    KEYMAP_ANSI(
        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,  \
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT, \
        LCTL,LALT,NO,          SPC,                     FN0, RGUI,APP, RCTL),
    /* Layer 1: GH60 Fn */
    KEYMAP_ANSI(
GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS, \
TRNS,FN1, UP,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP,      TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN,           TRNS, \
TRNS,TRNS,NO,          TRNS,                     FN0, TRNS,TRNS,TRNS)
};


Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #330 on: Sat, 16 March 2013, 21:09:27 »
I just want to scream and smash this right now due to how ridiculously frustrating dealing with the firmware is to someone that only knows C as a letter. I really wanted to update with the functioning wake from sleep, but apparently a LOT of other things were changed too and the keymap I had before won't work. I just get a bunch of errors about keymap_key_to_keycode and undefined overlay_bit. I have no idea what the f*ck it is talking about. I don't think the older version I used before had any of whatever that is. I didn't use whatever those are before, so why the f*ck do I have to 'define' them now when I have no idea what it is and there is no reference to them anywhere in my keymap.c?
I am tired of trying to understand C and I have no interest in learning anything about it. Will someone who understands this stuff please just make update firmware for me with my desired layout?
Code: [Select]
     /* Layer 0: qwerty */
    KEYMAP_ANSI(
        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,  \
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT, \
        LCTL,LALT,NO,          SPC,                     FN0, RGUI,APP, RCTL),
    /* Layer 1: GH60 Fn */
    KEYMAP_ANSI(
GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS, \
TRNS,FN1, UP,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP,      TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN,           TRNS, \
TRNS,TRNS,NO,          TRNS,                     FN0, TRNS,TRNS,TRNS)
};



lysol,

     Does the UI not work for you?

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: GH60 prototype betatesting
« Reply #331 on: Sat, 16 March 2013, 21:27:35 »
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #332 on: Sat, 16 March 2013, 21:33:00 »
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.

I hear ya. I've been reading up on the UI code. Unfortunately tk is a maze. I'll have to talk to my other python friend and see if we can figure out what is / isn't working for Windows.

Komar:

from tkinter import *

C'mon man! >.<" Cut a brother some slack :P

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: GH60 prototype betatesting
« Reply #333 on: Sat, 16 March 2013, 21:44:00 »
Success, it works now with resume from sleep. I am satisfied with it and I am probably done tinkering with it now. Here is what I had to do to get it to work... I scrapped the old file I was using from before and copy pasta into the new keymap.c replacing the 'funky' layout with mine.

Code: [Select]
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "layer_switch.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"


/* GH60 keymap definition macro
 * K2C, K31 and  K3C are extra keys for ISO
 */
#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_NO,    KC_##K45, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D }  \
}

/* ANSI valiant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,           K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO,  K3D, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
)


#if defined(KEYMAP_PLAIN)
    #include "keymap_plain.h"
#elif defined(KEYMAP_POKER)
    #include "keymap_poker.h"
#elif defined(KEYMAP_POKER_SET)
    #include "keymap_poker_set.h"
#elif defined(KEYMAP_POKER_BIT)
    #include "keymap_poker_bit.h"
#else
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /*
     * GH60
     */
    /* Keymap 0: Default Layer
     */
    KEYMAP_ANSI(
        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,  \
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT, \
        LCTL,LALT,NO,          SPC,                     FN0, RGUI,APP, RCTL),
    /* Overlay 1: Fn mode
     */
    KEYMAP_ANSI(
GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS, \
TRNS,FN1, UP,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP,      TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN,           TRNS, \
TRNS,TRNS,NO,          TRNS,                     FN0, TRNS,TRNS,TRNS)
};

static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {};

/*
 * Fn action definition
 */
static const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_KEYMAP_MOMENTARY(1),
};
#endif



#define KEYMAPS_SIZE    (sizeof(keymaps) / sizeof(keymaps[0]))
#define OVERLAYS_SIZE   (sizeof(overlays) / sizeof(overlays[0]))
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))

/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
    /* Overlay: 16-31(OVERLAY_BIT(0x10) | overlay_layer) */
    if (layer & OVERLAY_BIT) {
        layer &= OVERLAY_MASK;
        if (layer < OVERLAYS_SIZE) {
            return pgm_read_byte(&overlays[(layer)][(key.row)][(key.col)]);
        } else {
            // XXX: this may cuaes bootlaoder_jump incositent fail.
            //debug("key_to_keycode: overlay "); debug_dec(layer); debug(" is invalid.\n");
            return KC_TRANSPARENT;
        }
    }
    /* Keymap: 0-15 */
    else {
        if (layer < KEYMAPS_SIZE) {
            return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
        } else {
            // XXX: this may cuaes bootlaoder_jump incositent fail.
            //debug("key_to_keycode: base "); debug_dec(layer); debug(" is invalid.\n");
            // fall back to layer 0
            return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]);
        }
    }
}

/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
    action_t action;
    if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) {
        action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
    } else {
        action.code = ACTION_NO;
    }
    return action;
}
« Last Edit: Sat, 16 March 2013, 22:08:03 by IvanIvanovich »

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #334 on: Sun, 17 March 2013, 02:29:57 »
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.

I hear ya. I've been reading up on the UI code. Unfortunately tk is a maze. I'll have to talk to my other python friend and see if we can figure out what is / isn't working for Windows.

Komar:

from tkinter import *

C'mon man! >.<" Cut a brother some slack :p

Cheers,

There are no problems with tkinter on windows. Everything currently works, it's only a problem with the libusb/pyusb code.
Please write to me if you have any questions.
« Last Edit: Sun, 17 March 2013, 02:36:38 by komar007 »
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline SmallFry

  • ** Moderator Emeritus
  • Posts: 3887
  • Location: Wisconsin, USA
  • Leaving 6/15; returning 6/22 or so.
Re: GH60 prototype betatesting
« Reply #335 on: Sun, 17 March 2013, 03:06:33 »
Wait LibUSB is 32bit only isn't it?

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #336 on: Sun, 17 March 2013, 07:16:34 »
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.

I hear ya. I've been reading up on the UI code. Unfortunately tk is a maze. I'll have to talk to my other python friend and see if we can figure out what is / isn't working for Windows.

Komar:

from tkinter import *

C'mon man! >.<" Cut a brother some slack :p

Cheers,

There are no problems with tkinter on windows. Everything currently works, it's only a problem with the libusb/pyusb code.
Please write to me if you have any questions.

Komar,

I'm sorry mate, Just giving you a hard time. I'm just working through the gui.py file little by little and I'll pm you with qs.

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline OrangeJewce

  • ssk.ℜ
  • Posts: 495
  • Location: Minnesota
  • King of the Jewce
Re: GH60 prototype betatesting
« Reply #337 on: Sun, 17 March 2013, 07:16:56 »
Wait LibUSB is 32bit only isn't it?

That shouldn't be a problem on win7/8.

Cheers,
IBM Model M 1390120, Otaku Unicomp+RGB, CM QFR Green, Ducky YOTD Red, SSK MKII,
ErgoDox Blue, ErgoDox White

Offline hasu

  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: GH60 prototype betatesting
« Reply #338 on: Sun, 17 March 2013, 08:11:17 »
I ran across this issue of python. Looks like this is our problem and PyUSB doesn't work on Windows with Python3.3 but it works with Python 2. GUI script seems to depend on some features of Python3. I couldn't run it with Python2 because I don't know about even syntax of the language. I live in very country of red jewel, you know :)

Someone can port komar's scripts to Python 2 and see if it works on Windows?


Offline hasu

  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: GH60 prototype betatesting
« Reply #339 on: Sun, 17 March 2013, 08:12:29 »
Sorry for double post :(

The issue is this.
https://github.com/walac/pyusb/issues/14
« Last Edit: Sun, 17 March 2013, 08:14:12 by hasu »

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #340 on: Sun, 17 March 2013, 08:58:20 »
Sorry for double post :(

The issue is this.
https://github.com/walac/pyusb/issues/14

Good job. Thanks!
I'll work around that bug.


Ok, so I got down to debugging and went deep into pyusb, and there are a couple of problems which cause it.
1. The bug in Python mentioned by hasu, I worked around it by adding the ".dll" extension to library's name
2. when I fixed it, python started screaming about an undefined variable inside pyusb, and that was indeed an error in pyusb, so I fixed it
3. after that, it couldn't retrieve the interface descriptor for interface 1, claiming that bNumInterfaces was 1, which is in fact 2...
4. now I have no idea why this is so or where the bug is, so I just removed that code, since I needed it only to get wMaxPacketSize and hardcoded it as 64:)


Please test if it works now.
* ukbdc_gui_win7.7z (61.75 kB - downloaded 249 times.)
« Last Edit: Sun, 17 March 2013, 10:34:24 by komar007 »
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #341 on: Sun, 17 March 2013, 11:45:24 »

Really glad you are making some progress with the firmware. I am currently trying it, and this is what happens when I try to send the layout to the keyboard in windows 8.
Code: [Select]
Exception in Tkinter callback
Traceback (most recent call last):
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 129, in attac
h
    usb.util.claim_interface(self.dev, self.interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\util.py", line 191, in claim_interf
ace
    device._ctx.managed_claim_interface(device, interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 112, in managed_clai
m_interface
    self.backend.claim_interface(self.handle, i)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 462, in
claim_interface
    _check(_lib.usb_claim_interface(dev_handle, intf))
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 384, in
_check
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'usb_claim_interface: could not claim interface
 1, invalid configuration 0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
    return self.func(*args)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
    command = lambda: command("program"),
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
    u.attach()
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 131, in attac
h
    self.dev.detach_kernel_driver(self.interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 712, in detach_kerne
l_driver
    self._ctx.backend.detach_kernel_driver(self._ctx.handle, interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 546, in
detach_kernel_driver
    _check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
  File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'usb_detach_kernel_driver_np' not found

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: GH60 prototype betatesting
« Reply #342 on: Sun, 17 March 2013, 11:55:41 »
I can get the gui tool to work, so that portion seem ok now. For some key, you can just press a character and it can assign it this way which is good and easy. For others you need to enter scancode specifically for all the non character key. Including a table of these with the package would be a good thing so don't have to go hunting for them somewhere. Also confused of how to assign a Fn key here.
Also get same as Glissant when try to move past the assign stage to send to keyboard.

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting
« Reply #343 on: Sun, 17 March 2013, 13:20:41 »

Really glad you are making some progress with the firmware. I am currently trying it, and this is what happens when I try to send the layout to the keyboard in windows 8.
Code: [Select]
Exception in Tkinter callback
Traceback (most recent call last):
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 129, in attac
h
    usb.util.claim_interface(self.dev, self.interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\util.py", line 191, in claim_interf
ace
    device._ctx.managed_claim_interface(device, interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 112, in managed_clai
m_interface
    self.backend.claim_interface(self.handle, i)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 462, in
claim_interface
    _check(_lib.usb_claim_interface(dev_handle, intf))
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 384, in
_check
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'usb_claim_interface: could not claim interface
 1, invalid configuration 0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
    return self.func(*args)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
    command = lambda: command("program"),
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
    u.attach()
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 131, in attac
h
    self.dev.detach_kernel_driver(self.interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 712, in detach_kerne
l_driver
    self._ctx.backend.detach_kernel_driver(self._ctx.handle, interface)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 546, in
detach_kernel_driver
    _check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
  File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'usb_detach_kernel_driver_np' not found
Thanks for info. I've tested it on windows 7, and it worked, so apparently there's still something with windows 8, but I've read that libusb is not supported on this system yet.

Could you try and change line 131 of /ukbdc_lib/ukbdc.py from:
self.dev.detach_kernel_driver(self.interface)
to:
pass
and see what happens?


I can get the gui tool to work, so that portion seem ok now. For some key, you can just press a character and it can assign it this way which is good and easy. For others you need to enter scancode specifically for all the non character key. Including a table of these with the package would be a good thing so don't have to go hunting for them somewhere. Also confused of how to assign a Fn key here.
Also get same as Glissant when try to move past the assign stage to send to keyboard.
Good idea. Ideally, we should have a list or grid of most common scancodes to choose from by clicking. For now you can see all available scancodes and their names in /ukbdc_lib/mnemonics.py.
What do you mean by Fn? A key which changes layer when pressed?
You just put 0x00 as scancode, so that it doesn't send anything (this is a bug, you should be able to leave it empty) and assign a press action that goes to another layer. Then on that layer set that same key to go back to layer 0 (release action).
You can use layer inheritance for this. Define layer 0, then set layer 1 to inherit from layer 0, and only change the keys that are different than on layer 0.
« Last Edit: Sun, 17 March 2013, 13:25:21 by komar007 »
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline SmallFry

  • ** Moderator Emeritus
  • Posts: 3887
  • Location: Wisconsin, USA
  • Leaving 6/15; returning 6/22 or so.
Re: Re: GH60 prototype betatesting
« Reply #344 on: Sun, 17 March 2013, 15:36:40 »
Wait LibUSB is 32bit only isn't it?

That shouldn't be a problem on win7/8.

Cheers,
Don't mind me then:)

Offline Glissant

  • Posts: 1976
  • Location: Oslo, Norway
Re: GH60 prototype betatesting
« Reply #345 on: Sun, 17 March 2013, 15:51:03 »
I wish I knew more code so I could help out more than just post error messages xD.
This is what happens after 131 has been changed.
Code: [Select]
Exception in Tkinter callback
Traceback (most recent call last):
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 178, in get_endpoint
_type
    return self._ep_type_map[key]
KeyError: (3, 0, 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
    return self.func(*args)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
    command = lambda: command("program"),
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
    u.attach()
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 140, in attac
h
    self.reset()
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 166, in reset

    self.write_packet(Reset())
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 151, in write
_packet
    self.dev.write(self.ep_out, bytes(p), timeout = self.tm_out)
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 611, in write
    fn = fn_map[self._ctx.get_endpoint_type(self, endpoint, intf)]
  File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 181, in get_endpoint
_type
    etype = util.endpoint_type(e.bmAttributes)
AttributeError: 'NoneType' object has no attribute 'bmAttributes'


Edit:


By the way! Is it possible to have two or three switches instead of the right shift? I hardly use the right shift, and thought I might enjoy putting more switches there, but I was unsure if I would be able to make them work or not. And if it's possible I was also thinking about putting two switches instead of the left shift too. Hmmmm.
« Last Edit: Mon, 18 March 2013, 07:02:07 by Glissant »

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting [Please test the GUI]
« Reply #346 on: Mon, 18 March 2013, 08:21:19 »
You can have either right shift, or short shift + one button, either to the left or to the right of shift. You can't have 3 though, since the 2 footprints on the sides of shift are connected to the same row and column.
On the left side you can have either just shift or short shift and a button to the right of it.
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting [Please test the GUI]
« Reply #347 on: Mon, 18 March 2013, 08:57:49 »
Please, anyone with windows 7 or older wants to test?
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard

Offline Nask

  • Posts: 91
Re: GH60 prototype betatesting [Please test the GUI]
« Reply #348 on: Mon, 18 March 2013, 09:02:28 »
Yeah sure, I'm on Windows 8 Pro, if I can help, :)
Keyboards: IBM SSK | Noppoo Choc Mini MX-Blue | PLU ML-87 MX-Brown | CM QFR Mx-Red | CM Novatouch

Offline komar007

  • Thread Starter
  • Posts: 712
  • Location: Poland
    • komar's blog
Re: GH60 prototype betatesting [Please test the GUI]
« Reply #349 on: Mon, 18 March 2013, 09:03:47 »
But I need someone with the GH60 prototype...:/
GH60 rev. B w/ ali's case|Cherry G80-3000 HFU/05|IBM Model M (51G8572)
Check out the GH60 project! | How to make a keyboard