Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Heltec Wireless Paper and Wireless Tracker support #2594

Merged
merged 12 commits into from
Jul 14, 2023

Conversation

thebentern
Copy link
Contributor

Screens still aren't working

@thebentern thebentern requested a review from markbirss July 8, 2023 14:31
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2023

🤖 Pull request artifacts

file commit
pr2594-firmware-2.1.19.c7df4fc.zip c7df4fc

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 8, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 8, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 8, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 9, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 9, 2023
@mverch67
Copy link
Collaborator

mverch67 commented Jul 11, 2023

Screens still aren't working

I think the cause may be the TFT_eSPI library. If in main.cpp I place a tft.init() above the I2C scanning the display comes to life, but LoRa init fails. If the tft.init() is placed below the I2C scanning LoRa works but not the display. Looks like an SPI issue handling both SPI devices at the same time.

update to current latest version available
@markbirss
Copy link
Contributor

markbirss commented Jul 11, 2023

Further clues as to which e-ink display is actually used might be visible on the flex cable or on the back of the display itself (will need to carefully detach is, likely stuck on with double sided scotch tape)

image

Found these links
https://resource.heltec.cn/download/e-ink/213/2.13b%26w/HTEW0213T5_V2

The DEPG0213BN is the GxEPD2_213_BN

source code ?
https://resource.heltec.cn/download/e-ink/213/%E5%B1%80%E9%83%A8%E5%88%B7%E6%96%B0%E2%80%94%E2%80%942.13%20bw

I also tried to no avail in the past ST7735/ST7789/ILI9xxx display in the past and could only get a black/grey picture even tried on nrf52 also

Is the e-ink Display a DEPG0213BN ?
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 11, 2023
@thebentern
Copy link
Contributor Author

Further clues as to which e-ink display is actually used might be visible on the flex cable or on the back of the display itself (will need to carefully detach is, likely stuck on with double sided scotch tape)

FPC-7528B on the flex cable

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 11, 2023
@markbirss
Copy link
Contributor

FPC-7528B

Ok, according to these to sources that is the GxEPD2_213_BN display (DEPG0213BN) same as RAK 2.13 b/w e-ink

https://forum.arduino.cc/t/solved-waveshare-pico-epaper-2-13-on-arduino-pro-mini-3-3v-with-gxepd2-library/1120833/4

https://www.aliexpress.com/i/1005005199511879.html

@thebentern can you share a current boot log for the wireless tracker with #define TECHO_DISPLAY_MODEL GxEPD2_213_BN ?

@mverch67
Copy link
Collaborator

mverch67 commented Jul 12, 2023

I got the tracker display working (together with LoRa) with the lovyanGFX library:

image

@markbirss
Copy link
Contributor

@mverch67

Well done

thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 12, 2023
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 13, 2023
@mverch67
Copy link
Collaborator

mverch67 commented Jul 14, 2023

I found the issue with the Heltec GPS:

PIN_GPS_RESET (GPIO35) must be set to HIGH for a functional serial communication.

Some Unicore specific adaptations may be required in GPS.cpp, see
https://en.unicorecomm.com/assets/upload/file/Unicore_FirebirdII_Protocol_Specification_EN_R1_01.pdf

The following could be used for autodetect:

$PDTINFO\r\n

FB2S UM600 G1B1L1E1 COM1
PN N/A
SN N/A
HWVer 2.0
FWVer R6.0.0.0Build1280
Copyright (c), Unicore Communications Inc.
All rights reserved.
Sensor init fail, 0x4
Odo counter init fail
    // auto-detect UC6580 (Heltec-Tracker)
    _serial_gps->write("$PDTINFO\r\n");
    delay(20);

    uint32_t startTimeout1 = millis() + 1500;
    while (millis() < startTimeout1)
    {
        if (_serial_gps->available())
        {
            String ver = _serial_gps->readStringUntil('\n');
            // check retrieved module info
            if (ver.startsWith("FB2S UM600"))
            {
                LOG_INFO("UC6850 GNSS init succeeded, using UC8650 GNSS Module\n");
                return GNSS_MODEL_UC6850;
            }
        }
    }

Debug log:

DEBUG | ??:??:?? 1 WANT GPS=1
DEBUG | ??:??:?? 1 Using GPIO33 for GPS RX
DEBUG | ??:??:?? 1 Using GPIO34 for GPS TX
INFO  | ??:??:?? 2 UC6850 GNSS init succeeded, using UC8650 GNSS Module
DEBUG | ??:??:?? 2 GxGSA NOT available
INFO  | ??:??:?? 2 External Notification Module Disabled
INFO  | ??:??:?? 2 Doing TFT init
INFO  | ??:??:?? 3 Turning on screen
DEBUG | ??:??:?? 3 Module wants a UI Frame
DEBUG | ??:??:?? 3 Module wants a UI Frame
WARN  | ??:??:?? 3 SX126xInterface(cs=8, irq=14, rst=12, busy=13)
INFO  | ??:??:?? 3 Starting meshradio init...
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=253, time 3246 ms
INFO  | ??:??:?? 3 Radio freq=869.525, config.lora.frequency_offset=0.300
INFO  | ??:??:?? 3 Set radio: region=EU_868, name=LORALF, config=0, ch=0, power=27
INFO  | ??:??:?? 3 Radio myRegion->freqStart -> myRegion->freqEnd: 869.400024 -> 869.650024 (0.250000 mhz)
INFO  | ??:??:?? 3 Radio myRegion->numChannels: 1 x 250.000kHz
INFO  | ??:??:?? 3 Radio channel_num: 1
INFO  | ??:??:?? 3 Radio frequency: 869.825012
INFO  | ??:??:?? 3 Slot time: 42 msec
INFO  | ??:??:?? 3 Set radio: final power level=22
INFO  | ??:??:?? 3 SX126x init result 0
INFO  | ??:??:?? 3 Frequency set to 869.825012
INFO  | ??:??:?? 3 Bandwidth set to 250.000000
INFO  | ??:??:?? 3 Power output set to 22
DEBUG | ??:??:?? 3 Current limit set to 140.000000
DEBUG | ??:??:?? 3 Current limit set result 0
DEBUG | ??:??:?? 3 SX126X_E22 mode enabled. Setting DIO2 as RF Switch
INFO  | ??:??:?? 3 Set Rx Boosted Gain mode; result: 0
INFO  | ??:??:?? 3 SX1262 Radio init succeeded, using SX1262 radio
INFO  | ??:??:?? 3 Not using WIFI
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=237, time 3057 ms
DEBUG | ??:??:?? 3 LoRA bitrate = 77.526985 bytes / sec
INFO  | ??:??:?? 3 PowerFSM init, USB power=1
DEBUG | ??:??:?? 3 Enter state: BOOT
[  3796][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 6 = 80 Mhz, APB: 80000000 Hz
DEBUG | ??:??:?? 3 [Power] Battery: usbPower=0, isCharging=0, batMv=0, batPct=0
DEBUG | ??:??:?? 3 [Screen] Screen: Started...
DEBUG | ??:??:?? 3 [GPS] NMEA GPS time 2023-06-26 09:58:33
DEBUG | 09:58:31 3 [GPS] Upgrading time to RTC 1687773513 secs (quality 4)
DEBUG | 09:58:33 3 [GPS] Read RTC time as 1687773513
DEBUG | 09:58:33 3 [GPS] publishing pos@0:2, hasVal=0, GPSlock=0
DEBUG | 09:58:33 3 [GPS] No GPS lock
DEBUG | 09:58:33 3 [GPS] onGPSChanged() pos@0, time=1687773513, lat=0, lon=0, alt=0
INFO  | 09:58:33 3 [GPS] updatePosition LOCAL pos@0, time=1687773513, latI=0, lonI=0, alt=0
DEBUG | 09:58:33 3 [GPS] Node status update: 1 online, 2 total

However, so far it did not get any satellites. Maybe some Unicore specific configuration is required.

@thebentern thebentern changed the title Heltec Wireless Paper and Wireless Tracker support Partial Heltec Wireless Paper and Wireless Tracker support Jul 14, 2023
@thebentern thebentern marked this pull request as ready for review July 14, 2023 21:02
@thebentern thebentern merged commit 4ace59f into master Jul 14, 2023
46 checks passed
thebentern added a commit to meshtastic/artifacts that referenced this pull request Jul 14, 2023
@thebentern thebentern deleted the wireless-tracker branch July 16, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants