I’ve got a USB host device (based on a USB to serial, silabs chipset) working on my (spider) system.
I have followed the tutorial and this a works great, but it assumes that the peripheral is plugged in after the board is switched on.
If the peripheral is present at switch-on the device connected event is not triggered and so you can’t connect to it. Any ideas as to how you might be able to detect and connect to the device at switch-on.
Thanks very much,
Spider needs time to run I am not sure.
Is there a way then, I can identify if there is a device connected before I try to use it and disconnect it and re-connect it from using code?
It sounds like you may have hit one of those bugs i ran into a while ago and no one until now was able to reproduce… basically your connected event is not triggered at start up …
you can always move the Client host creation code from the designer generated file to your own function…
and create the module when you want.
this is what i did to get my SdCard to triggered at start up when i ran into the same exact issue, so the only way i was able to get it to work is by deleting the SDCard Module from the designer and create it by my self on my start program… if i remember correctly it has something to do with the TF35 Display… blocking those events from triggering.
private void ProgramStarted()
Sdcard = new SDCard(5);
Sdcard.SDCardMounted += SdCardSdCardMounted;
Sdcard.SDCardUnmounted += SdCardSdCardUnmounted;
here is a link to my old post…
That worked just fine, Thank you very much.
Glad i could help