Page 3 of 3

Re: USB VID & PID

Posted: Mon 2019-05-13 21:46
by Arek
Pictures, mentioned earlier:
Image
Image
Image
Image

Re: USB VID & PID

Posted: Tue 2019-05-14 10:39
by Panu
Hi!

It looks like to me that this is the SCSI disk drive vendor and product name, not the USB vendor and product name. It's a lot harder to change, it would need to reimplement the scsi part in RAM...

Code: Select all

// ------- SCSI replies -------
const __y u_int16 inquiry1[18] = { //-----this must be first SCSI packet-----
	128, 1, 31<<8, 0, ('V'<<8)|'L',('S'<<8)|'I', 0, 0,
	('V'<<8)|'S',('1'<<8)|'0',('1'<<8)|'0',('C'<<8), 0, 0, 0, 0,
	('1'<<8)|'.',('4'<<8)|' '};
const __y u_int16 sense[9] = {0x7000, 0}; //no_sense
const __y u_int16 capacity1[4] = {0, 31, 0x0000, 512}; //Read Capacity
const __y u_int16 atapiCapacities[6] = {0, 8, 0, 31, 0x0200, 512}; //ATAPI read format capacities
const __y u_int16 diskData[1] = {0};
const __y u_int16 csw1[7] = {0x5553, 0x4253, 0, 0, 0, 0, 0}; //-----this must be after all SCSI packets-----

const __y void* const scsi[] = {
	0, //NOT_CHAPTER_9 //do not limit reply length
// recordLenght, matchWords, {data}*, replyEndpoint, replyLength, SideEffectFn, replyPacketPtr 
	7, 1, 0x0612, 2, 36, DoNothing, inquiry1, //inquiry
	7, 1, 0x0c12, 2, 36, DoNothing, inquiry1, //inquiry
	7, 1, 0x0c03, 2, 18, DoNothing, sense, //request sense
	7, 1, 0x0a25, 2, 8, DoNothing, capacity, //read capacity
	7, 1, 0x0a28, 2, -1, HandleDiskLba, diskData, //read 10
	7, 1, 0x0a2a, 2, -2, HandleDiskLba, csw, //write 10
	7, 1, 0x0a23, 2, 12, DoNothing, atapiCapacities, //ATAPI read format capacities
	7, 1, 0x061a, 2, 4, DoNothing, tenzeros,
	7, 1, 0x0a5a, 2, 4, DoNothing, tenzeros,
	6, 0, 2, 13, DoNothing, csw, //send csw ok to all unknown commands - don't worry, be happy.
	0 
};
-Panu

Re: USB VID & PID

Posted: Mon 2019-05-20 16:28
by Arek
Hi Panu,

many thanks.
It looks for me much difficult.
The "scsi" isn't variable and as constante can not take new value (i.e. my_scsi).

Any idea how to change the USB answer?

am