Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: ExtendeD on April 20, 2013, 07:40:49 am

Title: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD 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 (http://www.unsads.com/projects/nsptools/downloader/download/release/5) now makes available the *BSD USBDI API to be able to write our own USB device drivers and integrate them to the OS.

HIDn (http://www.unsads.com/projects/nsptools/downloader/download/release/6) 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 (http://www.unsads.com/projects/nsptools/downloader/download/release/1) 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 (http://ndlessly.wordpress.com/).

[ 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

Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Hayleia 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
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 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.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Darl181 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
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid 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 :)
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: persalteas on April 20, 2013, 02:57:39 pm
Works on the CX, yes !

very good !

(http://tiplanet.org/forum/gallery/image.php?mode=medium&album_id=169&image_id=2399)
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 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.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 20, 2013, 03:45:33 pm
I tried a lot floris.
heyy somebody should write stuff to run wifi! Mobile internetz? :OOO
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Rhombicuboctahedron 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
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Hayleia 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 ?
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD 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() (http://hackspire.unsads.com/wiki/index.php/Libndls#Keyboard). I haven't yet checked if cursor movements are correctly propagated.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 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.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD on April 21, 2013, 05:42:32 am
It probably acts as a USB hub.
critor also got one work (http://tiplanet.org/forum/viewtopic.php?p=138855#p138855). My 2 hubs strangely make the calculator crash.
Has anyone else had mouse + keyboard work with a standard hub?
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: critor 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...
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD 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.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Rhombicuboctahedron on April 21, 2013, 10:25:53 am
Has anyone else had mouse + keyboard work with a standard hub?
I got it with my hub in the above video. It works completely fine.
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.
I found that the cursor image sometimes disappears, more often with menus, but it always reappears.

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.
 
Sometimes I have to jumpstart the mouse my swiping the touchpad. However, quite often it works on its own.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 04:31:32 pm
Well I hate the graphic problem when you start the mouse/trackpad and it displays random junk.
I still can't get keyboards working... It may be because mine is an extremely new model.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 on April 21, 2013, 04:34:17 pm
Well I hate the graphic problem when you start the mouse/trackpad and it displays random junk.
I still can't get keyboards working... It may be because mine is an extremely new model.
what is your model number? mine is A1243 and mine works
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 04:36:21 pm
idk what it is, tell me how to find it.
I'm guessing P-0812F
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: lkj on April 21, 2013, 04:38:11 pm
Great work, Extended :D

Well I hate the graphic problem when you start the mouse/trackpad and it displays random junk.
That's a bug in TI's OS, it's also there if you use the touchpad.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 on April 21, 2013, 04:39:01 pm
you have an Apple keyboard right? an the bottom Model no.:______
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 04:40:39 pm
ooohhh well I meant my calculator is extremely new, my apple keyboard doesn't have one D:
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 on April 21, 2013, 04:42:06 pm
do you have an old or new apple kb, it should be somewhere on the bottom.. in light grey
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 04:42:47 pm
new. Like the kind that comes with Apple computers before Leopard
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 on April 21, 2013, 04:45:34 pm
a flat one? then it must be on th bottom. btw leopard is 10.5 and we are now at 10.8 so it might be not so new?
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 04:46:28 pm
Flat, yes and you're right
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: floris497 on April 21, 2013, 04:50:26 pm
if it is the flat one it might work if you plug it in a few times
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Dapianokid on April 21, 2013, 05:12:02 pm
K.

Supplying the keyboard with enough power wouldn't be the easiest thing to do?
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ajorians on April 23, 2013, 11:31:21 am
Hi ExtendeD,

I hit a small issue; the nSDL library file in the 'lib' folder is different than the one under '3rd' folder.  Here is md5sum:
926a71970b77cbbdaeffb73fd3ec78b3  ndless-v3.1-beta-r765-sdk/ndless/lib/libSDL.a
7c7e9b91d6ffd45f9adeb88e38ce7dc0  ndless-v3.1-beta-r765-sdk/ndless/3rd/nSDL/lib/libSDL.a

After copying over the library file from the '3rd' folder and everything works perfectly! :)

Also, if I clean/rebuild the helloworld-sdl sample it didn't run for me.

I posted this here instead of a PM because I thought it might be useful in case somebody else hit this too!

Thanks for reading and have a great day!
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD on April 24, 2013, 03:16:52 am
Thanks, I had uncommited updates that included library upgrades, I have probably mixed things up when getting back to work.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: DJ Omnimaga on April 24, 2013, 03:32:09 am
With all those amazing releases, I am surprised that ExtendeD doesn't have a post rating higher than his post count yet... O.O
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Hayleia on April 24, 2013, 01:03:47 pm
With all those amazing releases, I am surprised that ExtendeD doesn't have a post rating higher than his post count yet... O.O
Jacobly is closer to that in fact :P
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: TheNlightenedOne on April 24, 2013, 04:53:43 pm
This does look very nice. Next time I load onto my Nspire I'll install the latest Ndless and the USB drivers. I'm very pleased you got it to work, ExtendeD.
On a side note, can one install a different version of Ndless with nLaunch? ???
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Rhombicuboctahedron on April 24, 2013, 05:02:20 pm
With all those amazing releases, I am surprised that ExtendeD doesn't have a post rating higher than his post count yet... O.O
Jacobly is closer to that in fact :P
I remember tangrs use to be something like 65 post rating for 80 posts
This does look very nice. Next time I load onto my Nspire I'll install the latest Ndless and the USB drivers. I'm very pleased you got it to work, ExtendeD.
On a side note, can one install a different version of Ndless with nLaunch? ???
USB support only works with the latest version of ndless, so you wouldn’t be able to use this if you did load a different version.
Although I’ve only had ndless for a year, I’m sure if you load it with the correct os it should work.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: ExtendeD on April 24, 2013, 05:33:38 pm
It has been reported to work, but I'm not a user of nLaunch, I won't be able to help.

I worked a few years ago on the USB stack of the TI-89 Titanium and was not able to release something really stable and usable (though it was tougher as we had to look deeper into the USB controller workings with the help of Dan Englander, since the 84+ and the Titanium share the same USB hardware).

so I'm glad to be able to see it work on the Nspire. This opens interesting opportunities, I'm looking forward to 3rd parties drivers, and maybe *BSD ones.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: AlexisVieira on April 24, 2013, 07:06:15 pm
On a side note, can one install a different version of Ndless with nLaunch? ???

yes, i've done it. Seeing your profile i see that you have the a cx and a non cx nspire, if you want to have nlaunch and this ndless you have to delete the ndless folder on the end of the 8th step on the tutorial http://tiplanet.org/forum/viewtopic.php?f=57&t=11019, after finish simply install the new ndless and the hidn... with the cx should be a similar process but i don't tried because i don't have one...
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: DJ Omnimaga on April 25, 2013, 12:32:25 am
With all those amazing releases, I am surprised that ExtendeD doesn't have a post rating higher than his post count yet... O.O
Jacobly is closer to that in fact :P
I remember tangrs use to be something like 65 post rating for 80 posts
Yeah but that doesn't count as much because they don't have 700+ posts :P.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: crazyracer98 on June 01, 2013, 01:12:09 pm
Hi,
@ExtendeD: How did you find out the TI Nspire scancodes?

PS:
Spoiler For Spoiler:
https://www.dropbox.com/s/kw44x6otnmdnzb6/usbhidn-qwertz.tns
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: GinDiamond on July 09, 2014, 07:08:09 pm
This should definitely be improved upon
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: bb010g on July 09, 2014, 11:12:01 pm
This should definitely be improved upon
Holy necropost, Batman!
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Streetwalrus on July 10, 2014, 05:31:17 am
This should definitely be improved upon
Holy necropost, Batman!
That. :P Also, why not go ahead and try to do that yourself ? :)
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: GinDiamond on July 10, 2014, 10:08:16 am
I am, actually. I'm trying to add in the hex addresses for the keyboard so one can use the menu, caps lock, special characters, parentheses (good for lua programming via jse) and the like. Its difficult, and alot of trial and error. I was very impressed that it worked on the os 3.6
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Streetwalrus on July 10, 2014, 10:56:00 am
Well, Ndless has been ported, no reason why it wouldn't work on OS 3.6.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Jonson26 on March 11, 2017, 05:56:23 pm
Hi, there! I think the download link might be broken. :(
Does anyone know how to fix this? If not, is there anyone
around, that has an existing build and could post it? Doing
something about it would be REALLY nice.

P.S.: Am I the only one  to see this? There's even a link to this thread on ndlessly, and they seem to not have noticed it too.
P.P.S: First post!  :)
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Eeems on March 12, 2017, 09:29:18 pm
Hi, there! I think the download link might be broken. :(
Does anyone know how to fix this? If not, is there anyone
around, that has an existing build and could post it? Doing
something about it would be REALLY nice.

P.S.: Am I the only one  to see this? There's even a link to this thread on ndlessly, and they seem to not have noticed it too.
P.P.S: First post!  :)
Bit of a necro post there, this thread is almost 3 years old.
You can find ndless and it's sdk here (http://ndless.me/). As for HIDn, I was able to find a copy on TI-Planet here (https://tiplanet.org/forum/archives_voir.php?id=12928). I'm not sure how up to date it is though.
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Jonson26 on March 13, 2017, 04:14:28 am
Thanks! :)
Title: Re: HIDn - USB HID drivers for the TI-Nspire
Post by: Jonson26 on July 12, 2017, 12:55:48 pm
Got it working! :)
I found a good adapter in a weird chinese shop ("Asia Market") in Spain.
BTW, are there any ndless programs supporting usb keyboards?