false_terry
New member
Hi folks,
I’m new here and recently got back into working on my hobby projects. I decided to build an audio CD player using the hardware I already have.
Here’s what I’ve already have:
Atmega2560
VS1053b audio decoder module
A cheap yellow display
A USB host shield (unfortunately, a clone version—it’s all I could find in local hardware stores)
The idea is to connect my ASUS USB DVD drive to this setup and control it by sending SCSI commands to achieve basic functionality like ejecting the tray, starting the motor, and reading data from CDs.
What I’ve Achieved So Far:
Successfully tested the USB host shield using Bill Greiman's UsbFat library (GitHub link: https://github.com/greiman/UsbFat) to read and write data on a USB flash drive. This confirms the shield is functioning correctly.
Retrieved the DVD drive descriptor and enumerated the device.
Obtained the maximum Logical Unit Number (LUN) of the drive.
Identified and set up the IN and OUT endpoints for communication.
Captured USB packets using Wireshark to analyze commands and responses.
Wireshark indicates the DVD drive has a max packet size of 512 bytes, whereas the USB host shield supports a maximum of 64 bytes. I believe this isn’t an issue since the data can likely be sent and received in chunks (e.g., commands are around 31 bytes).
Additionally, I’ve ensured the drive receives enough power using a Y-cable.
My Questions:
Is the USB host shield sufficient to communicate with the DVD drive, or do I need a more capable MCU like the Teensy 4.1? For reference, I found a complete example using the Teensy here: https://github.com/A-Dunstan/teensy4_usbhost/blob/master/examples/storage/cd_audio/cd_audio.ino
Are there any specific limitations I should be aware of when using the USB host shield?
What I Want to Achieve:
At the very least, I’d like to:
Send basic SCSI commands (e.g., eject tray, start motor) and receive proper responses.
Read data from the DVD drive to eventually play audio CDs.
Any help, advice, or resources to guide me through this project would be greatly appreciated!
Thanks in advance!
You can find latest project files in here : https://drive.google.com/drive/folders/1jYBsNS1oo6o_e1qHY8SXCp1Jt2E-dmTD
I’m new here and recently got back into working on my hobby projects. I decided to build an audio CD player using the hardware I already have.
Here’s what I’ve already have:
Atmega2560
VS1053b audio decoder module
A cheap yellow display
A USB host shield (unfortunately, a clone version—it’s all I could find in local hardware stores)
The idea is to connect my ASUS USB DVD drive to this setup and control it by sending SCSI commands to achieve basic functionality like ejecting the tray, starting the motor, and reading data from CDs.
What I’ve Achieved So Far:
Successfully tested the USB host shield using Bill Greiman's UsbFat library (GitHub link: https://github.com/greiman/UsbFat) to read and write data on a USB flash drive. This confirms the shield is functioning correctly.
Retrieved the DVD drive descriptor and enumerated the device.
Obtained the maximum Logical Unit Number (LUN) of the drive.
Identified and set up the IN and OUT endpoints for communication.
Captured USB packets using Wireshark to analyze commands and responses.
Wireshark indicates the DVD drive has a max packet size of 512 bytes, whereas the USB host shield supports a maximum of 64 bytes. I believe this isn’t an issue since the data can likely be sent and received in chunks (e.g., commands are around 31 bytes).
Additionally, I’ve ensured the drive receives enough power using a Y-cable.
My Questions:
Is the USB host shield sufficient to communicate with the DVD drive, or do I need a more capable MCU like the Teensy 4.1? For reference, I found a complete example using the Teensy here: https://github.com/A-Dunstan/teensy4_usbhost/blob/master/examples/storage/cd_audio/cd_audio.ino
Are there any specific limitations I should be aware of when using the USB host shield?
What I Want to Achieve:
At the very least, I’d like to:
Send basic SCSI commands (e.g., eject tray, start motor) and receive proper responses.
Read data from the DVD drive to eventually play audio CDs.
Any help, advice, or resources to guide me through this project would be greatly appreciated!
Thanks in advance!
You can find latest project files in here : https://drive.google.com/drive/folders/1jYBsNS1oo6o_e1qHY8SXCp1Jt2E-dmTD
Code:
FreeRam 6990
MS ConfigureDevice
MS Init
Addr:01
NC:01
Device Descriptor Retrieved:
12 1 0 2 0 0 0 40 6B 1C 23 A2 0 0 1 2 3 1
GET_DESCRIPTOR successful.
String Descriptor (Index 1): USB2.0 External
String Descriptor (Index 2): Mass Storage Device
String Descriptor (Index 3): 97 436311501508
Enumerating devices...
Device Address: 1
Parent Address: 0
Is Hub: No
Endpoint Count: 1
Low Speed: No
Configuration set successfully.
Bulk IN Address: 0x81, Max Packet Size: 64
Bulk OUT Address: 0x2, Max Packet Size: 64
Registered Endpoints:
Endpoint Index: 0
Address: 0x0
Max Packet Size: 64
Type: CONTROL
Endpoint Index: 1
Address: 0x81
Max Packet Size: 64
Type: IN
Endpoint Index: 2
Address: 0x2
Max Packet Size: 64
Type: OUT
MS Init
setAddr:0D
BulkOnly initialization failed. Error code: 13
ReadCapacity
---------------
CBW.dCBWTag: 00000001
USB Error: 0D
Index: 02
============================ CBW: 11
ResetRecovery
-----------------
ResetRecovery
-----------------
Gen SCSI Err: 11
LUN: 00
isLunOk 0
CBW.dCBWTag: 00000002
USB Error: 0D
Index: 02
============================ CBW: 11
ResetRecovery
-----------------
ResetRecovery
-----------------
Gen SCSI Err: 11
LUN: 00
isUnitReady 17
sectorSize 0
key.begin failed