firmware
firmware copied to clipboard
[Bug]: SSH1106 (128x64) screen not initialised correctly on RAK11310
Category
Hardware Compatibility
Hardware
Rak11310
Firmware Version
v2.2.15.31c4693
Description
Flashed latest alpha version to RAK11310 via platform.io. HW setup is as follows:
- RAK11310 (EU_868) on RAK50005-O
- SH1106 display
- M5 card keyboard
Issue:
- Device boots (see log output below)
- It is stuck for around 5 minutes on Using Pin 24 in digital mode
- Log output tells turns on screen, but physical screen does not go on. Though all I2C lines are connected to RAK5005, M5 kb and display.
- after a while it continues boot, but green LED on RAK5005 is not blinking (it is constant enabled)
What could be wrong? I2C devices have been found. But maybe I2C communication not working (though tested with multimeter)?
Relevant log output
Device boots with following output:
INFO | ??:??:?? 6 sh1106 display found
DEBUG | ??:??:?? 6 0x0 subtype probed in 1 tries
DEBUG | ??:??:?? 6 I2C device found at address 0x5f
DEBUG | ??:??:?? 8 Wire.available() = 0
INFO | ??:??:?? 8 m5 cardKB found
INFO | ??:??:?? 8 2 I2C devices found
DEBUG | ??:??:?? 8 acc_info = 0
INFO | ??:??:?? 8 Meshtastic hwvendor=26, swver=2.2.15.31c4693c
INFO | ??:??:?? 8 Initializing NodeDB
INFO | ??:??:?? 8 Loading /prefs/db.proto
lfs_file_close: fd=0x200134cc
INFO | ??:??:?? 8 Loaded saved devicestate version 22
LittleFSDirImpl::openFile: rc=-2 fd=0x200134cc path=`/prefs/config.proto` openMode=0 accessMode=1 err=-2
INFO | ??:??:?? 8 No /prefs/config.proto preferences found
INFO | ??:??:?? 8 Installing default LocalConfig
INFO | ??:??:?? 8 Setting default channel and radio preferences!
DEBUG | ??:??:?? 8 Expanding short PSK #1
INFO | ??:??:?? 8 Wanted region 0, using UNSET
LittleFSDirImpl::openFile: rc=-2 fd=0x200134cc path=`/prefs/module.proto` openMode=0 accessMode=1 err=-2
INFO | ??:??:?? 8 No /prefs/module.proto preferences found
INFO | ??:??:?? 8 Installing default ModuleConfig
INFO | ??:??:?? 8 Loading /prefs/channels.proto
lfs_file_close: fd=0x200134cc
INFO | ??:??:?? 8 Loaded saved channelFile version 22
LittleFSDirImpl::openFile: rc=-2 fd=0x200134cc path=`/oem/oem.proto` openMode=0 accessMode=1 err=-2
INFO | ??:??:?? 8 No /oem/oem.proto preferences found
DEBUG | ??:??:?? 8 cleanupMeshDB purged 0 entries
WARN | ??:??:?? 8 Using nodenum 0x53848422
DEBUG | ??:??:?? 8 Expanding short PSK #1
INFO | ??:??:?? 8 Wanted region 0, using UNSET
DEBUG | ??:??:?? 8 region=0, NODENUM=0x53848422, dbsize=1
DEBUG | ??:??:?? 9 Read RTC time as 2444
DEBUG | ??:??:?? 9 Running without GPS.
DEBUG | ??:??:?? 9 NeighborInfoModule is disabled
LittleFSDirImpl::openFile: rc=-2 fd=0x2001531c path=`/prefs/ringtone.proto` openMode=0 accessMode=1 err=-2
INFO | ??:??:?? 9 No /prefs/ringtone.proto preferences found
INFO | ??:??:?? 9 Initializing External Notification Module
INFO | ??:??:?? 9 Using Pin 24 in digital mode
INFO | ??:??:?? 125 Turning on screen
Second part of log output:
DEBUG | ??:??:?? 215 Module wants a UI Frame
WARN | ??:??:?? 215 SX126xInterface(cs=13, irq=29, rst=14, busy=15)
DEBUG | ??:??:?? 215 SX126X_DIO3_TCXO_VOLTAGE defined, using DIO3 as TCXO reference voltage at 1.800000 V
INFO | ??:??:?? 215 Starting meshradio init...
DEBUG | ??:??:?? 215 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 215 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=253, time 2115 ms
INFO | ??:??:?? 215 Radio freq=906.875, config.lora.frequency_offset=0.000
INFO | ??:??:?? 215 Set radio: region=UNSET, name=LongFast, config=0, ch=19, power=30
INFO | ??:??:?? 215 Radio myRegion->freqStart -> myRegion->freqEnd: 902.000000 -> 928.000000 (26.000000 mhz)
INFO | ??:??:?? 215 Radio myRegion->numChannels: 104 x 250.000kHz
INFO | ??:??:?? 215 Radio channel_num: 20
INFO | ??:??:?? 215 Radio frequency: 906.875000
INFO | ??:??:?? 215 Slot time: 42 msec
INFO | ??:??:?? 215 Set radio: final power level=22
INFO | ??:??:?? 215 SX126x init result 0
INFO | ??:??:?? 215 Frequency set to 906.875000
INFO | ??:??:?? 215 Bandwidth set to 250.000000
INFO | ??:??:?? 215 Power output set to 22
DEBUG | ??:??:?? 215 Current limit set to 140.000000
DEBUG | ??:??:?? 215 Current limit set result 0
DEBUG | ??:??:?? 215 Setting DIO2 as RF switch
DEBUG | ??:??:?? 215 SX126X_RXEN not defined, defaulting to RADIOLIB_NC
DEBUG | ??:??:?? 215 SX126X_TXEN not defined, defaulting to RADIOLIB_NC
DEBUG | ??:??:?? 215 Using MCU pin -1 as RXEN and pin -1 as TXEN to control RF switching
INFO | ??:??:?? 215 Set RX gain to boosted mode; result: 0
INFO | ??:??:?? 215 SX1262 Radio init succeeded, using SX1262 radio
DEBUG | ??:??:?? 215 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=237, time 2000 ms
DEBUG | ??:??:?? 215 LoRA bitrate = 118.500000 bytes / sec
INFO | ??:??:?? 215 PowerFSM init, USB power=1
DEBUG | ??:??:?? 215 Enter state: BOOT
DEBUG | ??:??:?? 215 [Power] Battery: usbPower=1, isCharging=1, batMv=7252, batPct=100
DEBUG | ??:??:?? 215 [Screen] Screen: Started...
INFO | ??:??:?? 215 [NodeInfoModule] Sending our nodeinfo to mesh (wantReplies=1)
INFO | ??:??:?? 215 [NodeInfoModule] sending owner !53848422/Meshtastic 8422/8422
DEBUG | ??:??:?? 215 [NodeInfoModule] Initial packet id 315872950, numPacketId 4294967295
DEBUG | ??:??:?? 215 [NodeInfoModule] Update DB node 0x53848422, rx_time=0, channel=0
DEBUG | ??:??:?? 215 [NodeInfoModule] handleReceived(LOCAL) (id=0x12d3d6b8 fr=0x22 to=0xff, WantAck=0, HopLim=3 Ch=0x0 Portnum=4 WANTRESP priority=10)
DEBUG | ??:??:?? 215 [NodeInfoModule] No modules interested in portnum=4, src=LOCAL
DEBUG | ??:??:?? 215 [NodeInfoModule] localSend to channel 0
DEBUG | ??:??:?? 215 [NodeInfoModule] Add packet record (id=0x12d3d6b8 fr=0x22 to=0xff, WantAck=0, HopLim=3 Ch=0x0 Portnum=4 WANTRESP priority=10)
DEBUG | ??:??:?? 215 [NodeInfoModule] Expanding short PSK #1
DEBUG | ??:??:?? 215 [NodeInfoModule] Using AES128 key!
DEBUG | ??:??:?? 215 [NodeInfoModule] Installing AES128 key!
WARN | ??:??:?? 215 [NodeInfoModule] send - lora tx disable because RegionCode_Unset
DEBUG | ??:??:?? 215 [cardKB] Using I2C Bus 0 (the first one)
INFO | ??:??:?? 216 [DeviceTelemetryModule] (Sending): air_util_tx=0.000000, channel_utilization=0.000000, battery_level=101, voltage=7.252000
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] updateTelemetry LOCAL
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Node status update: 1 online, 1 total
INFO | ??:??:?? 216 [DeviceTelemetryModule] Sending packet to mesh
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Update DB node 0x53848422, rx_time=0, channel=0
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] handleReceived(LOCAL) (id=0x12d3d6b9 fr=0x22 to=0xff, WantAck=0, HopLim=3 Ch=0x0 Portnum=67 priority=1)
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] No modules interested in portnum=67, src=LOCAL
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] localSend to channel 0
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Add packet record (id=0x12d3d6b9 fr=0x22 to=0xff, WantAck=0, HopLim=3 Ch=0x0 Portnum=67 priority=1)
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Expanding short PSK #1
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Using AES128 key!
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Installing AES128 key!
WARN | ??:??:?? 216 [DeviceTelemetryModule] send - lora tx disable because RegionCode_Unset
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Using channel 0 (hash 0x8)
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Expanding short PSK #1
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Using AES128 key!
DEBUG | ??:??:?? 216 [DeviceTelemetryModule] Installing AES128 key!
I modified the source to understand the root cause.
I disabled the external notification module, so that Pin 24 is not set. Done by modifying ExternalNotificationModule.cpp:255 as follows:
moduleConfig.external_notification.enabled = false; moduleConfig.external_notification.active = false;
Result:
It still stops on log output "External Notification Module Disabled" before turning on display. Same behaviour. What is the define in variant.h to disable the display?
@mr-suw #define HAS_SCREEN 0
Thanks @markbirss. Device is now working without screen 😃. I am wondering if the SH1106 screen is really not working, because I already switched to a new one. I will try to retest the physical connections to the screen. Anything I could try in software to get the screen running?
@mr-suw
The nano-g1 includes
#define USE_SH1106
which helps for the particular I2C oled used, you could try also if you have not already
No luck with using the definitions USE_SH1106 or USE_SH1107_128_64 in variant.h of rak11310. But I did prove that the connected screen works in my current HW setup. I used the example from GyverOLED in Arduino IDE and uploaded it to RAK11300 board. After that the display initialises successfully and spins the 3D cube.
So I think this issue can remain open, because the screen is not correctly enabled for environment RAK11310 in meshtastic SW. Maybe anyone can fix it?
Re-tried with v2.2.16.1c6acfd. SH1106 1.3" 128x64 is still not working.
This issue has been mentioned on Meshtastic. There might be relevant details there:
https://meshtastic.discourse.group/t/oled-display-preventing-rak11310-rp2040-board-from-starting-up/9150/2
To add to this, from my discourse issue linked above, the same thing occurs with the 0.96" SSD1306 OLED display. It appears to be an issue specifically with the RP2040 core and an I2C display.
I tried an analysis with additional logging enabled in v2.2.21.7f7c5cb (don't have a debugger yet). Following my results:
- detects the right screen model which is 2 (SH1106) in main.cpp:479
- detects the right keyboard model which is 0 (CARDKB) in main.cpp:506
- I thought that after SPI1.begin(false) the instructions gets stuck. So I experimented with SPI settings regarding the comment from here. I replaced LORA_CS with SX126X_POWER_EN. But reverted that change because sending of LORA message does somehow work with default settings and display off. Tested it successfully with meshtastic --sendtext to another node.
- It takes minutes after message NeighborInfoModule is disabled until the message Turning on screen appears (which does not turn the physical dipslay on)
- After some minutes there is a time where the messages are send out and it gets stuck again. It repeats this behaviour and processes some instructions in a very short time (beyond RadioIf and DeviceTelementryModule informations).
Full log is attached which content represents around 10 minutes runtime and with another node online: log.txt
Maybe we have to adapt some SX1262 handling because of the updated comments from here?
Is there any progress on the screen issue ? I bought a 11300 because of not needing Bluetooth but would like to have screen and other i2c sensors (bme280, ina219) for it to be a solar sensor node outdoors. tried up to 2.2.24 but no luck yet ?
I had some free time for testing alpha firmware version 2.4.1.394e0e1. No success with display. Device is without it functional. I connected also a RAK nanoDAP v2.3 to RAK11310, but I could not get it working in VS Code. I will switch to RAK4631 from RAK11310. But I will let this issue open for anyone who wants to see the SSH1106 screen working on RAK11310.