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

Camera does not return data #10

Open
ShangDali6 opened this issue Jul 11, 2022 · 12 comments
Open

Camera does not return data #10

ShangDali6 opened this issue Jul 11, 2022 · 12 comments

Comments

@ShangDali6
Copy link

hello ,I transplanted your project. My camera can be recognized and configured successfully, but there is no data output.
Stuck here

case VIDEO_STATE_DATA_IN:
  
  result = USBH_LL_GetURBState(phost, VIDEO_Handle->camera.Pipe);
  if((result == USBH_URB_DONE) && ((phost->Timer - VIDEO_Handle->camera.timer) >= VIDEO_Handle->camera.Poll))
  {
    VIDEO_Handle->camera.timer = phost->Timer;
     rxlen = USBH_LL_GetLastXferSize(phost, VIDEO_Handle->camera.Pipe);//Return the last transfered packet size.
    video_stream_process_packet((uint16_t)rxlen);
      
    USBH_IsocReceiveData(phost,
                        (uint8_t*)tmp_packet_framebuffer,
                        VIDEO_Handle->camera.EpSize,
                        VIDEO_Handle->camera.Pipe);
  }

The value of result has always been VIDEO_STATE_IDLE

@iliasam
Copy link
Owner

iliasam commented Jul 11, 2022

Hello. What do you mean by "transplanted your project"?
Are you sure that your camera can work in Full-Speed mode?
Are you sure that your camera supports YUY2 or MJPEG modes in Full-Speed mode?
The best way to check it - is to connect camera to the PC with USB forced to Full-Speed mode and see USB descriptors.

@ShangDali6
Copy link
Author

Thank you very much for your reply,The following is the log printed by serial port,

image
73fb0c7abdc685238de0cf575044def

@iliasam
Copy link
Owner

iliasam commented Jul 12, 2022

OK, looks like camera say, that it is supporting certain video modes, but I have seen cameras that do not send video data is Full Speed mode (but they where sending good descriptors). So it would be useful to check it at the PC - so you would need to switch USB of the PC to Full Speed mode.

@Mrqinw
Copy link

Mrqinw commented Oct 31, 2023

hello ,I transplanted your project. My camera can be recognized and configured successfully, but there is no data output. Stuck here

case VIDEO_STATE_DATA_IN:
  
  result = USBH_LL_GetURBState(phost, VIDEO_Handle->camera.Pipe);
  if((result == USBH_URB_DONE) && ((phost->Timer - VIDEO_Handle->camera.timer) >= VIDEO_Handle->camera.Poll))
  {
    VIDEO_Handle->camera.timer = phost->Timer;
     rxlen = USBH_LL_GetLastXferSize(phost, VIDEO_Handle->camera.Pipe);//Return the last transfered packet size.
    video_stream_process_packet((uint16_t)rxlen);
      
    USBH_IsocReceiveData(phost,
                        (uint8_t*)tmp_packet_framebuffer,
                        VIDEO_Handle->camera.EpSize,
                        VIDEO_Handle->camera.Pipe);
  }

The value of result has always been VIDEO_STATE_IDLE

你好,我也用的这个开发板,可以直接在rgb LCD 屏上显示吗?我的没有屏幕没有视频出现

@Mrqinw
Copy link

Mrqinw commented Oct 31, 2023

Thank you very much for your reply,The following is the log printed by serial port,

image 73fb0c7abdc685238de0cf575044def

could you share your whole project with me?please [email protected] you

@Wana999
Copy link

Wana999 commented Apr 16, 2024

Hi, I have the same problem as you. I was able to enumerate my UVC device successfully, but I can't get to the interrupt once I start reading data. As per the answer, how to force USB into full speed mode on PC.

@Wana999
Copy link

Wana999 commented Apr 16, 2024

Snipaste_2024-04-16_17-53-28

Snipaste_2024-04-16_17-58-49

Another problem is that the descriptor information I read with the microcontroller is not the same as what I recognize with the USB Device Tree Viewer software. The total length of the configuration descriptor read by the microcontroller is 0x145 bytes, while the USB Device Tree Viewer recognizes it as 0x2DF bytes.

@iliasam
Copy link
Owner

iliasam commented Apr 16, 2024

"As per the answer, how to force USB into full speed mode on PC."
I know only one way - to select Full Speed in BIOS (if is is supported).
Device will dive different descriptors for FS and HS devices.

@Wana999
Copy link

Wana999 commented Apr 17, 2024

"As per the answer, how to force USB into full speed mode on PC."“根据答案,如何在PC上强制USB进入全速模式。” I know only one way - to select Full Speed in BIOS (if is is supported).我只知道一种方法 - 在 BIOS 中选择全速(如果支持)。 Device will dive different descriptors for FS and HS devices.设备将为 FS 和 HS 设备潜入不同的描述符。

Thank you for your answer. I'm guessing my problem is caused by the UVC device not supporting full speed mode. But basically all UVC devices you can buy nowadays run high speed mode. Can you recommend a UVC device that runs in full speed mode?

@iliasam
Copy link
Owner

iliasam commented Apr 17, 2024

See: LINK

@Wana999
Copy link

Wana999 commented Apr 22, 2024

See: LINK

I purchased the Microsoft HD-3000 camera. Now there is no problem with descriptor analysis and adjusting the camera settings, but it is not possible to open the interface to start data transfer using the USBH_SetInterface() function. Do you have a good solution for this please?

@iliasam
Copy link
Owner

iliasam commented Apr 22, 2024

Sorry I don't know. I have not worked with cameras for a long time.

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

4 participants