Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ofi:vscode-ev3 [2022/07/08 15:12] Ivo Blöchliger |
ofi:vscode-ev3 [2023/02/17 15:34] (current) Ivo Blöchliger |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Native Python auf EV3 mit VSCode ====== | ====== Native Python auf EV3 mit VSCode ====== | ||
* https:// | * https:// | ||
- | * SSH: user robot, | + | * SSH: user robot, |
* hostnamectl set-hostname LEGO12 | * hostnamectl set-hostname LEGO12 | ||
+ | * WiFi-Daten in var/ | ||
* https:// | * https:// | ||
* Use '' | * Use '' | ||
+ | |||
+ | / | ||
+ | <code txt wpa_suplicant> | ||
+ | # | ||
+ | # | ||
+ | # Die Gruppe muss natürlich angepasst werden | ||
+ | eapol_version=1 | ||
+ | # 0: Der Treiber des Interfaces kümmert sich um das Scannen von Netzen und die AP-Auswahl. | ||
+ | # Dieser Modus sollte benutzt werden, wenn man eine Verschlüsselung auf ein Kabelnetzwerk legt. | ||
+ | # 1: wpa_supplicant kümmert sich um das Scannen von Netzen und die AP-Auswahl. | ||
+ | # 2: Fast wie 0, es wird aber mit Hilfe von Sicherheitsrichtlinien und der SSID zu APs verbunden (BSSID wird nicht unterstützt) | ||
+ | # | ||
+ | # Normalerweise funktioniert entweder Modus 1 oder Modus 2. | ||
+ | ap_scan=1 | ||
+ | |||
+ | network={ | ||
+ | ssid=" | ||
+ | scan_ssid=1 | ||
+ | psk=" | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Way better than stuff below (also, you could take the image and then zero is out while mounted as loopback, much quicker!) | ||
+ | <code ruby> | ||
+ | def cmd(c) | ||
+ | puts c | ||
+ | r = `#{c}` | ||
+ | return r | ||
+ | end | ||
+ | |||
+ | raise " | ||
+ | hostname = $ARGV[0] | ||
+ | |||
+ | img = " | ||
+ | cmd(" | ||
+ | dev = cmd(" | ||
+ | |||
+ | p2 = dev+" | ||
+ | cmd(" | ||
+ | cmd(" | ||
+ | puts " | ||
+ | cmd(" | ||
+ | cmd(" | ||
+ | |||
+ | cmd(" | ||
+ | puts "Image is ready. Write it with" | ||
+ | puts "dd if=#{img} of=/ | ||
+ | |||
+ | </ | ||
+ | |||
<code bash> | <code bash> |