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

TTGO T-Beam Rev 1 is not supported #19

Open
EccoB opened this issue Dec 15, 2019 · 11 comments
Open

TTGO T-Beam Rev 1 is not supported #19

EccoB opened this issue Dec 15, 2019 · 11 comments

Comments

@EccoB
Copy link

@EccoB EccoB commented Dec 15, 2019

There is a new board version TTGo T-Beam V1.0 which is not supported by this repository because:

  • GPS Pins changed
  • A Programmable power supply was added (AXP192) which has to be told to turn on the GPS/LoRa module.

There is a repository from kizniche that adopted to that:
https://github.com/kizniche/ttgo-tbeam-ttn-tracker

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Dec 16, 2019

I tried to compile the kizniche approach and it needs different verisons of already installed libraries. Arduino picks the "other"ones.

Does not compile, probably my error? :

/Users/geertvansintjan/Documents/Arduino/ttgo-tbeam-ttn-tracker-master/main/ttn.ino: In function 'bool ttn_setup()':
ttn:140:57: error: 'os_init_ex' was not declared in this scope
return ( 1 == os_init_ex( (const void *) &lmic_pins ) );
^
/Users/geertvansintjan/Documents/Arduino/ttgo-tbeam-ttn-tracker-master/main/ttn.ino: In function 'void ttn_cnt(unsigned char)':
ttn:236:24: error: 'LMIC_setSeqnoUp' was not declared in this scope
LMIC_setSeqnoUp(num);
^
Multiple libraries were found for "lmic.h"
Used: /Users/geertvansintjan/Documents/Arduino/libraries/IBM_LMIC_framework
Not used: /Users/geertvansintjan/Documents/Arduino/libraries/arduino-lmic-master
Not used: /Users/geertvansintjan/Documents/Arduino/libraries/MCCI_LoRaWAN_LMIC_library
Multiple libraries were found for "TinyGPS++.h"
Used: /Users/geertvansintjan/Documents/Arduino/libraries/TinyGPSPlus-1.0.2b
Not used: /Users/geertvansintjan/Documents/Arduino/libraries/TinyGPSPlus-master
Multiple libraries were found for "Wire.h"
Used: /Users/geertvansintjan/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/Wire
Multiple libraries were found for "SSD1306Wire.h"
Used: /Users/geertvansintjan/Documents/Arduino/libraries/esp8266-oled-ssd1306-master
Not used: /Users/geertvansintjan/Documents/Arduino/libraries/ESP32_LoRaWAN-master
Multiple libraries were found for "SPI.h"
Used: /Users/geertvansintjan/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/SPI
exit status 1
'os_init_ex' was not declared in this scope

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Dec 16, 2019

Indeed, the rev 1 gives with the other code a consistent "no gps fix"

Perhaps I better just define other pins for the gps?

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Dec 16, 2019

so this would mean in gps.h
ttgobeam version 0.7 has GPS on 12 and 15, replace for ttgobeam 1.0 with 34 and 12

I note rx and tx are mixed up with both programs

@DeuxVis

This comment has been minimized.

Copy link
Owner

@DeuxVis DeuxVis commented Dec 16, 2019

As it happens I have recently ordered one of those recent T-Beam version, so I should be soon(1) able to make my code compatible with it.

(1) for a certain definition of "soon" which remains to be determined. ^_^

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Dec 16, 2019

Short update : I have apparently the same 1.0 t-beam, I tried for a while with "true" instead of false when checking the GPS, so I could see code going through to lorawan ttn. I noticed indeed "no gps fix" continuity, also with the fix I mentioned above.

Next step: off line for 10 days.

Geert

@noppingen

This comment has been minimized.

Copy link

@noppingen noppingen commented Jan 28, 2020

Quick fix for v1.0 (v10) board:

In gps.h change the GPIOs for GPS to the changed ones, 12 & 34:

#define GPS_TX 34
#define GPS_RX 12

In the main .ino file add support for the AXP20X power controller to switch on the voltages: After

#include <esp_sleep.h>

add

#include "axp20x.h"
AXP20X_Class axp;

and initialise / switch on the power controller in setup() right after

Serial.println(F("TTN Mapper"));

by adding:

/* Start power controller */
Wire.begin(21, 22);
Serial.println("Starting AXP192 power controller");
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {
  Serial.println("AXP192 started");
} else {
  Serial.println("AXP192 failed");
}
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);  // Lora on T-Beam V1.0
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);  // Gps on T-Beam V1.0
axp.setPowerOutPut(AXP192_DCDC2, AXP202_ON); 
axp.setPowerOutPut(AXP192_EXTEN, AXP202_ON);
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON); // OLED on T-Beam v1.0
axp.setDCDC1Voltage(3300);
axp.setChgLEDMode(AXP20X_LED_BLINK_1HZ);
axp.adc1Enable(AXP202_BATT_CUR_ADC1, 1);
@DeuxVis DeuxVis mentioned this issue Feb 5, 2020
@DeuxVis

This comment has been minimized.

Copy link
Owner

@DeuxVis DeuxVis commented Feb 5, 2020

Thanks for reporting that will save me some time.

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Feb 5, 2020

@DeuxVis

This comment has been minimized.

Copy link
Owner

@DeuxVis DeuxVis commented Feb 5, 2020

@geert2 it looks like you forgot to add

#include "axp20x.h"
AXP20X_Class axp;

maybe ?

@noppingen

This comment has been minimized.

Copy link

@noppingen noppingen commented Feb 6, 2020

Posted my updated project on Github:

https://github.com/noppingen/Lora-TTNMapper-T-Beam-v10/

Recycle, reuse, re-fork but triple-check: My code usually is usually not good for running a heart-lung machine...

@geert2

This comment has been minimized.

Copy link

@geert2 geert2 commented Feb 16, 2020

It works. There must have been something I did not notice, but it worked all along.

Any hint how to bring my GPS coordinates to my mobile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.