Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32f407 discovery serial example does not work #18

Closed
niclashoyer opened this issue Apr 12, 2021 · 4 comments
Closed

stm32f407 discovery serial example does not work #18

niclashoyer opened this issue Apr 12, 2021 · 4 comments

Comments

@niclashoyer
Copy link

niclashoyer commented Apr 12, 2021

Hi,

I tried to run the serial example on my stm32f407 discovery board: https://github.com/Disasm/usb-otg-workspace/blob/master/example-f407-board/examples/serial.rs

The code runs fine so far, the device enumerates:

$ lsusb
Bus 004 Device 008: ID 0483:3748 STMicroelectronics ST-LINK/V2
Bus 002 Device 012: ID 16c0:27dd Van Ooijen Technische Informatica CDC-ACM class devices (modems)
…

But it does not send/receive any characters on /dev/ttyACM0. I already tried to investigate it, as there is no error so far. The only thing that I see is that it never actually receives data. I already tried several clients (screen, tio, minicom), to no avail. I also uninstalled ModemManager, just in case.

Using usbmon and wireshark I see that the device connects successfully, but then just stops communicating after the SET LINE CODING Request:

Bildschirmfoto von 2021-04-12 16-10-28

Full wireshark dump: usb.pcapng.gz

Is there any way I could debug this further?

@niclashoyer
Copy link
Author

Just tested on a different computer and it worked there, strange. dmesg output was also a bit different. I'll try to dump usb messages there and compare them.

@Disasm
Copy link
Member

Disasm commented Apr 12, 2021

A silly question: a you running a release build of a firmware?

@niclashoyer
Copy link
Author

niclashoyer commented Apr 12, 2021

yes and the firmware was identical (actually flashed it on the non-working computer and just plugged it into the other computer)

edit: flashed using this command:

cargo run --release --example serial

@niclashoyer
Copy link
Author

Ok, here is the dump of the communication from the working computer:

usb.pcapng.gz

As far as I can see the communication is the same until URB_CONTROL out and then it just starts communicating (I just pressed abc):

Bildschirmfoto von 2021-04-12 18-37-36

I already tested on another computer and it also worked there, so I think it must be something with the OS, but I don't know how to proceed from here.

I think this can be closed for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants