CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

USB manufacturer + descriptor with PIC18F4550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
neo19



Joined: 14 Aug 2012
Posts: 30
Location: France

View user's profile Send private message

USB manufacturer + descriptor with PIC18F4550
PostPosted: Fri Oct 24, 2014 6:15 am     Reply with quote

Dear Everybody,

I'm working with PCWH 5.030 and WIN7 64 bits.

I'm using a virtual COM port with my PIC18F4550 through USB.

My software is working well.

To be perfect, I would like to inform to my board : the manufacturer and the name's board.

I tried this but not working: When I go to the parameters of the board :
I can see for the manufacturer : %ProviderName%
and for the name of the board : Emplacement 0 (Port_#0009.Hub_#0001)

Code:
#define USB_CONFIG_VID 0x0461
#define USB_CONFIG_PID 0x0033
#define USB_CONFIG_BUS_POWER 500
#define USB_STRINGS_OVERWRITTEN

char USB_STRING_DESC_OFFSET[]={0,4,16};

char const USB_STRING_DESC[]={
   //string 0 - language
      4,  //length of string index
      0x03,  //descriptor type (STRING)
      0x09,0x04,  //Microsoft Defined for US-English
   //string 1 - manufacturer
      12,  //length of string index
      0x03,  //descriptor type (STRING)
      'P',0,
      'R',0,
      'A',0,
      'N',0,
      'A',0,
   //string 2 - product
      22,  //length of string index
      0x03,  //descriptor type (STRING)
      'B',0,
      'I',0,
      'A',0,
      'S',0,
      ' ',0,
      'B',0,
      'O',0,
      'A',0,
      'R',0,
      'D',0
};


Does someone have an advice?

Best regards,

Fabrice
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Fri Oct 24, 2014 8:32 am     Reply with quote

Did you read the comment in the descriptor file?:

"// These strings are mostly only displayed during the add hardware wizard.
// Once the operating system drivers have been installed it will usually display
// the name from the drivers .INF."
neo19



Joined: 14 Aug 2012
Posts: 30
Location: France

View user's profile Send private message

PostPosted: Mon Oct 27, 2014 1:27 am     Reply with quote

Thanks Ttelmah for your answer.

You are right, I deinstall the drivers and plug again my board. I saw the name of the board.

It misled me because on my old computer (WINXP), the manufacturer and the name appears on the device manager whereas in W7, nothing appears.
I didn't see that it was the same for other devices.

Thanks, It's ok for me,

Fabrice
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group