Author Topic: Digispark ATTINY85 USB Device Communication with WIN7  (Read 1197 times)

newbee20

  • Newbie
  • *
  • Posts: 6
Digispark ATTINY85 USB Device Communication with WIN7
« on: December 02, 2018, 01:59:30 am »
Hi
  I've recently started working on the device, It took ample of time for installation of the device, but I have finally succeeded.

    I would like to know if we can get a message pop up, say "Hello" on the Computer screen when the device is connected.
                "Not in the serial port or notepad or using keystroke".
    When the device is connected a pop up should open and close within 10 seconds.

And let me know the exact process about it.


Thanks in Advance
 
 

granzeier

  • Jr. Member
  • **
  • Posts: 55
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #1 on: December 02, 2018, 04:24:00 am »
By eliminating the serial/USB communications and a v-keyboard, you have moved the solution from the Digispark to the operating system of your computer. You would have to either modify the USB driver to pop up the "Hello" window, or you would need to write an application which continuously monitors the USB ports and opens the "Hello" window when it sees the Digispark on any of the USB ports.

The only way to do this on the Digispark alone would be to use Digikeyboard to send the shortcut keys for your program (such as Notepad - which you say that you do not want to use,) and then type the "Hello" into that program's window.

newbee20

  • Newbie
  • *
  • Posts: 6
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #2 on: December 02, 2018, 05:09:50 am »
Thanks for the reply Granzeier..
     
         Yes I wanted to have a small text box popped up as I connect the Digispark device and get disabled in 10 seconds. Rather than the serial port or Notepad communication.

 I hope you were referring to this link about the usb drivers? https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip

I don't want to mess up the usb ports of my system to read HELLO for every device connected. So rather changing the driver for Digispark would be a better option as per your suggestion..

Is it possible? Kindly provide link for some reference...

Thank you

granzeier

  • Jr. Member
  • **
  • Posts: 55
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #3 on: December 02, 2018, 06:32:30 pm »
Sorry, I did not have anything specific in mind. I was thinking more generically of modifying either the USB driver, or the Digispark driver. You seem to have found the latter, but I have not done any work on drivers since before Windows 3.  :(
Can you give any more information on what you want? Something like what the Digispark will do (maybe take temperature readings from a sensor), and what the message will say (perhaps: "Plug the sensor into the Digispark so that it can take the readings." or something???) That may help us to come up with solutions, work-arounds or possible alternative ideas.
It looks like you are on the right track, but that's about as far as I can go here. Maybe if I can get some free time, I will take a look at the drivers, and see if I can get anywhere.
Anyone else here familiar with the Digispark drivers?

newbee20

  • Newbie
  • *
  • Posts: 6
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #4 on: December 02, 2018, 09:11:07 pm »
Thanks Granzeier,

   To be specific regarding the requirement, I need a message "Hello" on the computer screen, either in a text box or in a popup box(Like we get the message device connected, when any flashdrive is attached), whenever we connect the Digispark device and automatically disable the message in 10 seconds. It need not do any further work for now.

Tried to check the driver files, but I'm confused among the libusb32 or Digispark_Bootloader or Digi_USB driver files in the directory.
And also regarding the procedure to edit a driver file, as I have not done it before.

Thanks

granzeier

  • Jr. Member
  • **
  • Posts: 55
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #5 on: December 03, 2018, 03:51:02 am »
Well, it looks like I've gone as far as I can here. I tried looking for the source code for the driver, but can't find anything.

You haven't mentioned, but I'm suspecting that you are running Windows. If this project is for your computer only, you will need to find the source code for the driver for your OS (Windows, MAC OS/X or Linux) and try to modify that. (FTDI is not hacker friendly; you may find it easier to write a new custom driver from scratch.) If you are trying to use the project on any computer, you will need to repeat this modified/custom driver for each OS. And then, you will need to have every user add the new driver(s) to their system. Either way, it is going to be a pretty intense project (even if you HAVE written drivers before.)

If you fall back to using Notepad (or whatever,) you can use Digikeyboard to send the Windows key and the R key (to open the "Run command" field) and then send NOTEPAD and Enter. Pause or about a second for the system to launch Notepad, and then send the message you want displayed. Pause for another 10 seconds (or however long you want the message displayed,) and send Alt and F4 to close Notepad. This will only work on one OS family, but Windows is pretty popular. You can find some ideas to make things a bit easier/faster here: https://www.sitepoint.com/community/t/is-there-a-hotkey-to-open-up-notepad/1205/3 (or search for "keyboard shortcut for notepad".) This might be the ony practical way to get what you want for this project.

Either way, let us know what you decide.  If you decide to modify/create the driver, post your work here - there are people here who are WAY smarter about writing drivers than me (I miss the days of directly accessing HW, that is why I moved to microcontrollers.  :P )

newbee20

  • Newbie
  • *
  • Posts: 6
Re: Digispark ATTINY85 USB Device Communication with WIN7
« Reply #6 on: December 04, 2018, 05:09:11 am »
Sure