Jump to content

Use without drivers, HID compliance?


RIT-V300

Recommended Posts

I would like to set up the demonseed to function on a computer without digispark's drivers. Currently it only functions on the PC I used to program it, and is recognized as a digispark device and given those drivers before it will begin to type things. If I plug it into my laptop however, which does not have the drivers, it doesn't do anything. From windows I get an error along the lines of "device descriptor failed" and on my ubuntu partition I get the following errors from "dmesg":

[  534.334807] usb 3-1: new low-speed USB device number 2 using xhci_hcd
[  534.462833] usb 3-1: device descriptor read/64, error -71
[  534.698827] usb 3-1: device descriptor read/64, error -71
[  534.934783] usb 3-1: new low-speed USB device number 3 using xhci_hcd
[  535.062829] usb 3-1: device descriptor read/64, error -71
[  535.298831] usb 3-1: device descriptor read/64, error -71
[  535.406889] usb usb3-port1: attempt power cycle
[  536.058824] usb 3-1: new low-speed USB device number 4 using xhci_hcd
[  536.059334] usb 3-1: Device not responding to setup address.
[  536.267336] usb 3-1: Device not responding to setup address.
[  536.474829] usb 3-1: device not accepting address 4, error -71
[  536.602838] usb 3-1: new low-speed USB device number 5 using xhci_hcd
[  536.603349] usb 3-1: Device not responding to setup address.
[  536.811343] usb 3-1: Device not responding to setup address.
[  537.020176] usb 3-1: device not accepting address 5, error -71
[  537.020291] usb usb3-port1: unable to enumerate USB device
 

I searched around online and I suspect the demonseed is not set up to send a proper HID response, and currently relies on the digispark drivers to tell the OS that it's supposed to be a keyboard. I'm totally new to the entire area of hardware related anything though, so I really have no idea. Am I on the right track here, and if so is there a way I can get the demonseed to properly respond so it's not reliant on the drivers to function?

Link to comment
Share on other sites

Good job on chasing down the windows 10 driver situation in the other thread! That doesn't seem to be an issue on other OS's.

Luckily, the keyboard emulation uses the DigiKeyboard library that the extremely common DigiSpark uses (so you'll likely find tons of people with your issue if it exists there. Same with the micronucleus bootloader. 

Just for clarity, there are 2 modes that are presented to the computer when you plug in a fully programmed DemonSeed: 
1 - the first 5 seconds is the micronucleus bootloader. In the situation where you needed a driver, it was for this. 
2 - after the bootloader timeout, the ATTiny will run whatever code has been programmed. In our case (up through Episode 5), it should be a simple DigiKeyboard based sketch. That will be emulating a low speed USB keyboard. Unless things have significantly changed, a low speed USB keyboard is going to be plug & play on basically every OS. I have never heard of a driver being needed there. 

I have never seen your specific issue, but I almost wonder if Windows is getting confused by the DigiKeyboard sketch starting too quickly after the bootloader. So putting a delay at the very top of the setup section would be a good test. To really be sure, you can even make sure that our pull-up resistor is disabled by setting the pin to input mode. This will make it look like the device has actually been unplugged to the host.  Start with 5sec and adjust from there.  

#include "DigiKeyboard.h"

void setup() {
	pinMode(2, INPUT); 		// pin should already be input, but just to be safe
	delay(5000);			// give enough time for things to settle
	pinMode(2, OUTPUT);		// 
	digitalWrite(2, HIGH);	// now present as  USB device to the host again
}

void loop() {

	DigiKeyboard.sendKeyStroke(0);
	DigiKeyboard.println("test");  
	DigiKeyboard.delay(1000);  	// type "test" every 1sec, so open notepad to verify. 
}

 

 





If you continue to have issues: 


1 - verify the fuse settings:

avrdude -p attiny85 -c usbasp

your extended fuse should be FE, your high fuse should be DD, and your low fuse should be E1 


2 - make sure you can execute the most simple keyboard sketch payload on any machine. 

3 - Also, you might be experiencing some sort of compile/upload issues that are hidden due to the default Arduino IDE settings. So just go and turn on error output. Preferences > Show verbose output during: [check both the compilation and upload checkbox]

4 - Try this with your 2nd DemonSeed board just to rule out any potential hardware and/or soldering issues. 

5 - If all of that fails, you may have some OS specific issues that may just need to be resolved by googling around for DigiKeyboard/DigiSpark/VUSB and your issue. There is a lot of info in the digistump forums about similar issues along these lines.  

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...