ipod-gadget: Raspberry Pi Zero W don't work.

Hello,

About system:

  • Hardware: Raspberry Pi Zero W
  • OS: Last Raspbian updated at 29 Nov
  • Kernel: raspberrypi-kernel-1.20171029-1 uname showed 4.9.59+

By your instruction I was get Git of kernel module and success build it. After load modules libcomposite and g_ipod I see in dmesg:

g_ipog: loading out-of-tree module taints kernel IPOD loaded

Build by Go ipod-gadgets was hard. By default Go version was 1.7.5 and has bug with undefine sort.Slice function.

I found and got Go 1.8 binary, unpack into /usr/local/go and build ipod-gadget by

/usr/local/bin/go get github.com/oandrew/ipod/cmd/ipod

In my folder ~/src/go/src/github.com I see executable ipod file.

iap-start

When I try play with not connected to any device I see

iap-test

When I try connect my Raspberry Pi Zero W to a Windows PC dmesg showed me

iap-test2

A windows PC indetify device as Composite USB device with correct VID/PID (Apple) but descriptors table has only Mass storage

USB Mass Storage Device
Connection Status	Device connected
Current Configuration	1
Speed	High (480 Mbit/s)
Device Address	20
Number Of Open Pipes	2
Device Descriptor
Offset	Field	Size	Value	Description
0 	bLength 	1 	12h 	
1 	bDescriptorType 	1 	01h 	Device
2 	bcdUSB 	2 	0200h 	USB Spec 2.0
4 	bDeviceClass 	1 	00h 	Class info in Ifc Descriptors
5 	bDeviceSubClass 	1 	00h 	
6 	bDeviceProtocol 	1 	00h 	
7 	bMaxPacketSize0 	1 	40h 	64 bytes
8 	idVendor 	2 	05ACh 	Apple, Inc.
10 	idProduct 	2 	12ABh 	
12 	bcdDevice 	2 	0409h 	4.09
14 	iManufacturer 	1 	00h 	
15 	iProduct 	1 	00h 	
16 	iSerialNumber 	1 	00h 	
17 	bNumConfigurations 	1 	02h 	
Device Qualifier Descriptor
Offset	Field	Size	Value	Description
0 	bLength 	1 	0Ah 	
1 	bDescriptorType 	1 	06h 	Device Qualifier
2 	bcdUSB 	2 	0200h 	USB Spec 2.0
4 	bDeviceClass 	1 	00h 	Class info in Ifc Descriptors
5 	bDeviceSubClass 	1 	00h 	
6 	bDeviceProtocol 	1 	00h 	
7 	bMaxPacketSize0 	1 	40h 	64 bytes
8 	bNumConfigurations 	1 	02h 	
9 	bReserved 	1 	00h 	
Configuration Descriptor 1
Offset	Field	Size	Value	Description
0 	bLength 	1 	09h 	
1 	bDescriptorType 	1 	02h 	Configuration
2 	wTotalLength 	2 	0020h 	
4 	bNumInterfaces 	1 	01h 	
5 	bConfigurationValue 	1 	01h 	
6 	iConfiguration 	1 	00h 	
7 	bmAttributes 	1 	C0h 	Self Powered
	4..0: Reserved 		...00000  	
	5: Remote Wakeup 		..0.....  	No
	6: Self Powered 		.1......  	Yes
	7: Reserved (set to one)
(bus-powered for 1.0) 		1.......  	
8 	bMaxPower 	1 	FAh 	500 mA
Interface Descriptor 0/0 Mass Storage, 2 Endpoints
Offset	Field	Size	Value	Description
0 	bLength 	1 	09h 	
1 	bDescriptorType 	1 	04h 	Interface
2 	bInterfaceNumber 	1 	00h 	
3 	bAlternateSetting 	1 	00h 	
4 	bNumEndpoints 	1 	02h 	
5 	bInterfaceClass 	1 	08h 	Mass Storage
6 	bInterfaceSubClass 	1 	06h 	SCSI Transparent Command Set
7 	bInterfaceProtocol 	1 	50h 	Bulk-Only Transport
8 	iInterface 	1 	01h 	"Mass Storage"
Endpoint Descriptor 81 1 In, Bulk, 512 bytes
Offset	Field	Size	Value	Description
0 	bLength 	1 	07h 	
1 	bDescriptorType 	1 	05h 	Endpoint
2 	bEndpointAddress 	1 	81h 	1 In
3 	bmAttributes 	1 	02h 	Bulk
	1..0: Transfer Type 		......10  	Bulk
	7..2: Reserved 		000000..  	
4 	wMaxPacketSize 	2 	0200h 	512 bytes
6 	bInterval 	1 	00h 	
Endpoint Descriptor 01 1 Out, Bulk, 512 bytes
Offset	Field	Size	Value	Description
0 	bLength 	1 	07h 	
1 	bDescriptorType 	1 	05h 	Endpoint
2 	bEndpointAddress 	1 	01h 	1 Out
3 	bmAttributes 	1 	02h 	Bulk
	1..0: Transfer Type 		......10  	Bulk
	7..2: Reserved 		000000..  	
4 	wMaxPacketSize 	2 	0200h 	512 bytes
6 	bInterval 	1 	01h 	
Other Speed Configuration Descriptor 1
Offset	Field	Size	Value	Description
0 	bLength 	1 	09h 	
1 	bDescriptorType 	1 	07h 	Other Speed Configuration
2 	wTotalLength 	2 	0020h 	
4 	bNumInterfaces 	1 	01h 	
5 	bConfigurationValue 	1 	01h 	
6 	iConfiguration 	1 	00h 	
7 	bmAttributes 	1 	C0h 	Self Powered
	4..0: Reserved 		...00000  	
	5: Remote Wakeup 		..0.....  	No
	6: Self Powered 		.1......  	Yes
	7: Reserved (set to one)
(bus-powered for 1.0) 		1.......  	
8 	bMaxPower 	1 	FAh 	500 mA
Interface Descriptor 0/0 Mass Storage, 2 Endpoints
Offset	Field	Size	Value	Description
0 	bLength 	1 	09h 	
1 	bDescriptorType 	1 	04h 	Interface
2 	bInterfaceNumber 	1 	00h 	
3 	bAlternateSetting 	1 	00h 	
4 	bNumEndpoints 	1 	02h 	
5 	bInterfaceClass 	1 	08h 	Mass Storage
6 	bInterfaceSubClass 	1 	06h 	SCSI Transparent Command Set
7 	bInterfaceProtocol 	1 	50h 	Bulk-Only Transport
8 	iInterface 	1 	01h 	"Mass Storage"
Endpoint Descriptor 81 1 In, Bulk, 64 bytes
Offset	Field	Size	Value	Description
0 	bLength 	1 	07h 	
1 	bDescriptorType 	1 	05h 	Endpoint
2 	bEndpointAddress 	1 	81h 	1 In
3 	bmAttributes 	1 	02h 	Bulk
	1..0: Transfer Type 		......10  	Bulk
	7..2: Reserved 		000000..  	
4 	wMaxPacketSize 	2 	0040h 	64 bytes
6 	bInterval 	1 	00h 	
Endpoint Descriptor 01 1 Out, Bulk, 64 bytes
Offset	Field	Size	Value	Description
0 	bLength 	1 	07h 	
1 	bDescriptorType 	1 	05h 	Endpoint
2 	bEndpointAddress 	1 	01h 	1 Out
3 	bmAttributes 	1 	02h 	Bulk
	1..0: Transfer Type 		......10  	Bulk
	7..2: Reserved 		000000..  	
4 	wMaxPacketSize 	2 	0040h 	64 bytes
6 	bInterval 	1 	00h 	

This report was generated by USBlyzer

What’s wrong? How to I can do it working? With my best regards, Dmitriy.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Config: Raspberry pi Zero W 2017-11-29-raspbian-stretch-lite Golang Version 1.9 (apt-get repository too old had to manual install) Simliar to others had issues getting client to build and run Radio=Pioneer MVH-P7300 (front USB)

Checks: aplay -l card 1: iPodUSB [], device 0: iPod PCM [] Subdevices: 1/1 Subdevice #0: subdevice #0 lsmod g_ipod_gadget, g_ipod_hid, g_ipod_audio, libcomposite = g_ipod_gadget,g_ipod_hid,usb_f_mass_storage,g_ipod_audio

Attempts: Radio Display “No Device” on Pi Boot, transitions to “USB incompatible” After execute (from ~/go/bin/) sudo ./ipod -d serve -w ipod.trace /dev/iap0 Then Radio Display “Format Read” (as long as ./ipod running) I had to run two (2) separate SSH windows … one to run ./ipod and the another to run checks and sound files. Is there a better way to do this? I tried ./ipod w/ &&exit without success. client generates a “ipod.trace” file but it is empty (zero bytes). running the ./ipod debugging logging tool it also shows nothing just exists

Results: mpg123 -o alsa -a hw:1,0 example.mp3 [src/libout123/modules/alsa.c:238] error: Fatal problem with alsa output, error -5. [src/libout123/libout123.c:635] error: Error in writing audio (Input/output error?)! main: [src/mpg123.c:833] error: Deep trouble! Cannot flush to my output anymore!

speaker-test -D hw:CARD=iPodUSB,DEV=0 -c 2 -r 44100 Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error

I attempted to generate a stdout log via “ls -a | tee output.file” however was unsuccessful … is there a better way to do this?

I have attached my dmesg output and would have attached my ipod.trace file however empty

Thanks in advance for any help

2018.Feb.28_1126_dmesg_export.28_1126_dmesg_export.txt