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

Handshake Failed (sp_blocking_read returning 0) #47

Open
L-udo opened this issue Aug 3, 2023 · 16 comments
Open

Handshake Failed (sp_blocking_read returning 0) #47

L-udo opened this issue Aug 3, 2023 · 16 comments

Comments

@L-udo
Copy link

L-udo commented Aug 3, 2023

Pinecil V2
Running v2.20.14DAF70
Windows 10 10.0.19045

C:\Users\User\Downloads\Pinecilv2>.\blisp.exe write --chip bl60x --reset -p COM3 Pinecilv2_EN.bin
sp: sp_get_port_by_name(COM3, 000000D98A6FCF98) called.
sp: Building structure for port COM3.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_open(00000283A3378880, 0x3) called.
sp: Opening port COM3.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: get_config(00000283A3378880, 000000D98A6FCEF8, 000000D98A6FCF18) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCEF8, 000000D98A6FCF18) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_open returning SP_OK.
sp: sp_set_bits(00000283A3378880, 8) called.
sp: get_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_bits returning SP_OK.
sp: sp_set_parity(00000283A3378880, 0) called.
sp: get_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_parity returning SP_OK.
sp: sp_set_stopbits(00000283A3378880, 1) called.
sp: get_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_stopbits returning SP_OK.
sp: sp_set_flowcontrol(00000283A3378880, 0) called.
sp: get_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: sp_set_config_flowcontrol returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_flowcontrol returning SP_OK.
sp: sp_get_port_usb_vid_pid(00000283A3378880) called.
sp: sp_get_port_usb_vid_pid returning SP_ERR_SUPP: VID:PID values are not available.
sp: sp_set_baudrate(00000283A3378880, 460800) called.
sp: get_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCF38, 000000D98A6FCF10) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_baudrate returning SP_OK.
Sending a handshake...
sp: sp_set_rts(00000283A3378880, 1) called.
sp: get_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_rts returning SP_OK.
sp: sp_set_dtr(00000283A3378880, 1) called.
sp: get_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_dtr returning SP_OK.
sp: sp_set_dtr(00000283A3378880, 0) called.
sp: get_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_dtr returning SP_OK.
sp: sp_set_rts(00000283A3378880, 0) called.
sp: get_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Getting configuration for port COM3.
sp: get_config returning SP_OK.
sp: set_config(00000283A3378880, 000000D98A6FCC28, 000000D98A6FCC00) called.
sp: Setting configuration for port COM3.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: set_config returning SP_OK.
sp: sp_set_rts returning SP_OK.
sp: sp_blocking_write(00000283A3378880, 000000D98A6FCC80, 276, 500) called.
sp: Writing 276 bytes to port COM3, timeout 500 ms.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: Waiting for write to complete.
sp: Write completed, 276/276 bytes written.
sp: sp_blocking_write returning 276.
sp: sp_drain(00000283A3378880) called.
sp: Draining port COM3.
sp: sp_drain returning SP_OK.
sp: sp_flush(00000283A3378880, 0x1) called.
sp: Flushing input buffers on port COM3.
sp: Previous wait completed.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: sp_flush returning SP_OK.
sp: sp_blocking_read(00000283A3378880, 000000D98A6FD148, 2, 50) called.
sp: Reading 2 bytes from port COM3, timeout 50 ms.
sp: Read completed immediately.
sp: restart_wait_if_needed returning SP_OK.
sp: sp_blocking_read returning 2.
sp: sp_blocking_write(00000283A3378880, 000000D98A6FCC80, 276, 500) called.
sp: Writing 276 bytes to port COM3, timeout 500 ms.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: Waiting for write to complete.
sp: Write completed, 276/276 bytes written.
sp: sp_blocking_write returning 276.
sp: sp_drain(00000283A3378880) called.
sp: Draining port COM3.
sp: sp_drain returning SP_OK.
sp: sp_flush(00000283A3378880, 0x1) called.
sp: Flushing input buffers on port COM3.
sp: Previous wait completed.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: sp_flush returning SP_OK.
sp: sp_blocking_read(00000283A3378880, 000000D98A6FD148, 2, 50) called.
sp: Reading 2 bytes from port COM3, timeout 50 ms.
sp: Read completed immediately.
sp: restart_wait_if_needed returning SP_OK.
sp: sp_blocking_read returning 2.
sp: sp_blocking_write(00000283A3378880, 000000D98A6FCC80, 276, 500) called.
sp: Writing 276 bytes to port COM3, timeout 500 ms.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: Waiting for write to complete.
sp: Write completed, 276/276 bytes written.
sp: sp_blocking_write returning 276.
sp: sp_drain(00000283A3378880) called.
sp: Draining port COM3.
sp: sp_drain returning SP_OK.
sp: sp_flush(00000283A3378880, 0x1) called.
sp: Flushing input buffers on port COM3.
sp: Previous wait completed.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: sp_flush returning SP_OK.
sp: sp_blocking_read(00000283A3378880, 000000D98A6FD148, 2, 50) called.
sp: Reading 2 bytes from port COM3, timeout 50 ms.
sp: Read completed immediately.
sp: restart_wait_if_needed returning SP_OK.
sp: sp_blocking_read returning 2.
sp: sp_blocking_write(00000283A3378880, 000000D98A6FCC80, 276, 500) called.
sp: Writing 276 bytes to port COM3, timeout 500 ms.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: Waiting for write to complete.
sp: Write completed, 276/276 bytes written.
sp: sp_blocking_write returning 276.
sp: sp_drain(00000283A3378880) called.
sp: Draining port COM3.
sp: sp_drain returning SP_OK.
sp: sp_flush(00000283A3378880, 0x1) called.
sp: Flushing input buffers on port COM3.
sp: Previous wait completed.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: sp_flush returning SP_OK.
sp: sp_blocking_read(00000283A3378880, 000000D98A6FD148, 2, 50) called.
sp: Reading 2 bytes from port COM3, timeout 50 ms.
sp: Read completed immediately.
sp: restart_wait_if_needed returning SP_OK.
sp: sp_blocking_read returning 2.
sp: sp_blocking_write(00000283A3378880, 000000D98A6FCC80, 276, 500) called.
sp: Writing 276 bytes to port COM3, timeout 500 ms.
sp: await_write_completion(00000283A3378880) called.
sp: await_write_completion returning SP_OK.
sp: Waiting for write to complete.
sp: Write completed, 276/276 bytes written.
sp: sp_blocking_write returning 276.
sp: sp_drain(00000283A3378880) called.
sp: Draining port COM3.
sp: sp_drain returning SP_OK.
sp: sp_flush(00000283A3378880, 0x1) called.
sp: Flushing input buffers on port COM3.
sp: Previous wait completed.
sp: New wait running in background.
sp: restart_wait returning SP_OK.
sp: sp_flush returning SP_OK.
sp: sp_blocking_read(00000283A3378880, 000000D98A6FD148, 2, 50) called.
sp: Reading 2 bytes from port COM3, timeout 50 ms.
sp: Waiting for read to complete.
sp: Read completed, 0/2 bytes read.
sp: restart_wait_if_needed returning SP_OK.
sp: sp_blocking_read returning 0.
Received no response from chip.
Failed to handshake with device.
sp: sp_close(00000283A3378880) called.
sp: Closing port COM3.
sp: sp_close returning SP_OK.
@L-udo L-udo changed the title Handshake Failed Handshake Failed (sp_blocking_read returning 0) Aug 3, 2023
@gamelaster
Copy link
Member

Because on you are specifying chip bl60x, but Pinecil have BL706 chip, thus use bl70x instead.

@L-udo
Copy link
Author

L-udo commented Aug 4, 2023

Sorry, forgot to add it to the issue, i have tried using bl70x, same issue with both

@gamelaster
Copy link
Member

Did you tried another pc / cable? Are you sure you have correct COM port? (you don't need to specify com port on BL70X)

@L-udo
Copy link
Author

L-udo commented Aug 5, 2023

Did you tried another pc / cable? Are you sure you have correct COM port? (you don't need to specify com port on BL70X)

I will try a new pc later. I have tried all of the above sadly

@kajgies
Copy link

kajgies commented Oct 4, 2023

I am having the same issue, here is the log:

.\blisp.exe write --port=COM3 --chip=bl70x --reset .\Pinecilv2_EN.bin

Sending a handshake...
Received no response from chip.
Failed to handshake with device.

I got the same error with 5 different USB cables on both my PC & laptop. Tried both USB C to C, and C to A cables. I also tried manually setting the COM of my device to COM10 but got the same error. Could it be that something changed on newer batches of the pinecil 2?

@gamelaster
Copy link
Member

@kajgies what is the output when --port is not specified?

@kajgies
Copy link

kajgies commented Oct 4, 2023

.\blisp.exe write --chip=bl70x --reset .\Pinecilv2_EN.bin
Device not found

I am sure that COM3 is the pinecil.

@gamelaster
Copy link
Member

@kajgies please, can you open device manager, find the COM3, and find VID & PID?

@kajgies
Copy link

kajgies commented Oct 5, 2023

It says:
USB\VID_FFFF&PID_FFFF&REV_0200

@gamelaster
Copy link
Member

This is very interesting, it is correct VID & PID. Did you tried to launch it as Admin?

@kajgies
Copy link

kajgies commented Oct 5, 2023

I tried both cmd & powershell. Tried it as admin too, same result

@gamelaster
Copy link
Member

@kajgies This is really interesting that even when device is connected and visible, it can't auto-detect or use the port... Maybe antivirus or something? I really never seen this happening.

@kajgies
Copy link

kajgies commented Oct 6, 2023

Just Windows antivirus.
If there's anything else I can try or do to help solve the problem, please let me know.

@kajgies
Copy link

kajgies commented Oct 6, 2023

I tried linux and here it worked instantly. So for me the problem is resolved. Weird that it didn't work on Windows tho. I tried all the USB ports on a PC & a laptop, very strange.

@lucidnx
Copy link

lucidnx commented Aug 17, 2024

Anyone got it solved? I am on Windows 11, unable to flash pinecil v2 :(

@piebaker
Copy link

Bump, still a present issue, two machines, two cables, both win 10.

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

5 participants