My final goal is to talk to a network switch that has a USB CDC port. When I connect this switch to a PC I get a cdc_acm port. When I try to use the USB host code with an ESP32S2 (Saola) to connect I get this STALL. However when using the code (on the Saola) to connect to a second ESP32S2 it works fine. There I do not get a STALL.
I just logged the traffic produced between a PC (Ubuntu) and the switch to see what happens there (as the PC is able to connect). Now I see that there are several STALLs also. The difference however is that Ubuntu seems to repeat requests when a STALL is encountered (I have not yet studied the trace):
Code: Select all
31625911-31625981 USB packet: Packets: SETUP ADDR 0 EP 0
31625989-31626187 USB packet: Packets: DATA0 [ 80 06 00 01 00 00 40 00 ]
31626191-31626229 USB packet: Packets: ACK
31626292-31626361 USB packet: Packets: IN ADDR 0 EP 0
31626366-31626404 USB packet: Packets: NAK
31626903-31626972 USB packet: Packets: IN ADDR 0 EP 0
31626977-31627338 USB packet: Packets: DATA1 [ 12 01 00 02 EF 02 01 40 F0 03 3F 01 01 00 01 02 03 01 ]
31627348-31627386 USB packet: Packets: ACK
31627399-31627468 USB packet: Packets: OUT ADDR 0 EP 0
31627477-31627547 USB packet: Packets: DATA1 [ ]
31627552-31627590 USB packet: Packets: ACK
32951865-32951934 USB packet: Packets: SOF 714
... more SOFs
34697501-34697571 USB packet: Packets: SETUP ADDR 0 EP 0
34697579-34697778 USB packet: Packets: DATA0 [ 00 05 0B 00 00 00 00 00 ]
34697783-34697821 USB packet: Packets: ACK
34697833-34697902 USB packet: Packets: IN ADDR 0 EP 0
34697907-34697945 USB packet: Packets: NAK
34698419-34698488 USB packet: Packets: IN ADDR 0 EP 0
34698493-34698563 USB packet: Packets: DATA1 [ ]
34698572-34698610 USB packet: Packets: ACK
34704010-34704079 USB packet: Packets: SOF 787
... more SOFs
35273327-35273396 USB packet: Packets: SETUP ADDR 11 EP 0
35273405-35273603 USB packet: Packets: DATA0 [ 80 06 00 01 00 00 12 00 ]
35273607-35273645 USB packet: Packets: ACK
35273709-35273778 USB packet: Packets: IN ADDR 11 EP 0
35273783-35273821 USB packet: Packets: NAK
35274308-35274377 USB packet: Packets: IN ADDR 11 EP 0
35274383-35274744 USB packet: Packets: DATA1 [ 12 01 00 02 EF 02 01 40 F0 03 3F 01 01 00 01 02 03 01 ]
35274753-35274791 USB packet: Packets: ACK
35274904-35274973 USB packet: Packets: OUT ADDR 11 EP 0
35274983-35275053 USB packet: Packets: DATA1 [ ]
35275057-35275095 USB packet: Packets: ACK
35275685-35275754 USB packet: Packets: SETUP ADDR 11 EP 0
35275764-35275962 USB packet: Packets: DATA0 [ 80 06 00 06 00 00 0A 00 ]
35275966-35276004 USB packet: Packets: ACK
35276168-35276237 USB packet: Packets: IN ADDR 11 EP 0
35276242-35276280 USB packet: Packets: STALL
35277690-35277759 USB packet: Packets: SETUP ADDR 11 EP 0
35277769-35277967 USB packet: Packets: DATA0 [ 80 06 00 06 00 00 0A 00 ]
35277971-35278007 USB packet: Packets: Invalid packet (shorter than 16 bits)
35278071-35278140 USB packet: Packets: IN ADDR 11 EP 0
35278145-35278183 USB packet: Packets: STALL
35280057-35280126 USB packet: Packets: SOF 811
35280136-35280205 USB packet: Packets: SETUP ADDR 11 EP 0
35280214-35280412 USB packet: Packets: DATA0 [ 80 06 00 06 00 00 0A 00 ]
35280416-35280454 USB packet: Packets: ACK
35280509-35280578 USB packet: Packets: IN ADDR 11 EP 0
35280583-35280621 USB packet: Packets: STALL
35282219-35282288 USB packet: Packets: SETUP ADDR 11 EP 0
35282297-35282494 USB packet: Packets: DATA0 [ 80 06 00 02 00 00 09 00 ]
35282499-35282537 USB packet: Packets: ACK
35282700-35282769 USB packet: Packets: IN ADDR 11 EP 0
35282774-35282988 USB packet: Packets: DATA1 [ 09 02 4B 00 02 01 00 20 32 ]
35282997-35283035 USB packet: Packets: ACK
35283149-35283218 USB packet: Packets: OUT ADDR 11 EP 0
35283228-35283298 USB packet: Packets: DATA1 [ ]
35283302-35283340 USB packet: Packets: ACK
35284543-35284612 USB packet: Packets: SETUP ADDR 11 EP 0
35284621-35284819 USB packet: Packets: DATA0 [ 80 06 00 02 00 00 4B 00 ]
35284823-35284861 USB packet: Packets: ACK
35284924-35284993 USB packet: Packets: IN ADDR 11 EP 0
35284998-35285036 USB packet: Packets: NAK
35285549-35285618 USB packet: Packets: IN ADDR 11 EP 0
35285623-35286145 USB packet: Packets: DATA1 [ 09 02 4B 00 02 01 00 20 32 08 0B 00 02 02 02 00 00 09 04 00 00 01 02 02 01 00 05 24 00 ]
35286182-35286717 USB packet: Packets: UNKNOWN
35286727-35286763 USB packet: Packets: Invalid packet (shorter than 16 bits)
35286773-35286842 USB packet: Packets: IN ADDR 11 EP 0
35286847-35286885 USB packet: Packets: NAK
35287397-35287466 USB packet: Packets: IN ADDR 11 EP 0
35287472-35287718 USB packet: Packets: DATA0 [ 02 40 00 00 07 05 81 02 40 00 00 ]
35287727-35287765 USB packet: Packets: ACK
35287798-35287867 USB packet: Packets: OUT ADDR 11 EP 0
35287877-35287947 USB packet: Packets: DATA1 [ ]
35287951-35287989 USB packet: Packets: ACK
35288585-35288654 USB packet: Packets: SETUP ADDR 11 EP 0
35288664-35288864 USB packet: Packets: DATA0 [ 80 06 00 03 00 00 FF 00 ]
35288868-35288906 USB packet: Packets: ACK
35289068-35289137 USB packet: Packets: IN ADDR 11 EP 0
35289142-35289275 USB packet: Packets: DATA1 [ 04 03 09 04 ]
35289285-35289323 USB packet: Packets: ACK
35289438-35289507 USB packet: Packets: OUT ADDR 11 EP 0
35289516-35289586 USB packet: Packets: DATA1 [ ]
35289590-35289628 USB packet: Packets: ACK
35290571-35290640 USB packet: Packets: SETUP ADDR 11 EP 0
35290649-35290849 USB packet: Packets: DATA0 [ 80 06 02 03 09 04 FF 00 ]
35290853-35290891 USB packet: Packets: ACK
35291054-35291123 USB packet: Packets: IN ADDR 11 EP 0
35291129-35291167 USB packet: Packets: NAK
35291838-35291907 USB packet: Packets: IN ADDR 11 EP 0
35291912-35292494 USB packet: Packets: DATA1 [ 20 03 48 00 50 00 4E 00 20 00 53 00 65 00 72 00 69 00 61 00 6C 00 20 00 50 00 6F 00 72 00 74 00 ]
35292503-35292541 USB packet: Packets: ACK
35292555-35292624 USB packet: Packets: OUT ADDR 11 EP 0
35292633-35292703 USB packet: Packets: DATA1 [ ]
35292707-35292745 USB packet: Packets: ACK
35293860-35293929 USB packet: Packets: SETUP ADDR 11 EP 0
35293939-35294139 USB packet: Packets: DATA0 [ 80 06 01 03 09 04 FF 00 ]
35294143-35294181 USB packet: Packets: ACK
35294347-35294416 USB packet: Packets: IN ADDR 11 EP 0
35294421-35294587 USB packet: Packets: DATA1 [ 06 03 48 00 50 00 ]
35294596-35294634 USB packet: Packets: ACK
35294752-35294821 USB packet: Packets: OUT ADDR 11 EP 0
35294830-35294900 USB packet: Packets: DATA1 [ ]
35294904-35294942 USB packet: Packets: ACK
35295770-35295839 USB packet: Packets: SETUP ADDR 11 EP 0
35295848-35296047 USB packet: Packets: DATA0 [ 80 06 03 03 09 04 FF 00 ]
35296053-35296089 USB packet: Packets: Invalid packet (shorter than 16 bits)
35296142-35296211 USB packet: Packets: IN ADDR 11 EP 0
35296216-35296254 USB packet: Packets: NAK
35296758-35296827 USB packet: Packets: IN ADDR 11 EP 0
35296832-35297285 USB packet: Packets: DATA1 [ 18 03 46 00 38 00 30 00 38 00 39 00 38 00 39 00 31 00 32 00 35 00 31 00 ]
35297295-35297333 USB packet: Packets: ACK
35297452-35297521 USB packet: Packets: OUT ADDR 11 EP 0
35297530-35297600 USB packet: Packets: DATA1 [ ]
35297604-35297642 USB packet: Packets: ACK
35304059-35304128 USB packet: Packets: SOF 812
35328061-35328130 USB packet: Packets: SOF 813
35342695-35342764 USB packet: Packets: SETUP ADDR 11 EP 0
35342774-35342971 USB packet: Packets: DATA0 [ 00 09 01 00 00 00 00 00 ]
35342976-35343014 USB packet: Packets: ACK
35343218-35343287 USB packet: Packets: IN ADDR 11 EP 0
35343292-35343362 USB packet: Packets: DATA1 [ ]
35343371-35343409 USB packet: Packets: ACK
35345545-35345614 USB packet: Packets: SETUP ADDR 11 EP 0
35345623-35345820 USB packet: Packets: DATA0 [ 21 20 00 00 00 00 07 00 ]
35345825-35345863 USB packet: Packets: ACK
35345927-35345996 USB packet: Packets: OUT ADDR 11 EP 0
35346005-35346186 USB packet: Packets: DATA1 [ 80 25 00 00 00 00 08 ]
35346191-35346229 USB packet: Packets: ACK
35346281-35346350 USB packet: Packets: IN ADDR 11 EP 0
35346356-35346394 USB packet: Packets: NAK
35346898-35346967 USB packet: Packets: IN ADDR 11 EP 0
35346973-35347011 USB packet: Packets: NAK
35347514-35347583 USB packet: Packets: IN ADDR 11 EP 0
35347589-35347625 USB packet: Packets: Invalid packet (shorter than 16 bits)
35348506-35348575 USB packet: Packets: IN ADDR 11 EP 0
35348581-35348649 USB packet: Packets: DATA1 [ ]
35348659-35348697 USB packet: Packets: ACK