@György-Farkas it seems setting the inputs 'fast-gpio set-input 15' as well as 16 and 17 makes the touch screen work in the dock (while omega is plugged in), but causes the touch screen to think its repeatedly being tapped without actually tapping it. The first touch works, but then the screen acts as if its being touched everywhere. For example I have three buttons which when tapped change colour, what happens is when I tap one button it changes colour and then all of a sudden the other buttons start changing colours and flickering (as if i am tapping them when I am not). (without the omega plugged in touch screen doesnt respond).
WHEREAS in the Arduino Uno (not dock) touch screen works perfectly.
I have created a patch that can be applied to the openwrt 18.06.2 tree which makes fbtft and all fb_xxx chip drivers available in make menuconfig, under Kernel Modules -> Video Support -> kmod-fbtft-support.
The main patch that adds these options is this one.
Finally, if you do this on a fresh OpenWrt 18.06 tree (and not on the onion fork which already contains mt7688 SPI fixes), you also need:
this one for making MT7688 hardware SPI work at least in pseudo-fullduplex (real full duplex is broken in MT7688 hardware) and to allow SPI transfers >16bytes.
and this one is not technically needed but nice to have because it fixes the bogus error message at startup regarding SPI and DT.
With these patches in place, you can select fbtft and a suitable display driver in menuconfig (I use fb_ssd1306 with a tiny 128x64 OLED for now, because that's the only display I have right now, the bigger color LCDs I ordered haven't arrived yet). Then build the firmware and install.
fbtft and all dependencies are autoloaded at startup, but the actual display must be instantiated as follows:
# load the chip driver
# parametrize it via the `fbtft_device` helper module
insmod fbtft_device custom name=fb_ssd1306 busnum=0 cs=1 speed=16000000 mode=0 fps=50 gpios=reset:0,dc:1 width=128 height=64 verbose=3
After that, the linux framebuffer console automatically kicks in and the display shows a blinking cursor :-)
echo "Hello World!" >/dev/tty1
echo "Hello Omega!" >/dev/tty1
echo "Hello OLED!" >/dev/tty1
# connect a USB keyboard and have a supertiny console:
login -f root </dev/tty >/dev/tty1 2>&1
This type of display with so-called 4-wire SPI needs some extra signals (dc, reset, see gpios part in the insmod fbtft_device command). The complete wiring of what you see in the photo is:
GND = GND
VCC = 3.3V
D0 = SCK -> Omega SCK/GPIO7
D1 = MOSI -> Omega MOSI/GPIO8 (NOTE: Omega2 does not coldboot when this is connected to the SSD1306 OLED, probably need to add resistor into the line or remove pullup/down on the display itself)
RES = Reset -> Omega GPIO0
DC = Data/Command -> Omega GPIO1
CS = Chip Select -> Omega CS1/GPIO6
Next step will be a sample app with LittlevGL but probably I'll wait with that until I have a color display, will be more fun then ;-)
@Lazar-Demin Great to see it working. If you need a gateway you can also use a ESP8266 NodeMCU board with another RFM95 module and configure and flash the https://github.com/things4u/ESP-1ch-Gateway-v5.0 firwmare on it, also see http://things4u.github.io/. Needs a little bit of fiddling around with the configuration and pinout; Also be aware that the EUI of the TTN gateway must be the one that the firmware spits out on startup (it's made up of the ESP8266's MAC address and two 0xff in the middle).