Author Topic: HIDn - USB HID drivers for the TI-Nspire  (Read 36901 times)

0 Members and 1 Guest are viewing this topic.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
HIDn - USB HID drivers for the TI-Nspire
« on: April 20, 2013, 07:40:49 am »
This has been an unreleased project for a while, but I have recently been able to make it releasable.

The Ndless SDK r765 now makes available the *BSD USBDI API to be able to write our own USB device drivers and integrate them to the OS.

HIDn is a set of HID resident drivers (keyboard and mouse) with TI-Nspire OS integration. This means it can be used as an alternative to the calculator's keyboard and pad. Integration with Ndless programs won't work as is but is possible in the future.

Ndless r765 is required by HIDn, make sure to update.

This is an alpha version with several limitations, thank you for your feedback. You may subscribe for future updates on Ndlessly.

[ Invalid YouTube link ]

(Credits to Rhombicuboctahedron for the video)


FAQ

Can both a mouse and a keyboard be used simultaneously?
Yes, with an USB hub. Some hubs seem to make the OS crash though.

Interaction with the scrollbar is not standard.
This is an TI OS bug.

Some buggy tiles appear on the screen when the cursor is moved.
This is a TI OS bug.

Device XYZ doesn't work well.
Please report the exact hardware used and the unexpected behavior.


Known issues and planned improvements

  • The mouse can't go over the top bar
  • The mouse cursor doesn't show up in some screens
  • Right mouse button will be bound to ctrl+menu
  • Mouse wheel will be bound to up/down
  • Currently partial keyboard mapping to be entirely reworked
  • Random crashes. Please provide any additional helpful info on these.
  • Lua programs with timers or scores may display absurd numbers
« Last Edit: April 22, 2013, 04:18:04 pm by ExtendeD »
Ndless.me with the finest TI-Nspire programs

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #1 on: April 20, 2013, 07:45:22 am »
(Yay first to give a +1 :P)

Great work, as usual :)
But did you mean r765 instead of r575 ?

edit was fixed on the post above
« Last Edit: April 20, 2013, 12:59:06 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline floris497

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 210
  • Rating: +8/-0
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #2 on: April 20, 2013, 07:45:59 am »
i will test it right now :D this is awesome!

Edit:
After dragging the scroll bar the mouse is attached to the bar and can be released with a click (seems logical since the touchpad works like that)
sometimes (most of the time after opening a menu) the cursor disappears but the mouse stays working, and only gets back after rebooting.

i see you used the button presses to handle the mouse, since it won't go into the top bar.
« Last Edit: April 20, 2013, 08:02:03 am by floris497 »

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #3 on: April 20, 2013, 12:26:35 pm »
I can confirm that this works on the CX :D
(MX anywhere, through unifying receiver)
Edit: can the scroll wheel be implemented as up/down keypresses? Maybe back/forward buttons can be Ctrl+9/3 (pgUp/pgDn)?
Edit2: same problem as previous post - mouse won't go into titlebar

Edit3: got both mouse and keyboard (k360) working at the same time :crazy:

Edit4: another request: moving the mouse activates the mouse on-calc so we don't have to swipe the touchpad
« Last Edit: April 20, 2013, 05:10:36 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #4 on: April 20, 2013, 02:31:21 pm »
I have used a USB mouse with this and it had no problems, but Apple keyboards dont work.
I'm going to use my calculator running USBpad8x later to test :)
Keep trying.

Offline persalteas

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 231
  • Rating: +44/-4
  • z80 poweeer
    • View Profile
    • Tout-82
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #5 on: April 20, 2013, 02:57:39 pm »
Works on the CX, yes !

very good !



Offline floris497

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 210
  • Rating: +8/-0
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #6 on: April 20, 2013, 03:30:13 pm »
I have used a USB mouse with this and it had no problems, but Apple keyboards dont work.
I'm going to use my calculator running USBpad8x later to test :)
my apple keyboard works after plugging it in the second time.

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #7 on: April 20, 2013, 03:45:33 pm »
I tried a lot floris.
heyy somebody should write stuff to run wifi! Mobile internetz? :OOO
Keep trying.

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #8 on: April 20, 2013, 07:54:59 pm »

If you make a little stand for the nspire and sit back in a chair and play Lua games, it feels pretty cool
Sadly, this doesn’t work with ndless programs, so no keyboard and Mario cart
And on another note, for some reason all the Lua games have crazy numbers for scores, though that could be nlaunch, ndless or my own calculator

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #9 on: April 21, 2013, 02:20:41 am »
I tried a lot floris.
heyy somebody should write stuff to run wifi! Mobile internetz? :OOO
Did you try Linux on Nspire yet ? And Jimbauwens also made a browser in Lua, did you try it too ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #10 on: April 21, 2013, 03:21:58 am »
Hayleia: Thanks.

Rhombicuboctahedron: Nice :)

Edit: can the scroll wheel be implemented as up/down keypresses? Maybe back/forward buttons can be Ctrl+9/3 (pgUp/pgDn)?

Sure, this is planned.

Quote
Edit3: got both mouse and keyboard (k360) working at the same time :crazy:

What do you mean?

Quote
Edit4: another request: moving the mouse activates the mouse on-calc so we don't have to swipe the touchpad

Do you mean for example that the cursor should reappear in the My Documents screen after switching to the Graph screen? I don't have an CX, you'll need to give me details for these behaviors.

* Is the mouse scale OK for all of you? Or would moving the mouse more to move the TI-Nspire cursor be better?

* For Ndless programmers who want to update their programs for USB compatibility, you will need to (currently untested):
- Keep the interrupts enabled. We'll need to find a way to get read of the clock cursor.
- Poll for keyboard and cursor events with get_event(). I haven't yet checked if cursor movements are correctly propagated.
Ndless.me with the finest TI-Nspire programs

Offline floris497

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 210
  • Rating: +8/-0
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #11 on: April 21, 2013, 03:47:56 am »

Quote
Edit3: got both mouse and keyboard (k360) working at the same time :crazy:

What do you mean?


he uses an wireless usb receiver with multiple devices, that is a nice trick to get both keyboard and mouse to work.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #12 on: April 21, 2013, 05:42:32 am »
It probably acts as a USB hub.
critor also got one work. My 2 hubs strangely make the calculator crash.
Has anyone else had mouse + keyboard work with a standard hub?
Ndless.me with the finest TI-Nspire programs

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #13 on: April 21, 2013, 08:07:29 am »
I don't know if they're related to the hub or not, but I did manage to get some reboots while using the calculator after everything went well for some time.

Hope it can help...
« Last Edit: April 21, 2013, 08:07:42 am by critor »
TI-Planet co-admin.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: HIDn - USB HID drivers for the TI-Nspire
« Reply #14 on: April 21, 2013, 09:08:30 am »
sometimes (most of the time after opening a menu) the cursor disappears but the mouse stays working, and only gets back after rebooting.

Is it different than with the touchpad?
Note that any weird behavior of the TI-Nspire OS for the touchpad will reappear as is with USB devices, we can't do much about it.
« Last Edit: April 21, 2013, 09:08:42 am by ExtendeD »
Ndless.me with the finest TI-Nspire programs