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

List requirements for "flashing" system #942

Closed
NickVeld opened this issue Apr 26, 2021 · 5 comments
Closed

List requirements for "flashing" system #942

NickVeld opened this issue Apr 26, 2021 · 5 comments

Comments

@NickVeld
Copy link
Contributor

NickVeld commented Apr 26, 2021

System specification

  • Ubuntu 16.04 LTS (architecture: i386)
  • Packages(APT) from install_prereq.sh:
git=1:1.2.7.4-0ubuntu1.10
iw=3.17-1
dnsmasq=2.75-1ubuntu0.16.04.10
rfkill=0.5-1ubuntu3.1
hostapd=1:2.4-0ubuntu6.8
screen=4.3.1-2ubuntu0.1
curl=7.47.0-1ubuntu2.19
build-essential=12.1ubuntu2
python3-pip=8.1.1-2ubuntu0.6
python3-setuptools=20.7.0-1
python3-wheel=0.29.0-1
python3-dev=3.5.1-3
mosquitto=1.4.8-1ubuntu0.16.04.7
haveged=1.9.1-3
net-tools=1.60-26ubuntu1
libssl-dev=1.0.2g-1ubuntu4.19
  • Important packages(APT) not mentioned in install_prereq.sh:
openssl=1.0.2g-1ubuntu4.14
python3=3.5.1-3
  • PIP packages:
paho-mqtt==1.5.1
tornado==6.1
pycryptodomex==3.10.1
  • Additional details:
    • VirtualBox on the laptop with Windows 10

Because of the drivers for my USB WiFi stick I ended up with Ubuntu 16.04 LTS (besides tried 20.04, 18.04, 12.04 LTSes) that gives me the best result with both the stick and tuya-convert.

Problem

As I noticed (also it was noticed by @lustyffh in #455 (comment) , @sominaik in #892 (comment) , ... ) although the AP and other things were started successfully, there is no generated smarthack-*.log files. Only screenlog.0 with some logs appeared.

I was even able to connect to the vtrust-flash network with my smartphone (using #551 (comment) ) . My smart device is also connected to the network (when I started the discovering process, the led stopped blinking). And then I faced another problem:

SmartConfig complete.
Resending SmartConfig Packets
..................
*Many times*
SmartConfig complete.
Resending SmartConfig Packets
........
Timed out while waiting for the device to (re)connect

Afterward there was broken diagnostics because there was no smarthack-*.log

My assumption: the problem was caused by not enough modern packages in the repository of default Ubuntu 16.04.

Suggestion

Create new wiki page with the failed system specification on the "flashing" devices and the requirements to the system specifications included derived from the failed attempt. (The final requirements can be also hardcoded into install_prereq.sh.) Then the link to this page can be placed in the README.md.

@NickVeld
Copy link
Contributor Author

Before creating the page I am trying to overcome the problem with the ssl cipher similar to #423 . Unfortunately, without success yet.
The author of that issue just replace Ubuntu 16 with Raspberry Pi (with something equal to Ubuntu 18 taking into account the package versions), it is not applicable option to me.

So I updated the system with

libssl-dev=1.1.1-1ubuntu2.1~18.04.9
openssl=1.1.1-1ubuntu2.1~18.04.9

Using tcpdump + Wireshark I discovered that my plug sends one Client hello with the following cipher suites:

TLS_PSK_WITH_AES_128_CBC_SHA256 (0x00ae)
TLS_EMPTY_RENEGOTATION_INFO_SCSV (0x00ff)

And the psk-frontend.py fails on psk-frontend.py#L66 with:
could not establish sslpsk socket: ('No cipher can be selected.',)

I am going to digging more and post my progress.

@NickVeld
Copy link
Contributor Author

I discovered Ubuntu MATE distro and using Ubuntu MATE 18.04 finally flashed the device

I suppose for Ubuntu 16 you need to enable bionic (Ubuntu 18.04) repositories and update all packages connected with ssl

Now I am going to post fail attempts and some requirements

@NickVeld
Copy link
Contributor Author

@NickVeld
Copy link
Contributor Author

@kueblc Although I closed the issue I suppose you can be interested in its content because it covers some question that appears periodically. So I am mentioning you for the notification of you.

@NickVeld
Copy link
Contributor Author

Also #418 is similiar to the "no cipher" problem here.

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