diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 000000000..5e7ef03d5
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,10 @@
+# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu/.devcontainer/base.Dockerfile
+
+# [Choice] Ubuntu version: bionic, focal
+ARG VARIANT="focal"
+FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
+
+# [Optional] Uncomment this section to install additional OS packages.
+RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+ && apt-get -y install python3-distutils
+RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip -O /tmp/protoc.zip && cd /tmp && unzip protoc.zip && chmod a+x bin/protoc && cp bin/protoc /usr/local/bin
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 000000000..e0a284e88
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,32 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
+// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu
+{
+ "name": "Ubuntu",
+ "build": {
+ "dockerfile": "Dockerfile",
+ // Update 'VARIANT' to pick an Ubuntu version: focal, bionic
+ "args": { "VARIANT": "focal" }
+ },
+
+ // Set *default* container specific settings.json values on container create.
+ "settings": {
+ "terminal.integrated.shell.linux": "/bin/bash"
+ },
+
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [
+ "platformio.platformio-ide",
+ "xaver.clang-format"
+ ],
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ // "postCreateCommand": "uname -a",
+
+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+ "remoteUser": "vscode",
+
+ "postCreateCommand": "git submodule update --init"
+}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 826eaac58..dad7634ec 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -14,7 +14,17 @@
+
+
+
+
+
+
+
+
+
+
@@ -59,9 +69,9 @@
-
+
-
+
@@ -100,6 +110,7 @@
+
@@ -146,6 +157,11 @@
20
+
+ file://$USER_HOME$/.platformio/packages/framework-portduino/cores/portduino/PortduinoGPIO.cpp
+ 41
+
+
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5ce21fa35..455d58ffb 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -77,6 +77,5 @@
"--java_out=/tmp",
"-I=/home/kevinh/development/meshtastic/meshtastic-esp32/proto"
]
- },
- "editor.formatOnSave": true
+ }
}
\ No newline at end of file
diff --git a/geeksville-private/TODO.md b/geeksville-private/TODO.md
index 6fefdd616..286551b59 100644
--- a/geeksville-private/TODO.md
+++ b/geeksville-private/TODO.md
@@ -4,10 +4,10 @@ You probably don't care about this section - skip to the next one.
## before next release
-* @havealoha fixedposition not working
* pine64 lora module
-* merge https://meshtastic.discourse.group/t/spanish-translation-update/2986/5
* nrf52 USB is unreliable while sleeping?
+* @havealoha fixedposition not working
+* merge https://meshtastic.discourse.group/t/spanish-translation-update/2986/5
* @luxonn reports that after a while the android app stops showing new messages
* nrf52 shows as "sleeping" in android app? (but led is blinking)
* ask for vercel access
diff --git a/geeksville-private/pine64.md b/geeksville-private/pine64.md
new file mode 100644
index 000000000..86691277a
--- /dev/null
+++ b/geeksville-private/pine64.md
@@ -0,0 +1,51 @@
+# Notes on the pine64 lora board
+
+like before but sx1262 based?
+
+Since both DIO3 and DIO2 not apply to PINE64 LoRa situation, I will wire SX1262 INT [DIO1] pin, contact to CS341F pin 7 INT# and pin 5.
+
+FIX ch341 GPIO access from linux
+RF95 packet RX seems busted FIX FIRST
+
+USE ch341 devboard if needed
+
+SX1262 BUSY seems to come out on pin 15 of the RFM90 HOPE module. The 'footprint' seems rotated on the pine64 board schematic and that becomes pin 7 on U4 which is "DIO5" on that schematic. Which goes to pin 8 on the CH341F, which that datasheet calls "IN3"
+
+FIXME - see if possible to read BUSY from "IN3"?
+
+on a ch341a
+ * - Pin 15 (D0/CS0 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS) (confirm hooked to CS)
+ * - Pin 16 (D1/CS1 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS)
+ * - Pin 17 (D2/CS2 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS)
+ * - Pin 19 (D4/DOUT2) as input/output (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT) / gpio4 in linux driver / (FIXME: confirm hooked to IRQ also?)
+ * - Pin 21 (D6/DIN2 ) as input (CH341_PIN_MODE_IN) / called RTS when in UART mode
+
+## ch341-driver
+
+driver busted in 5.11 kernels (rf95 init fails). 5.8.0 is okay, 5.8.18 is okay. fails on 5.10.31, 5.9.16 is okay. Therefore breakage happened in 5.10 kernels! Possibly not really breakage, possibly just sloppy caching or something that is more easily caught with modern threading.
+
+cs_change is not being set on the way into the driver!
+
+## gpio
+
+the new GPIO interface https://embeddedbits.org/new-linux-kernel-gpio-user-space-interface/
+
+~/development/meshtastic/meshtastic-esp32$ gpiodetect
+gpiochip0 [INT34BB:00] (312 lines)
+gpiochip1 [ch341] (2 lines)
+~/development/meshtastic/meshtastic-esp32$ gpioinfo 1
+gpiochip1 - 2 lines:
+ line 0: "gpio4" unused input active-high
+ line 1: "gpio5" unused input active-high
+gpiofind gpio4
+gpiochip1 0
+
+DO NOT "apt install libgpiod-dev" It doesn't work with kernels newer than about 5.8. Instead build and install from source: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
+
+## Send in patch
+Fix drivers/spi/spi.c transfer_once
+
+read about spi: https://elinux.org/images/2/20/Whats_going_on_with_SPI--mark_brown.pdf
+
+https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
+git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
\ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index c6bebe36f..11a52156c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -499,7 +499,7 @@ void setup()
delete rIf;
rIf = NULL;
} else {
- DEBUG_MSG("Radio init succeeded, using RF95 radio\n");
+ DEBUG_MSG("RF95 Radio init succeeded, using RF95 radio\n");
}
}
#endif
@@ -512,7 +512,7 @@ void setup()
delete rIf;
rIf = NULL;
} else {
- DEBUG_MSG("Radio init succeeded, using SX1262 radio\n");
+ DEBUG_MSG("SX1262 Radio init succeeded, using SX1262 radio\n");
}
}
#endif