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

Laptop build #36

Open
Yury-MonZon opened this issue Mar 7, 2023 · 14 comments
Open

Laptop build #36

Yury-MonZon opened this issue Mar 7, 2023 · 14 comments

Comments

@Yury-MonZon
Copy link

Yury-MonZon commented Mar 7, 2023

Hi there! Pop OS 6.1.11-76060111-generic #202302091138~1675975749~22.04~f771a7f SMP PREEMPT_DYNAMIC Thu F x86_64 x86_64 x86_64 GNU/Linux here. HW: TL-WN722N v2 card with this fix. Airdump-ng works fine - tested it.

$ sudo -E DISPLAY=:0 ./gs (I) src/PI_HAL.cpp: 286: Drivers: 4 (I) src/PI_HAL.cpp: 289: Driver 0: x11 (I) src/PI_HAL.cpp: 289: Driver 1: wayland (I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM (I) src/PI_HAL.cpp: 289: Driver 3: dummy (I) src/PI_HAL.cpp: 298: Mode -1: 455844177x671522212 (E) src/PI_HAL.cpp: 317: Cannot create window: No available video device (E) src/PI_HAL.cpp: 604: Cannot initialize display Segmentation fault
or

`$ sudo -E ./gs
(I) src/PI_HAL.cpp: 286: Drivers: 4
(I) src/PI_HAL.cpp: 289: Driver 0: x11
(I) src/PI_HAL.cpp: 289: Driver 1: wayland
(I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM
(I) src/PI_HAL.cpp: 289: Driver 3: dummy
(I) src/PI_HAL.cpp: 298: Mode 0: 1366x768
ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader!
0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader!
0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program!
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
(E) src/imgui_impl_opengl3.cpp: 382: GL error 1282 in glShaderSource(shaderData.VertHandle, 2, vertex_shader_with_version, NULL) file src/imgui_impl_opengl3.cpp line 382
ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader!
0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader!
0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program!
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
(E) src/imgui_impl_opengl3.cpp: 477: GL error 1282 in glGenBuffers(1, &g_VboHandle) file src/imgui_impl_opengl3.cpp line 477
(I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24
(I) src/Comms.cpp: 581: Opening interface wlxac15a2eb4253 in monitor mode
(E) src/Comms.cpp: 623: Error in pcap_activate: That device doesn't support monitor mode
`
What's my problem there?
Thanks

@jeanlemotan
Copy link
Owner

The problem seems to be this:
0:1(10): error: GLSL 1.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES
Can you comment this code and try?

    if (glsl_version == NULL)
        glsl_version = "#version 130";
    IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(g_GlslVersionString));
    strcpy(g_GlslVersionString, glsl_version);
    strcat(g_GlslVersionString, "\n");

It's in the imgui_impl_opengl3.cpp file, line 107.

@Yury-MonZon
Copy link
Author

Yury-MonZon commented Mar 7, 2023

Commented this block out.
And I get this:

`$ sudo -E DISPLAY=:0 ./gs
(I) src/PI_HAL.cpp: 286: Drivers: 4
(I) src/PI_HAL.cpp: 289: Driver 0: x11
(I) src/PI_HAL.cpp: 289: Driver 1: wayland
(I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM
(I) src/PI_HAL.cpp: 289: Driver 3: dummy
(I) src/PI_HAL.cpp: 298: Mode -1: 947570897x1420212923
(E) src/PI_HAL.cpp: 317: Cannot create window: No available video device
(E) src/PI_HAL.cpp: 604: Cannot initialize display
Segmentation fault

$ sudo -E ./gs
(I) src/PI_HAL.cpp: 286: Drivers: 4
(I) src/PI_HAL.cpp: 289: Driver 0: x11
(I) src/PI_HAL.cpp: 289: Driver 1: wayland
(I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM
(I) src/PI_HAL.cpp: 289: Driver 3: dummy
(I) src/PI_HAL.cpp: 298: Mode 0: 1366x768
(I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24
(I) src/Comms.cpp: 581: Opening interface wlxac15a2eb4253 in monitor mode
(E) src/Comms.cpp: 623: Error in pcap_activate: That device doesn't support monitor mode
`
But my wlan card works in monitor mode.

@Ncerzzk
Copy link

Ncerzzk commented Mar 8, 2023

can you test with sudo tcpdump --monitor-mode -i wlxac15a2eb4253
I'm sorry that I know little about Airdump-ng
generally in my test case, if the tcpdump operating netcard works fine, gs can work too.

@Yury-MonZon
Copy link
Author

Sadly, it doesn't work this way:
tcpdump: wlxac15a2eb4253: That device doesn't support monitor mode I think I can try to fix it later on.

But the main problem here is that I'm not passed the video issue yet. Would really appreciate your help here:
sudo -E DISPLAY=:0 ./gs (I) src/PI_HAL.cpp: 286: Drivers: 4 (I) src/PI_HAL.cpp: 289: Driver 0: x11 (I) src/PI_HAL.cpp: 289: Driver 1: wayland (I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM (I) src/PI_HAL.cpp: 289: Driver 3: dummy (I) src/PI_HAL.cpp: 298: Mode -1: 947570897x1420212923 (E) src/PI_HAL.cpp: 317: Cannot create window: No available video device (E) src/PI_HAL.cpp: 604: Cannot initialize display Segmentation fault

Thanks a lot!

@Ncerzzk
Copy link

Ncerzzk commented Mar 8, 2023

please exec printenv to get your DISPLAY info first
and try sudo -E DISPLAY=XX ./gs replace XX to your display,example: :0.0

@Yury-MonZon
Copy link
Author

No video problems so far. Thanks. I'll try to find my monitor mode problem.
$ sudo -E DISPLAY=:1 ./gs (I) src/PI_HAL.cpp: 286: Drivers: 4 (I) src/PI_HAL.cpp: 289: Driver 0: x11 (I) src/PI_HAL.cpp: 289: Driver 1: wayland (I) src/PI_HAL.cpp: 289: Driver 2: KMSDRM (I) src/PI_HAL.cpp: 289: Driver 3: dummy (I) src/PI_HAL.cpp: 298: Mode 0: 1366x768 (I) src/Comms.cpp: 718: Radiocap header size: 11, IEEE header size: 24 (I) src/Comms.cpp: 581: Opening interface wlxac15a2eb4253 in monitor mode (E) src/Comms.cpp: 623: Error in pcap_activate: That device doesn't support monitor mode

@Yury-MonZon
Copy link
Author

Yury-MonZon commented Mar 8, 2023

Just to be sure: I should see beacons and acknowledgements, right? Then it works fine with
sudo tcpdump -l -i wlan0 (not sure about -L key) after I put it in monitor mode with my script.

@Ncerzzk
Copy link

Ncerzzk commented Mar 9, 2023

why remove --monitor-mode option?

@Yury-MonZon
Copy link
Author

Because I have to put my card into the monitor mode via script. Can you provide some info on what tcpdump prints out on a properly working setup?

@Ncerzzk
Copy link

Ncerzzk commented Mar 9, 2023

sudo tcpdump --monitor-mode -i wlxac15a2eb4253 just a command to test whether your netcard could be operated well, it would put your card to monitor mode automatically(if it support), you don't need other script.
if it runs ok(no error), you can directly use sudo ./gs.

@Yury-MonZon
Copy link
Author

Yury-MonZon commented Mar 9, 2023

Tcpdump can't put my card into monitor mode for some reason. I have TP-WN722N v2.
But after I put my card manually into monitor mode I can run sudo tcpdump -i wlxac15a2eb4253:
`sudo tcpdump -i wlxac15a2eb4253

tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wlxac15a2eb4253, link-type IEEE802_11_RADIO (802.11 plus radiotap header), snapshot length 262144 bytes

09:58:39.321561 1.0 Mb/s 2412 MHz 11b -81dBm signal antenna 0 Beacon (SSID_NAME) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 4, PRIVACY

09:58:39.350210 11.0 Mb/s 2412 MHz 11b -83dBm signal antenna 0 Data IV:fc2606 Pad 20 KeyID 1

09:58:39.374229 1.0 Mb/s 2412 MHz 11b -95dBm signal antenna 0 Beacon (SSID_NAME) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 1, PRIVACY

09:58:39.380601 1.0 Mb/s 2412 MHz 11b -87dBm signal antenna 0 Beacon (SSID_NAME) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 1, PRIVACY

09:58:39.387989 1.0 Mb/s 2412 MHz 11b -79dBm signal antenna 0 Beacon (SSID_NAME) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 3, PRIVACY

09:58:39.462364 1.0 Mb/s 2412 MHz 11b -83dBm signal antenna 0 Beacon (SSID_NAME) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 1, PRIVACY

09:58:39.462366 1.0 Mb/s 2412 MHz 11b -83dBm signal antenna 0 Data IV:a071d1 Pad 20 KeyID 1
`
So, I suppose tcpdump works. Is there a way to not enable monitor mode with tcpdump in gs?

@Ncerzzk
Copy link

Ncerzzk commented Mar 9, 2023

gs didn't contain tcpdump. tcpdump for me is just used for test netcard.

try to remove if (pcap_set_rfmon(pcap.pcap, 1) < 0)
https://github.com/jeanlemotan/esp32-cam-fpv/blob/adc1e5c040bada4780de0db60716af411d326435/gs/src/Comms.cpp#LL599C9-L599C23

@Yury-MonZon
Copy link
Author

Yury-MonZon commented Mar 9, 2023

Thanks a lot! Now I'm getting somewhere - I can see the GS screen with HAL menu.

But sad news - my camera is borked, so I'll have to wait for a new one (confirmed with another code as well).

Is there an easy way to make esp32 send dummy frames(like the camera is there) so I can play with the link range etc?

@Ncerzzk
Copy link

Ncerzzk commented Mar 10, 2023

you can package a static jpeg into c header, then send it by call camera_data_available manually

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

3 participants