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

Cross-platform compatibility #12

Open
Kevin4562 opened this issue Aug 17, 2023 · 0 comments
Open

Cross-platform compatibility #12

Kevin4562 opened this issue Aug 17, 2023 · 0 comments

Comments

@Kevin4562
Copy link

It appears that Bluekitchen supports Windows and the serial connection should be agnostic of the system. Is there any reason that the sniffer could not run on a Windows system after minor modifications?

Attempting even the ES32_CMD_VERSION over a Window's COM port responds with malformed data, curious on what the difference between the two serial connections are?

import serial
import time

ESP32_CMD_VERSION = b'\xEE'

serial_port = 'COM8'


def reset_firmware(wait_reset=True, soft_reset=False):
    if soft_reset is False:
        ser = serial.Serial(serial_port, 921600, rtscts=False, dsrdtr=False)
        ser.rts = True
        ser.dtr = True
        ser.dtr = False
        ser.dtr = True
        ser.close()
        ser = None
        print('[!] Reset Done! EN pin toggled HIGH->LOW->HIGH')


def get_version():
    serial_con = serial.Serial(serial_port, 921600, rtscts=0, xonxoff=0, timeout=1)
    serial_con.write(ESP32_CMD_VERSION)
    version_string = serial_con.readline()
    print(version_string.decode('utf-8', errors='ignore'))


reset_firmware()
time.sleep(0.8)
get_version()

Same code works fine on Ubuntu, does not work on Windows

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

1 participant