Giter Club home page Giter Club logo

ipod-gadget's People

Contributors

oandrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipod-gadget's Issues

Issues connecting to Ford Sync system

Came across this project and decided to give it a go. Currently got it operating on a Raspberry Pi Zero W, Raspbian Lite image. After some finagling I managed to get it all operating almost 100%. No errors visible. I am able to hook it up to my Windows PC and see both the USB Audio device and HID device. USB Audio device is a single 'Microphone' source operating at 44khz stereo 16 bit. Can play back audio from the Pi over that device no problem.

I have a Ford vehicle with the MyFord Touch system (touch screen nav pre-2016) and attempting to connect the Pi there it seems to be a-miss. The 'ipod' process does spam a lot of info on the console upon connection but the vehicle side doesn't even register anything is plugged in. No error messages, no usb device populates the source list. Additionally if I try to play back anything it will error out after it opens the device and tries to send data (this is using mplayer and feeding an icecast stream, this same source worked fine when connected to my PC).

Not terribly familiar with apple tech or the protocol so not even sure how well this can be sorted. Maybe the vehicle is looking for more data than has been implemented here? Not sure.

Unfortunately didn't get a chance to get logs of all this but will do so as soon as I can.

Audio not working on Yamaha CRX-332

I'm trying to use your great project on a Raspberry Pi Zero for adding AirPlay support to a Yamaha CRX-332 stereo system that supports iPod connections via USB.

Unfortunately though, I cannot seem to get it to work. Although the devices seem to perform some iAP handshake and I cannot find any obvious error reports, speaker-test doesn't work, failing with Write error: -5,Input/output error after a few seconds:

pi@raspberrypi:~ $ speaker-test -D plughw:CARD=iPodUSB,DEV=0 -c 2 -r 44100

speaker-test 1.1.8

Playback device is plughw:CARD=iPodUSB,DEV=0
Stream parameters are 44100Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 44100Hz (requested 44100Hz)
Buffer size range from 92 to 16384
Period size range from 23 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error

My trace file can be found here: ipod.trace.zip

Does anyone have an idea what might be going wrong? Any help is highly appreciated!

0x64 "RequestApplicationLaunch" error

Hi all,

I'm unable to play anything, the speaker test fails with a Write error: -5,Input/output error, xrun_recovery failed: -5,Input/output error_

I'm using some old Libratone speakers and it's the same for both. I only see an error for the command 0x64 "RequestApplicationLaunch" but is that causing the issue? It's just an application launch and it only appears once.

ipod.trace.txt

I would really appreciate some hints here :)
Thanks a lot!

Unable to get things to work on a Pi Zero 2W

Hi All,

So using a few different files from a few different forks of this project I've been able to get the Kernel drivers to compile and install on raspbian bookworm - Same for the client app from the other repo listed at the bottom of the main page.

I can see in dmesg that the kernel modules are loading,

[ 1626.997693] ipod-gadget-hid: ipod_hid_dev_open()
[ 1626.997719] ipod-gadget-hid: activating
[ 1627.155825] dwc2 3f980000.usb: new device is high-speed
[ 1627.189495] dwc2 3f980000.usb: new address 11
[ 1627.222887] g_ipod gadget.0: = ipod_audio_set_alt(0,0)
[ 1627.222906] g_ipod gadget.0: = ipod_audio_set_alt(1,0)
[ 1627.222915] ipod-gadget-audio: audio stop
[ 1627.222922] g_ipod gadget.0: = ipod_hid_set_alt()
[ 1627.223046] g_ipod gadget.0: = ipod_audio_set_alt(1,0)
[ 1627.223056] ipod-gadget-audio: audio stop
[ 1627.237262] g_ipod gadget.0: = ipod_audio_set_alt(1,0)
[ 1627.237276] ipod-gadget-audio: audio stop

I can see the device iap0 listed in /dev
and running the ipod client doesn't throw an error etc. - USing some of the files from the Pipod project - https://github.com/geniass/pipod - I managed to get things to start on boot etc - and at this point I'm not even worrying about getting the audio side to work, simply have the device present as an iPod to my Car and Boat.

This is where things fall down,

In the car - Ford with Sync2 - No matter what I try, the headunit continues to say "No device present" when I try and select USB
and in the Boat - its detecting a USB device of some sort, and a few moments later it disconnects and reboots the pi (Drops power to the USB port when it canges input sources unfortunatly)

I've got trace file output turned on for the ipod client - however when I take a look, all trace files created are 0kb in size so i'm obviously not seeing anything.

I've tried using the Swap_Configs=1 as a kernel module conf option and that has made no difference at all.

Has anyone managed to get this to work with BookWorm and a Zero 2W ??? or am I going it alone?

@oandrew are you still checking in from time to time or has life/other commitments dragged you away from such an awesome project?

Cheers

Gadget not visible from amp / linux box

Hi,
First, thanks for this nice piece of code.

I could compile, install, insmod g_ipod modules.
/dev/iap0 is showing up and ipod command can connect to it.

However, on my linux laptop, I can not see the rpi0 with lsusb. I have also tried with a Denon AVR-X1200W amp and the rpi0 is not detected, ipod trace does not show any command.

Is it normal lsusb does not show any device with the product_id ? What may be wrong ?

My config:

$ cat /boot/cmdline.txt 
console=serial0,115200 console=tty1 root=PARTUUID=b36d4013-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,libcomposite,g_ipod_audio,g_ipod_hid,g_ipod_gadget g_ipod_gadget.swap_configs=1 g_ipod_gadget.product_id=0x1297
$ cat /etc/debian_version 
10.6
$ uname -r
5.4.79+
$ sudo lsmod |grep g_ipod
g_ipod_gadget          16384  0
g_ipod_hid             20480  1
g_ipod_audio           20480  2
snd_pcm                94208  2 snd_bcm2835,g_ipod_audio
snd                    73728  6 snd_timer,snd_bcm2835,g_ipod_audio,snd_pcm
libcomposite           57344  4 g_ipod_gadget,g_ipod_hid,usb_f_mass_storage,g_ipod_audio
udc_core               53248  5 g_ipod_hid,usb_f_mass_storage,dwc2,libcomposite,g_ipod_audio

Suzuki Swift cant connect

Hello i am trying to use a RPI Zero W with a suzuki swift 2012 radio. i can start the ipod driver but cant play any audio to the car as speeker test produces an error of

Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error

and the car eventually flashes error 1

the trace is below

< 0E 00 55 04 00 38 00 01 C3 00
> 03 00 55 06 00 02 00 01 00 38 BF 00 00 00
< 11 00 55 15 00 39 00 02 01 0F 00 00 04 00 03 04 0A 00 00 00 02 00 00 02 00 87
> 03 00 55 09 00 3A 00 02 01 03 00 00 00 B7
< 11 00 55 10 00 39 00 03 01 0A 00 01 00 00 00 00 00 00 00 10 98 00 00 00 00 00
> 03 00 55 09 00 3A 00 03 01 03 00 01 00 B5
< 12 00 55 1C 00 39 00 04 01 16 00 02 01 43 61 72 41 63 63 65 73 73 6F 72 79 53 79 73 74 65 6D 00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 04 00 55 0A 00 3A 00 04 01 04 00 02 00 01 B0 00 00 00
< 10 00 55 0C 00 39 00 05 01 06 00 02 04 01 00 00 A8 00
> 04 00 55 0A 00 3A 00 05 01 04 00 02 00 04 AC 00 00 00
< 10 00 55 0C 00 39 00 06 01 06 00 02 05 01 00 00 A6 00
> 04 00 55 0A 00 3A 00 06 01 04 00 02 00 05 AA 00 00 00
< 12 00 55 22 00 39 00 07 01 1C 00 02 06 53 55 5A 55 4B 49 20 4D 4F 54 4F 52 20 43 4F 52 50 4F 52 41 54 49 4F 4E 00 6D 00 00 00 00 00 00 00 00 00 00 00
> 04 00 55 0A 00 3A 00 07 01 04 00 02 00 06 A8 00 00 00
< 12 00 55 16 00 39 00 08 01 10 00 02 07 69 50 6F 64 20 43 6F 6E 74 72 6F 6C 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 04 00 55 0A 00 3A 00 08 01 04 00 02 00 07 A6 00 00 00
< 10 00 55 0D 00 39 00 09 01 07 00 02 0C 00 00 00 00 9B
> 04 00 55 0A 00 3A 00 09 01 04 00 02 00 0C A0 00 00 00
< 0E 00 55 05 00 3B 00 0A 00 B6
> 02 00 55 05 00 3C 00 0A 00 B5
> 02 00 55 04 00 14 00 01 E7 00
< 10 00 55 00 00 08 00 15 00 01 02 00 02 01 DD 00 00 00

i have built a small python program to use this as a bluetooth adapter for my girlfriends car radio and hope to give it to her for Christmas any help would be greatly appreciated

Unable to load driver in Raspberry Pi W

Hello! I am trying to compile this project on a Raspberry Pi W. I did read the other issues submitted here and I was able to compile the module (.ko) successfully but cannot load the driver successfully. I do not see the /dev/iap0 file

I do not get any error messages while insmod. Here is the output of my dmesg:

[ 947.290461] g_ipod_audio: loading out-of-tree module taints kernel.

[ 947.291711] **********************************************************
[ 947.291715] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
[ 947.291720] ** **
[ 947.291725] ** trace_printk() being used. Allocating extra memory. **
[ 947.291729] ** **
[ 947.291733] ** This means that this is a DEBUG kernel and it is **
[ 947.291737] ** unsafe for production use. **
[ 947.291741] ** **
[ 947.291745] ** If you see this message and you are not debugging **
[ 947.291750] ** the kernel, report this immediately to your vendor! **
[ 947.291754] ** **
[ 947.291757] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
[ 947.291761] **********************************************************
[ 968.196558] ipod-gadget: init
[ 968.196581] udc-core: couldn't find an available UDC - added [g_ipod] to list of pending drivers

Output of my lsmod:

Module Size Used by
g_ipod_gadget 5064 0
g_ipod_hid 10037 0
g_ipod_audio 9098 0
libcomposite 48212 3 g_ipod_gadget,g_ipod_hid,g_ipod_audio
udc_core 38862 3 g_ipod_hid,libcomposite,g_ipod_audio
cmac 3230 1
bnep 11981 2
hci_uart 26546 1
btbcm 8248 1 hci_uart
serdev 9370 1 hci_uart
bluetooth 366847 24 hci_uart,bnep,btbcm
ecdh_generic 17649 1 bluetooth
brcmfmac 273198 0
brcmutil 9114 1 brcmfmac
snd_bcm2835 22991 0
snd_pcm 89590 2 snd_bcm2835,g_ipod_audio
cfg80211 542242 1 brcmfmac
snd_timer 22396 1 snd_pcm
rfkill 21476 6 bluetooth,cfg80211
snd 60154 4 snd_timer,snd_bcm2835,g_ipod_audio,snd_pcm
uio_pdrv_genirq 3718 0
uio 9901 1 uio_pdrv_genirq
fixed 3033 0
ip_tables 12427 0
x_tables 22098 1 ip_tables
ipv6 401778 22

Please Help _/_

Denon RCD-M38 not working

Similar problem here - install went well, but no sound coming out in the speaker test.
Compiled using go 1.15 on the latest RPi OS with kernel 5.4.72+.
ipod trace prints this error message inline, full file attached.

ERRO[0411.607895] << CMD error=ipod.Command unmarshal: unknown cmd 0x00,0x0d id=0x00,0x0d trx= type=ipod.UnknownPayload

ipod.trace.txt

Originally posted by @pavelkrotkov in #19 (comment)

Hangs at extremote.ReturnPlayStatus

I'm running ipod-gadget on a Raspberry Pi Zero connected to a 2011 Toyota Prius.

When I start the client app, the car recognizes that an iPod is connected, but then an error comes up saying that the car is unable to read from the iPod. It hangs right after the client sends ReturnPlayStatus.

Here is the trace log:

< 11 00 55 0E 00 13 00 00 04 19 00 00 00 02 00 00 02 00 BE 00 00 00 00 00 00 00
> 02 00 55 04 00 02 00 13 E7 00
< 0E 00 55 03 04 00 1C DD 00 00
> 04 00 55 0C 04 00 1D 00 04 93 E0 00 00 4E 20 02 EC 00
< 0E 00 55 03 04 00 1E DB 00 00
> 03 00 55 07 04 00 1F 00 00 00 00 D6 00 00
< 0E 00 55 03 04 00 02 F7 00 00
> 04 00 55 0B 04 00 03 FF FF FF FF 00 00 00 00 F2 00 00
< 0E 00 55 03 04 00 1C DD 00 00
> 04 00 55 0C 04 00 1D 00 04 93 E0 00 00 4E 20 02 EC 00

Raspberry Pi Zero - can't get it going here

UP-FRONT: I am sorry, I also was looking at the p-tech-se fork of this, as in many ways it seems more compatible, and my notes below are possibly mixing and matching. But it would be really GREAT to be able to consolidate the efforts and get something that works. I am trying to dig through this, but I am new to golang, new to linux gadgets/drivers, and also haven't done any USB work, so it is a learning curve for sure. ;)

Okay, so, Here is what I have done so far:

I read that you have to make some changes to enable the gadget mode to work:
Change /boot/config.txt, at end:
dtoverlay=dwc2

Change /boot/cmdline.txt add to end:
modules-load=dwc2,g_ether

This lets me plug it into my computer and ssh into it over that connection. If this is conflicting with the ipod-gadget driver, and the cause of my problems, then I apologize!

Couldn't compile the gadget module, seems I was missing kernel headers, so I tried:

sudo apt-get install raspberrypi-kernel-headers
sudo ln -s /usr/src/linux-headers-4.4.50+/ /lib/modules/4.4.50+/build

DId not have golang. The version in the raspbian repo was 1.3.3, not new enough, so I did:
wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz

Add to ~/.bashrc:
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Compiled the kernel module as instructed, it did pass the insmod ok.

Compiled the go client program, but when trying to run it:
./ipod

I set it to do the modprobe/insmod in /etc/rc.local as well as as launch the ipod binary. Plugging it into my Pioneer AVH-4200NEX after it has fully booted just shows INCOMPATIBLE USB. Plugging it into the Mac shows a composite device.

Composite Device:
Product ID: 0x1266
Vendor ID: 0x05ac (Apple Inc.)
Version: 4.04
Speed: Up to 480 Mb/sec
Location ID: 0x14100000 / 29
Current Available (mA): 500
Extra Operating Current (mA): 0
Sleep current (mA): 500

iTunes doesn't see it or pretend there is an iPod there, but that is not surprising.

I do not see any output from the ipod binary, in rc.local when I invoke it (in the background) I am sending output to a log file, but nothing is going in there.

Off to read more about gadgets, but at this point I am feeling pretty overwhelmed. And I realize this is only the start, I would have to write something to handle the requests, scan/parse a library, reply to the headunit, start/stop playback/etc, as it doesn't seem any of that is here yet, but that can only be something to worry about if the first part is working. :) I think mpd might work with the command line client, but that is far away at this point...

OH, and with the p-tech-se additions, when on the Mac I do see a Audio device show up. Upgraded the raspberry pi to the latest, which for some reason it hadn't found easier probably due to network issues, now kernel is 4.9.35+ and I can hook it to my Mac, speaker-test works playing audio through to the Mac. :) Oh, but wait, I was mixing this and the fork done by p-tech-se...

The current status with the radio is that using this version I get "No Reponse", and using the p-tech-se I get "Incompatible USB". Either way I am not yet able to capture any messages/errors from the client program due to difficulties getting my computer connected to the Pi while it is actually connected to the car. But working on that.

Here is a sample of output in syslog when in the car:
Oct 26 17:12:49 raspberrypi kernel: [ 747.175077] dwc2 20980000.usb: new device is high-speed
Oct 26 17:12:49 raspberrypi kernel: [ 747.295485] dwc2 20980000.usb: new device is high-speed
Oct 26 17:12:49 raspberrypi kernel: [ 747.360462] dwc2 20980000.usb: new address 2
Oct 26 17:12:49 raspberrypi kernel: [ 747.395267] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:12:49 raspberrypi kernel: [ 747.395296] g_ipod gadget: Control req: 40.40 v01f4 i01f4 l0
Oct 26 17:12:49 raspberrypi kernel: [ 747.395302] Handled: 1f4
Oct 26 17:12:49 raspberrypi kernel: [ 747.395314] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:12:49 raspberrypi kernel: [ 747.395325] g_ipod gadget: Control req: 40.40 v01f4 i01f4 l0
Oct 26 17:12:49 raspberrypi kernel: [ 747.395497] g_ipod gadget: high-speed config #2: iPod interface
Oct 26 17:12:49 raspberrypi kernel: [ 747.395530] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:12:49 raspberrypi kernel: [ 747.395538] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:12:49 raspberrypi kernel: [ 747.395545] g_ipod gadget: = ipod_hid_set_alt()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398485] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398718] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398734] g_ipod gadget: Control req: 22.01 v0100 i0081 l3
Oct 26 17:12:49 raspberrypi kernel: [ 747.398738] Not Handled
Oct 26 17:12:49 raspberrypi kernel: [ 747.398746] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398756] g_ipod gadget: Control req: 22.01 v0100 i0081 l3
Oct 26 17:12:49 raspberrypi kernel: [ 747.398954] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398969] g_ipod gadget: Control req: a2.81 v0100 i0081 l3
Oct 26 17:12:49 raspberrypi kernel: [ 747.398973] Not Handled
Oct 26 17:12:49 raspberrypi kernel: [ 747.398980] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:12:49 raspberrypi kernel: [ 747.398990] g_ipod gadget: Control req: a2.81 v0100 i0081 l3
Oct 26 17:12:49 raspberrypi kernel: [ 747.399205] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:12:49 raspberrypi kernel: [ 747.416704] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:12:49 raspberrypi kernel: [ 747.416730] g_ipod gadget: Control req: 21.0a v0000 i0002 l0
Oct 26 17:12:49 raspberrypi kernel: [ 747.416736] Not Handled
Oct 26 17:12:49 raspberrypi kernel: [ 747.416744] g_ipod gadget: = ipod_hid_setup()
Oct 26 17:12:49 raspberrypi kernel: [ 747.416754] g_ipod gadget: Control req: 21.0a v0000 i0002 l0
Oct 26 17:12:49 raspberrypi kernel: [ 747.416985] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:12:49 raspberrypi kernel: [ 747.417000] g_ipod gadget: Control req: 81.06 v2200 i0002 l60
Oct 26 17:12:49 raspberrypi kernel: [ 747.417004] Not Handled
Oct 26 17:12:49 raspberrypi kernel: [ 747.417011] g_ipod gadget: = ipod_hid_setup()
Oct 26 17:12:49 raspberrypi kernel: [ 747.417020] g_ipod gadget: Control req: 81.06 v2200 i0002 l60
Oct 26 17:13:26 raspberrypi kernel: [ 785.140763] g_ipod gadget: = ipod_audio_control_disable()
Oct 26 17:13:26 raspberrypi kernel: [ 785.140780] g_ipod gadget: = ipod_hid_disable()
Oct 26 17:13:26 raspberrypi kernel: [ 785.140794] g_ipod gadget: = ipod_disconnect()

And on the Mac:
Oct 26 17:27:29 raspberrypi kernel: [ 638.110688] dwc2 20980000.usb: new device is high-speed
Oct 26 17:27:29 raspberrypi kernel: [ 638.121858] dwc2 20980000.usb: new address 19
Oct 26 17:27:29 raspberrypi kernel: [ 638.292990] g_ipod gadget: high-speed config #2: iPod interface
Oct 26 17:27:29 raspberrypi kernel: [ 638.293031] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:27:29 raspberrypi kernel: [ 638.293040] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:27:29 raspberrypi kernel: [ 638.293048] g_ipod gadget: = ipod_hid_set_alt()
Oct 26 17:27:29 raspberrypi kernel: [ 638.349099] g_ipod gadget: = ipod_audio_control_set_alt()
Oct 26 17:27:29 raspberrypi kernel: [ 638.360494] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:27:29 raspberrypi kernel: [ 638.360519] g_ipod gadget: Control req: 22.01 v0100 i0081 l3
Oct 26 17:27:29 raspberrypi kernel: [ 638.360525] Not Handled
Oct 26 17:27:29 raspberrypi kernel: [ 638.360534] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:27:29 raspberrypi kernel: [ 638.360544] g_ipod gadget: Control req: 22.01 v0100 i0081 l3
Oct 26 17:27:29 raspberrypi kernel: [ 638.361843] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:27:29 raspberrypi kernel: [ 638.361858] g_ipod gadget: Control req: 40.40 v0000 i0000 l0
Oct 26 17:27:29 raspberrypi kernel: [ 638.361864] Handled: 0
Oct 26 17:27:29 raspberrypi kernel: [ 638.361876] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:27:29 raspberrypi kernel: [ 638.361886] g_ipod gadget: Control req: 40.40 v0000 i0000 l0
Oct 26 17:27:29 raspberrypi kernel: [ 638.363065] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:27:29 raspberrypi kernel: [ 638.363077] g_ipod gadget: Control req: 40.40 v01f4 i0000 l0
Oct 26 17:27:29 raspberrypi kernel: [ 638.363082] Handled: 0
Oct 26 17:27:29 raspberrypi kernel: [ 638.363092] g_ipod gadget: = ipod_audio_control_setup()
Oct 26 17:27:29 raspberrypi kernel: [ 638.363102] g_ipod gadget: Control req: 40.40 v01f4 i0000 l0
Oct 26 17:27:29 raspberrypi kernel: [ 638.363386] ------------[ cut here ]------------
Oct 26 17:27:29 raspberrypi kernel: [ 638.363568] WARNING: CPU: 0 PID: 368 at drivers/usb/dwc2/gadget.c:1573 dwc2_hsotg_rx_data+0xb0/0xfc [dwc2]
Oct 26 17:27:29 raspberrypi kernel: [ 638.363576] Modules linked in: bnep hci_uart btbcm bluetooth g_ipod(O) brcmfmac brcmutil snd_bcm2835 cfg80211 snd_pcm rfkill snd_timer snd bcm2835_gpiomem uio_pdrv_genirq fixed uio libcomposite i2c_dev fuse dwc2 udc_core ipv6
Oct 26 17:27:29 raspberrypi kernel: [ 638.363678] CPU: 0 PID: 368 Comm: in:imklog Tainted: G O 4.9.35+ #1014
Oct 26 17:27:29 raspberrypi kernel: [ 638.363683] Hardware name: BCM2835
Oct 26 17:27:29 raspberrypi kernel: [ 638.363746] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
Oct 26 17:27:29 raspberrypi kernel: [ 638.363772] [] (show_stack) from [] (dump_stack+0x20/0x28)
Oct 26 17:27:29 raspberrypi kernel: [ 638.363799] [] (dump_stack) from [] (__warn+0xe4/0x10c)
Oct 26 17:27:29 raspberrypi kernel: [ 638.363819] [] (__warn) from [] (warn_slowpath_null+0x30/0x38)
Oct 26 17:27:29 raspberrypi kernel: [ 638.363929] [] (warn_slowpath_null) from [] (dwc2_hsotg_rx_data+0xb0/0xfc [dwc2])
Oct 26 17:27:29 raspberrypi kernel: [ 638.364103] [] (dwc2_hsotg_rx_data [dwc2]) from [] (dwc2_hsotg_irq+0x690/0x7a0 [dwc2])
Oct 26 17:27:29 raspberrypi kernel: [ 638.364214] [] (dwc2_hsotg_irq [dwc2]) from [] (__handle_irq_event_percpu+0x94/0x1c8)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364240] [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x2c/0x68)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364261] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x4c)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364280] [] (handle_irq_event) from [] (handle_level_irq+0x9c/0x130)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364299] [] (handle_level_irq) from [] (generic_handle_irq+0x30/0x44)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364319] [] (generic_handle_irq) from [] (__handle_domain_irq+0x58/0xb8)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364339] [] (__handle_domain_irq) from [] (bcm2835_handle_irq+0x28/0x48)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364361] [] (bcm2835_handle_irq) from [] (__irq_svc+0x5c/0x7c)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364370] Exception stack(0xd87ebf10 to 0xd87ebf58)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364383] bf00: d87ebf60 00000000 cdb6dd00 00099000
Oct 26 17:27:29 raspberrypi kernel: [ 638.364397] bf20: d87ebf88 b635a44c b50014d0 0000004e c000ffc4 d87ea000 00000000 d87ebf84
Oct 26 17:27:29 raspberrypi kernel: [ 638.364409] bf40: d87ebf60 d87ebf60 c00715b8 c0071560 a0000013 ffffffff
Oct 26 17:27:29 raspberrypi kernel: [ 638.364439] [] (__irq_svc) from [] (getnstimeofday64+0x4/0x38)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364469] [] (getnstimeofday64) from [] (SyS_gettimeofday+0x2c/0xc4)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364494] [] (SyS_gettimeofday) from [] (ret_fast_syscall+0x0/0x1c)
Oct 26 17:27:29 raspberrypi kernel: [ 638.364503] ---[ end trace c671e665f44dd987 ]---
Oct 26 17:27:34 raspberrypi kernel: [ 643.465251] g_ipod gadget: = ipod_audio_req_match()
Oct 26 17:27:34 raspberrypi kernel: [ 643.465273] g_ipod gadget: Control req: 81.06 v2200 i0002 l60
Oct 26 17:27:34 raspberrypi kernel: [ 643.465276] Not Handled
Oct 26 17:27:34 raspberrypi kernel: [ 643.465282] g_ipod gadget: = ipod_hid_setup()
Oct 26 17:27:34 raspberrypi kernel: [ 643.465289] g_ipod gadget: Control req: 81.06 v2200 i0002 l60

I need to get the golang ipod to log something or else I can't tell what packets it may or may not be processing, but then again, when using the p-tech-se fork and gettign "Incompatible USB" it may not even be trying. :(

I was so excited to see this, I hope it can be revived and made to work.

CRC error with Sony STR-DH550

Hi.

I got the driver and the userspace application to work and tested the driver with my Sony STR-DH550 amplifier. The amplifier tries to read the "iPod" but I see that the process (the "ipod" userspace program) shows a CRC error:
ERRO[0025.020803] << PACKET error=packet decode: crc mismatch: recv 53 != calc 8c len=0
ERRO[0025.021055] << PACKET error=packet decode: crc mismatch: recv 70 != calc 94 len=0

I uploaded the trace file to https://pastebin.com/TUa5nt4U
In the file, the process runs for a while, then stops to the CRC error. After a while it runs ok for some time and then another CRC error appers. That's when I stopped the trace.

Any ideas what might be wrong?

Car display shows unreadable device (Volvo v70 2015)

Hi,

I've a volvo v70 which supports 'ipod' as a USB source (alongside USB mass storage). I've sccessfully compiled the kernel module and idod application on my OrangePi Zero (which has otherwise served as a mass storage dev gadget, so I know the gadget support works ok).

However, upon starting the iod application, nothing is logged. As best I can tell from the application log, the car never sends any USB command to the gadget/application.

The kernel log however shows a few interactions which might suggest what's going on. Using commit 731a471 I find:

[ 253.439735] g_ipod_audio: loading out-of-tree module taints kernel.
[ 253.440169] g_ipod_audio: module verification failed: signature and/or required key missing - tainting kernel

[ 253.440891] **********************************************************
[ 253.440899] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
[ 253.440906] ** **
[ 253.440913] ** trace_printk() being used. Allocating extra memory. **
[ 253.441040] ** **
[ 253.441073] ** This means that this is a DEBUG kernel and it is **
[ 253.441092] ** unsafe for production use. **
[ 253.441114] ** **
[ 253.441135] ** If you see this message and you are not debugging **
[ 253.441170] ** the kernel, report this immediately to your vendor! **
[ 253.441183] ** **
[ 253.441189] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
[ 253.441196] **********************************************************
[ 253.489859] ipod-gadget: init
[ 253.489912] g_ipod gadget: = ipod_bind()
[ 253.526046] Mass Storage Function, version: 2009/09/11
[ 253.526077] LUN: removable file: (no medium)
[ 253.526104] g_ipod gadget: = ipod_config_ptp_bind()
[ 253.526379] ipod-gadget-hid: alloc_chrdev_region dev: 241 0
[ 253.526405] ipod-gadget-hid: ipod_hid_alloc()
[ 253.526714] g_ipod gadget: = ipod_config_bind()
[ 253.526726] g_ipod gadget: = ipod_audio_bind()
[ 253.527897] g_ipod gadget: = ipod_hid_bind(), deactivs=1
[ 253.527936] g_ipod gadget: g_ipod ready
[ 301.615955] ipod-gadget-hid: ipod_hid_dev_open()
[ 301.615974] ipod-gadget-hid: activating
[ 301.889085] g_ipod gadget: = ipod_disconnect()
[ 301.992153] g_ipod gadget: = ipod_audio_set_alt(0,0)
[ 301.992178] g_ipod gadget: = ipod_audio_set_alt(1,0)
[ 301.992189] ipod-gadget-audio: audio stop
[ 301.992206] g_ipod gadget: = ipod_hid_set_alt()
[ 301.997021] g_ipod gadget: = ipod_hid_set_alt()
[ 302.005209] g_ipod gadget: = ipod_hid_setup()
[ 302.005233] g_ipod gadget: Control req: 81.06 v2111 i0002 l512
[ 302.005247] g_ipod gadget: get hid descriptor
[ 302.005654] g_ipod gadget: = ipod_hid_setup()
[ 302.005677] g_ipod gadget: Control req: 81.06 v2211 i0002 l512
[ 302.005690] g_ipod gadget: get hid descriptor
[ 302.007639] g_ipod gadget: = ipod_hid_setup()
[ 302.007662] g_ipod gadget: Control req: 40.40 v01f4 i01f4 l0
[ 302.007675] g_ipod gadget: apple vendor 0x40
[ 302.264696] g_ipod gadget: = ipod_hid_setup()
[ 302.264725] g_ipod gadget: Control req: 81.06 v2100 i0002 l512
[ 302.264738] g_ipod gadget: get hid descriptor
[ 335.182314] ipod-gadget-hid: ipod_hid_dev_release()
[ 335.182340] ipod-gadget-hid: deactivating=1
[ 335.182391] g_ipod gadget: = ipod_audio_disable()
[ 335.182398] ipod-gadget-audio: audio stop
[ 335.182407] g_ipod gadget: = ipod_hid_disable()
[ 335.182427] g_ipod gadget: = ipod_disconnect()

I've a feeling the hid interactions at ~ the 302.x mark should be a clue as to what happens. I've seem for others logs that they log similar, but varying numbers at this stage. Does this seem familiar to anyone? What should one expect at this stage in the dmesg log?

Thanks!
Anders

awesome project, but I have a couple of questions...

Title says it. I noticed that I have to manually load the modules and run the ./ipod command whenever I restart the pi. I had to set up a cron job to automate this.

Couple questions, though:
how do I make this also emulate the mass storage part so I can add music to it like I would a usb drive or an ipod?

My JVC KW-V230BT is stuck at "reading" and won't do anything. what's going on?

Is this project still being maintained, btw?

Car Display Shows Unsupported

Connected to USB port in a Honda Accord.

Car display shows Unsupported after a bit. Used swap config option a few different ways but same issue.

tracefile.log

Any help is appreciated.

Thank you!

couldn't find an available UDC, Denon AVR-X2300W

I recently got a Denon AVR-X2300W but was disappointed it doesn't support UAC, only iPod or USB memory stick so it'll be great if I can get this to work! I was able to build and load the kernel modules OK but I don't see a /dev/iap0 after connecting my amp. instead I see this in dmesg:

[93975.740345] **********************************************************
[93975.740346] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[93975.740346] **                                                      **
[93975.740346] ** trace_printk() being used. Allocating extra memory.  **
[93975.740347] **                                                      **
[93975.740347] ** This means that this is a DEBUG kernel and it is     **
[93975.740347] ** unsafe for production use.                           **
[93975.740348] **                                                      **
[93975.740348] ** If you see this message and you are not debugging    **
[93975.740348] ** the kernel, report this immediately to your vendor!  **
[93975.740348] **                                                      **
[93975.740349] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[93975.740349] **********************************************************
[94002.524086] ipod-gadget: init
[94002.524088] udc-core: couldn't find an available UDC - added [g_ipod] to list of pending drivers

Have you got any suggestions? I'm running Ubuntu 20.04 amd64 with kernel 5.4.0-81

Also, it would be nice to see an install target added to the makefile.

Thanks

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.

2011 Nissan Murano "Reading file..."

The Murano finally recognizes my Pi Zero as an iPod so it tries to connect, but it stays at "Reading file..." and never goes any farther. I suspect it's doing some kind of iPod verification - all the other devices I've tried that emulate an iPod interface have failed (WMA2000 is an example).

I should note that all Apple iPod/iPhones I've tried work fine with this interface.

Below is the debug output from the ipod program:

[pi@raspberrypi:~/bin $ sudo ./ipod -d serve -w /tmp/ipod.trace /dev/iap0
INFO[0000.007158] device opened path=/dev/iap0
WARN[0000.008815] writing trace path=/tmp/ipod.trace
INFO[0047.761798] << FRAME len=24
([]uint8) (len=24 cap=64) {
00000000 55 0e 00 13 00 00 04 19 00 00 00 06 00 00 02 00 |U...............|
00000010 ba 00 00 00 00 00 00 00 |........|
}
INFO[0047.785752] << PACKET len=14
([]uint8) (len=14 cap=15) {
00000000 00 13 00 00 04 19 00 00 00 06 00 00 02 00 |..............|
}
INFO[0047.803311] << CMD id=0x00,0x13 trx= type=*general.IdentifyDeviceLingoes
(*ipod.Command)(0x180e760)({
ID: (ipod.LingoCmdID) 0x00,0x13,
Transaction: (*ipod.Transaction)(),
Payload: (*general.IdentifyDeviceLingoes)(0x1816cd0)({
Lingos: (uint32) 1049,
Options: (uint32) 6,
DeviceID: (uint32) 512
})
})
INFO[0047.871903] >> CMD id=0x00,0x02 trx= type=*general.ACK
(*ipod.Command)(0x180e7b0)({
ID: (ipod.LingoCmdID) 0x00,0x02,
Transaction: (*ipod.Transaction)(),
Payload: (*general.ACK)(0x1816e72)({
Status: (general.ACKStatus) 0,
CmdID: (uint8) 19
})
})
INFO[0047.909048] >> PACKET len=4
([]uint8) (len=4 cap=64) {
00000000 00 02 00 13 |....|
}
INFO[0047.925376] >> FRAME len=7
([]uint8) (len=7 cap=1024) {
00000000 55 04 00 02 00 13 e7 |U......|
}

combine with bluetooth

Hi Andrew,

nice stuff, and unfortunate that my Go knowledge is rather limited (you wouldn't happen to have a C(++) port lying arround ;). Was thinking to combine your code with bluetooth, e.g. a module that support AVRCP1.5, and i2S and use AVRCP to replicate playlists/audiobooks/..., ctrl over uart and audio through I2S input (e.g. with the IS2020 family modules of microchip), or venture into the use of the bluetooth module on the pi zero and use AVRCP from there, however than just with SBC coded. Or i could try to port all to a custom-android-rom..

This way i'm hoping to build a bluetooth-dock experience for my car, regardless of android/ios and (in my case) the required physical connection by usb.

I haven't checked-out your code that thorough, but i guess the IAP protocol supports these features as well, and would be possible with your code-base?

All looks good, but can't stream sound

Hello there,

I was able to install everything well, the client launch correctly, I can connect it to my car and I have Attached iPod Device on my car screen. But when I tried to run a sound test I have :

pi@raspberrypi:~ $ speaker-test -D plughw:CARD=iPodUSB,DEV=0 -c 2 -r 44100
...
Playback device is plughw:CARD=iPodUSB,DEV=0
...
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error

I'm working on a raspi zero W (raspian 5.4.51).
And the sound card show up with aplay -l .
The trace file only have the 2 following lines :

< 08 00 55 0E 00 13 00 00 04 11 00 00 00 02 00 00 02 00 C6 00 00
> 01 00 55 04 00 02 00 13 E7 00 00 00 00

And thank you for your code oandrew !

couldn't find an available UDC

After I run insmod g_ipod_gadget.ko, I get this message in dmesg
udc-core: couldn't find an available UDC - added [g_ipod] to list of pending drivers

Did i miss something?

Mitsubishi detects iPod, but doesn't play audio

Hi andrew,

I just tried to set up ipod-gadget using the scripts at https://github.com/geniass/pipod; but I used the newest kernel modules from this repository instead of the outdated ones in pipod.

I am trying to get this to work with a Mitsubishi Mirage / Space Star car radio, and a Raspberry Pi Zero W. The radio detects an iPod with one song and looks like it is playing, but I don't hear any sound when I play music over Bluetooth. This is with the swap_configs=1 parameter (as mentioned in another issue report for the Pi Zero W), without that it didn't detect the device at all.

I am getting the following logfile:

< 05 00 55 04 00 38 00 01 C3
> 01 00 55 06 00 02 00 01 00 38 BF 00 00
< 09 02 55 7E 00 39 00 02 09 0E 00 00 03 00 04 0A 00 00 00 02 00 00 02 00 0A 00 01 00 00 00 00 00 00 00 10 0F 00 02 01 4C 69 6E 6B 20 53 79 73 74 65 6D 00 06 00 02 04 00 08 05 06 00 02 05 01 00
< 09 03 00 21 00 02 06 4D 69 74 73 75 62 69 73 68 69 20 4D 6F 74 6F 72 73 20 43 6F 72 70 6F 72 61 74 69 6F 6E 00 10 00 02 07 44 59 2D 31 4D 45 33 45 32 31 2D 54 00 05 00 02 09 00 80 07 00 02 0C
< 05 01 00 00 00 00 4F 00 00
> 04 00 55 30 00 3A 00 02 09 03 00 00 00 03 00 01 00 04 00 02 00 01 04 00 02 00 04 04 00 02 00 05 04 00 02 00 06 04 00 02 00 07 04 00 02 00 09 04 00 02 00 0C 2E 00 00 00 00 00 00 00 00 00 00 00
< 06 00 55 05 00 3B 00 03 00 BD 00
> 01 00 55 05 00 3C 00 03 00 BC 00 00 00
> 01 00 55 04 00 14 00 01 E7 00 00 00 00
< 09 02 55 88 00 15 00 01 02 00 00 07 30 82 03 88 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 03 79 30 82 03 75 02 01 01 31 00 30 0B 06 09 2A 86 48 86 F7 0D 01 07 01 A0 82 03 5D 30 82 03 59 30 82 02
< 09 03 41 A0 03 02 01 02 02 0F 12 12 AA 12 06 26 AA 04 AA 86 15 AA 58 53 29 30 0D 06 09 2A 86 48 86 F7 0D 01 01 05 05 00 30 81 83 31 0B 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04
< 08 01 0A 13 0A 41 70 70 6C 65 20 49 6E 63 2E 31 B3 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 01 07 26 30 24 06 03 55 04 0B 13 1D 41 70 70 6C 65 20 43 65 72 74 69 66 69 63 61 74 69 6F 6E 20 41 75 74 68 6F 72 69 74 79 31 37 30 35 06 03 55 04 03 13 2E 41 70
< 09 03 70 6C 65 20 69 50 6F 64 20 41 63 63 65 73 73 6F 72 69 65 73 20 43 65 72 74 69 66 69 63 61 74 69 6F 6E 20 41 75 74 68 6F 72 69 74 79 30 1E 17 0D 31 32 30 36 32 37 31 31 33 33 30 36 5A 17
< 08 01 0D 32 30 30 36 32 37 31 31 33 33 30 36 5A 07 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 02 07 30 70 31 0B 30 09 06 03 55 04 06 13 02 55 53 31 13 30 11 06 03 55 04 0A 0C 0A 41 70 70 6C 65 20 49 6E 63 2E 31 1F 30 1D 06 03 55 04 0B 0C 16 41 70 70 6C 65
< 09 03 20 69 50 6F 64 20 41 63 63 65 73 73 6F 72 69 65 73 31 2B 30 29 06 03 55 04 03 0C 22 49 50 41 5F 31 32 31 32 41 41 31 32 30 36 32 36 41 41 30 34 41 41 38 36 31 35 41 41 35 38 35 33 32 39
< 08 01 30 81 9F 30 0D 06 09 2A 86 48 86 F7 0D 01 47 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 03 07 01 01 05 00 03 81 8D 00 30 81 89 02 81 81 00 A0 AB AB 95 EE 15 D0 22 7C 06 51 3D 9C FD B5 BE F8 C4 AE BA 67 A5 ED 32 7D 87 06 19 56 E7 B6 B8 83 4C F2 5D 92
< 09 03 91 60 89 66 D1 F9 07 2A 1F D9 42 61 1B 57 48 A7 9F 9A 72 E6 20 24 1D C6 6B 16 E8 52 A4 C6 BC 2F BA 11 93 9A A8 D7 DA 16 B9 0B E1 90 2A 3A 40 F9 1D 15 DC 1D A7 75 F1 A1 BD DD 06 A5 98 E6
< 08 01 97 B7 D7 78 05 3B AB 43 53 E2 82 0A D4 33 90 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 04 07 58 95 18 B4 D8 5A 20 C1 5A 92 10 54 45 DE 9F 02 03 01 00 01 A3 60 30 5E 30 1D 06 03 55 1D 0E 04 16 04 14 AF 1E 0E E7 81 7A 35 B3 E0 54 7E 4D F4 1B C6 44 3C
< 09 03 E3 EB 70 30 0C 06 03 55 1D 13 01 01 FF 04 02 30 00 30 1F 06 03 55 1D 23 04 18 30 16 80 14 FF 4B 1A 43 9A F5 19 96 AB 18 00 2B 61 C9 EE 40 9D 8E C7 04 30 0E 06 03 55 1D 0F 01 01 FF 04 04
< 08 01 03 02 03 B8 30 0D 06 09 2A 86 48 86 F7 0D 3C 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 05 07 01 01 05 05 00 03 82 01 01 00 2F B5 3A EE A5 FF 10 75 91 10 03 D1 13 DD 2D CA 38 9E 61 5E A5 30 8D 26 20 32 CA 36 3C E1 50 F0 40 97 B8 E3 3A 8D ED 37 5C CB
< 09 03 8D 1F 87 80 A8 2A 8D 31 9C 99 BF 0C 7D BD AF CD B3 20 AC DF 18 C3 9B 12 C4 31 FE 3A B2 70 1A D7 29 F2 30 B6 51 63 9C 4A 9C 27 F3 D6 B5 4A 31 6C A7 99 13 16 FC 4A EF DA 9B 78 F1 B9 BF 8C
< 08 01 68 5D B1 EB D7 1F 78 DB FB 19 8D F9 7F CD EE 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 02 55 88 00 15 00 01 02 00 06 07 B5 3B D6 C5 2A 0B F6 E3 1E 18 BA 5A 6A BC 05 5B 81 DA 4B 00 00 51 E7 63 68 DA 17 97 D8 CA 07 4A 69 18 57 92 8C D5 E9 55 70 07 27 22 1F 8D 17 4B 07 D9 80 E3
< 09 03 7C 6C 70 9A 5A 02 DA 10 51 24 B6 A9 CF 9C 67 3F 05 A4 1B 8E 71 F4 DE 4B 0F FD 08 9A 84 4A D1 9B 3E 04 8B 18 F7 EB C6 0A 45 04 04 6A 67 19 DE 3A 3E 94 F7 CB B8 DA 99 16 A5 A3 B8 E5 47 DC
< 08 01 F6 FF 3D F8 A3 AC 25 73 AC E8 44 0F 1B D9 18 00 00 00 00
> 01 00 55 06 00 02 00 01 00 15 E2 00 00
< 09 00 55 14 00 15 00 01 02 00 07 07 04 3D 1B 6E 28 1E FD 16 66 40 31 00 CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 01 00 55 04 0A 02 00 02 EE 00 00 00 00
> 01 00 55 05 00 16 00 01 00 E4 00 00 00
> 04 00 55 19 00 17 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
< 08 00 55 10 0A 03 00 02 00 00 7D 00 00 00 AC 44 00 00 BB 80 39
> 03 00 55 10 0A 04 00 02 00 00 AC 44 00 00 00 00 00 00 00 00 F0
< 06 00 55 05 00 0F 00 04 00 E8 00
> 01 00 55 07 00 10 00 04 00 01 09 DB 00
< 06 00 55 06 0A 00 00 02 00 04 EA
< 06 00 55 05 00 0F 00 05 04 E3 00
> 01 00 55 07 00 10 00 05 04 01 0C D3 00
< 06 00 55 05 00 0F 00 06 0A DC 00
> 01 00 55 07 00 10 00 06 0A 01 02 D6 00
< 05 00 55 04 00 05 00 07 F0
> 02 00 55 0A 00 02 00 07 06 05 00 00 01 2C B5
> 01 00 55 06 00 02 00 07 00 05 EC 00 00
< 09 02 55 84 00 18 00 01 37 BB F1 B0 23 69 39 2A CC E3 9F 29 1A 74 92 8C CC F8 81 2C C4 B7 F1 1D 0C 11 F4 14 A5 94 4C AD 9A 4B 3D 12 26 DF F4 D5 B2 52 5D 46 17 8D 9E E7 82 DB B0 BE 85 96 F9 C0
< 09 03 D8 4F C9 F5 71 25 EA EC AE E0 B2 85 96 9C D4 30 DF 37 28 7E 0E 0E DE CA B9 A3 16 46 69 FA A4 0E 0B A6 80 02 C8 90 45 63 63 F7 F6 1F 82 74 6B B2 5B 88 E3 4E C9 FE 45 89 98 30 35 4D 11 CA
< 07 01 0F 40 CE 5B 77 06 C7 EB 36 D8 2B 00 00
> 01 00 55 05 00 19 00 01 00 E1 00 00 00
< 06 00 55 05 04 00 1C 00 08 D3 00
> 03 00 55 0E 04 00 1D 00 08 00 04 93 E0 00 00 4E 20 02 E2 00 00
< 06 00 55 05 04 00 2F 00 09 BF 00
> 01 00 55 06 04 00 30 00 09 00 BD 00 00
< 07 00 55 07 04 00 31 00 0A 02 01 B7 00 00 00
> 01 00 55 08 04 00 01 00 0A 00 00 31 B8
< 06 00 55 05 04 00 2F 00 0B BD 00
> 01 00 55 06 04 00 30 00 0B 00 BB 00 00
< 06 00 55 05 04 00 2C 00 0C BF 00
> 01 00 55 06 04 00 2D 00 0C 00 BD 00 00
< 06 00 55 05 04 00 16 00 0D D4 00
> 01 00 55 08 04 00 01 00 0D 00 00 16 D0
< 06 00 55 06 04 00 18 00 0E 05 CB
> 02 00 55 09 04 00 19 00 0E 00 00 00 01 CB 00
< 06 00 55 05 04 00 35 00 0F B3 00
> 02 00 55 09 04 00 36 00 0F 00 00 00 01 AD 00
< 06 00 55 05 04 00 1E 00 10 C9 00
> 02 00 55 09 04 00 1F 00 10 00 00 00 00 C4 00
< 06 00 55 06 04 00 26 00 11 01 BE
> 01 00 55 08 04 00 01 00 11 00 00 26 BC
< 06 00 55 06 04 00 29 00 12 01 BA
> 01 00 55 08 04 00 01 00 12 00 00 29 B8
< 06 00 55 05 04 00 1E 00 13 C6 00
> 02 00 55 09 04 00 1F 00 13 00 00 00 00 C1 00
< 06 00 55 05 04 00 16 00 14 CD 00
> 01 00 55 08 04 00 01 00 14 00 00 16 C9
< 06 00 55 05 04 00 16 00 15 CC 00
> 01 00 55 08 04 00 01 00 15 00 00 16 C8
< 06 00 55 05 04 00 16 00 16 CB 00
> 01 00 55 08 04 00 01 00 16 00 00 16 C7
< 07 00 55 09 04 00 24 00 17 00 00 00 00 B8 00
> 03 00 55 0B 04 00 25 00 17 61 6C 62 75 6D 00 A4 00 00 00 00 00
< 07 00 55 09 04 00 20 00 18 00 00 00 00 BB 00
> 03 00 55 0B 04 00 21 00 18 74 69 74 6C 65 00 96 00 00 00 00 00
< 07 00 55 09 04 00 22 00 19 00 00 00 00 B8 00
> 03 00 55 0C 04 00 23 00 19 61 72 74 69 73 74 00 1D 00 00 00 00
< 06 00 55 06 04 00 29 00 1A 01 B2
> 01 00 55 08 04 00 01 00 1A 00 00 29 B0
< 06 00 55 06 04 00 29 00 1B 04 AE
> 01 00 55 08 04 00 01 00 1B 00 00 29 AF
< 06 00 55 05 04 00 1E 00 1C BD 00
> 02 00 55 09 04 00 1F 00 1C 00 00 00 00 B8 00
< 06 00 55 05 04 00 1C 00 1D BE 00
> 03 00 55 0E 04 00 1D 00 1D 00 04 93 E0 00 00 4E 20 02 CD 00 00
< 06 00 55 06 04 00 29 00 1E 01 AE
> 01 00 55 08 04 00 01 00 1E 00 00 29 AC
< 06 00 55 05 04 00 1C 00 1F BC 00
> 03 00 55 0E 04 00 1D 00 1F 00 04 93 E0 00 00 4E 20 02 CB 00 00
< 06 00 55 06 04 00 29 00 20 04 A9
> 01 00 55 08 04 00 01 00 20 00 00 29 AA
< 06 00 55 05 04 00 1E 00 21 B8 00
> 02 00 55 09 04 00 1F 00 21 00 00 00 00 B3 00
< 06 00 55 05 04 00 1C 00 22 B9 00
> 03 00 55 0E 04 00 1D 00 22 00 04 93 E0 00 00 4E 20 02 C8 00 00
< 06 00 55 06 04 00 29 00 23 01 A9
> 01 00 55 08 04 00 01 00 23 00 00 29 A7
< 06 00 55 05 04 00 1C 00 24 B7 00
> 03 00 55 0E 04 00 1D 00 24 00 04 93 E0 00 00 4E 20 02 C6 00 00
< 07 00 55 07 04 00 31 00 25 01 00 9E 00 00 00
> 01 00 55 08 04 00 01 00 25 00 00 31 9D
< 06 00 55 05 04 00 2F 00 26 A2 00
> 01 00 55 06 04 00 30 00 26 00 A0 00 00
< 07 00 55 07 04 00 31 00 27 01 00 9C 00 00 00
> 01 00 55 08 04 00 01 00 27 00 00 31 9B
< 06 00 55 05 04 00 2F 00 28 A0 00
> 01 00 55 06 04 00 30 00 28 00 9E 00 00
< 07 00 55 07 04 00 2E 00 29 01 00 9D 00 00 00
> 01 00 55 08 04 00 01 00 29 00 00 2E 9C
< 06 00 55 05 04 00 2C 00 2A A1 00
> 01 00 55 06 04 00 2D 00 2A 00 9F 00 00
< 06 00 55 05 04 00 1E 00 2B AE 00
> 02 00 55 09 04 00 1F 00 2B 00 00 00 00 A9 00
< 06 00 55 05 04 00 35 00 2C 96 00
> 02 00 55 09 04 00 36 00 2C 00 00 00 01 90 00
< 06 00 55 06 04 00 29 00 2D 01 9F
> 01 00 55 08 04 00 01 00 2D 00 00 29 9D
< 06 00 55 05 04 00 1E 00 2E AB 00
> 02 00 55 09 04 00 1F 00 2E 00 00 00 00 A6 00
< 06 00 55 05 04 00 16 00 2F B2 00
> 01 00 55 08 04 00 01 00 2F 00 00 16 AE
< 06 00 55 05 04 00 16 00 30 B1 00
> 01 00 55 08 04 00 01 00 30 00 00 16 AD
< 06 00 55 05 04 00 16 00 31 B0 00
> 01 00 55 08 04 00 01 00 31 00 00 16 AC
< 07 00 55 09 04 00 24 00 32 00 00 00 00 9D 00
> 03 00 55 0B 04 00 25 00 32 61 6C 62 75 6D 00 89 00 00 00 00 00
< 07 00 55 09 04 00 20 00 33 00 00 00 00 A0 00
> 03 00 55 0B 04 00 21 00 33 74 69 74 6C 65 00 7B 00 00 00 00 00
< 07 00 55 09 04 00 22 00 34 00 00 00 00 9D 00
> 03 00 55 0C 04 00 23 00 34 61 72 74 69 73 74 00 02 00 00 00 00

Now it might well be possible that I am using the pipod software wrong and the ipod-gadget itself is working fine, but I don't know if this is the case.

Would you mind taking a look at that trace log and tell me if there's anything wrong with it?

Thanks a lot!

Hyundai sits at "Reading USB" and no real debug info

I'm trying to use this purely to obtain steering wheel controls and onscreen display of tracks. My car (Hyundai i30) takes the audio from an AUX port, and uses the USB port for iPod Accessory communication..

On the other end is a Raspberry Pi Zero which i've managed to compile the kernel module fine.

As soon as you load the iPod client, however, the i30 states; "Reading USB" for around a minute or two, then comes up with an error that it cannot read the USB.

I've tried changing swap_configs and product_id's when performing the insmod on the g_ipod_gadget kernel module as such:

insmod /home/pi/ipod-gadget/gadget/g_ipod_gadget.ko swap_configs=1 product_id=0x1207

i've tried various different product_id's to no avail.

Any ideas?

What cable to use?

What cable is best for this?

My car uses a provided MDI (Media Device Interface) to lightning male adapter. Connecting via the USB adapter with a standard lightning to usb lead doesn't work (for iPhones/iPods.)

So I'm assuming I'm gonna need a USB male (Pi) to lightning female (car) cable/adapter?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.