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).
Did you ever figure this out? I think if you just want a server running, install the latest firmware, and you have one running. Connect your omega to a local wifi network, and you have a .local available address on your subnet. I do this as I use an Omega2 as my MQTT server for my local network. I changed my hostname to mosquitto and now through my network via the web console app and I can connect to this server using mosquitto.local from other hosts. It doesn't take a lot of setup.
ln -s /usr/bin/gcc /usr/bin/ccache_cc
pip install -r requirements.txt
Some Unicode Fixed / User Role Fixed
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/util/comm.py
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/util/virtual.py
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/plugins/virtual_printer/virtual.py
sed -i 's/exit("You should not run OctoPrint as root!")/pass/g' /root/OctoPrint-1.3.9/src/octoprint/server/__init__.py
If has no error.
octoprint serve --iknowwhatimdoing &
Need Waiting Server to Start / console will show some infor & some warning information / Just Ignore
Use browser to connect
If connect Ok.
Now You can remove usb disk and connect to 3d printer.
Hey! instead of playing with 120V how about we pull some power off of your doorbell transformer which is usually hanging off the side of your panel or mounted beside it. Usually these suckers do 12V/16V/24V AC. You're safe, and the setup you're making is safe. now whatever you use to get 5v will be cheaper and smaller.
I finished pcb mounting.
Here is the some photo.
I developed capabilities.
4 relay output
4 open collector output
4 optocoupler input
16 GPIO pins with 3.3 volts and 5 volts support (PIC24FJ256106 MCU including remap pins)
12 GPIO pins OMEGA2+
6 User led (PIC)
2 User led (Omega2+)
USB Debug support (Omega2+)
USB Host Port (Omega2+)
USB Host / Client Port (PIC)
8K Eeprom (24C64)
XBee compatible socket (I am using HMTRP transceiver on HMTRP-XBee Shield)