Thanks for the help, it seems to be working, but i can not decode the data from the GPS, i guess it is a problem in the Garmin Geko or my RS232-TTL Max3232 Board is defect. I have ordered a GY-GPS6MV2 for checking.
Iām using this charger, which automatically cuts off the power when the voltage gets too low.
I have built a ESP32 board and in deep sleep mode the current is 7uA.
However it appears that not all the GPIO pins maintain their set state in deep sleep making it rather difficult to put the LoRa device into low current mode.
Is there a way to have (all) the GPIO pins maintain their set state in deep sleep ?
could you tell us, what board you used and what configuration gets you 7uA
thanks
My own design board, ESP32 WROOM module and a HT7333 regulator.
If anyone needs a copy of ESP-1ch-Gateway-v5.0 by kersing that compiles with PlatformIO and runs on lora32 v2 (as tested) Iāve just completed modifying the existing code (it was a helluva CHALLENGE, as they sayā¦):
If someone knows a brief list of updates that have been implemented in the things4uās version that are missing from kersingās code please advise and Iāll see that it gets implemented here as well.
Iāve also modified and compiled TTN TTGO LoRa32 BLE BRIDGE and that works too but the thing is it only ever sends one message. Anyone have any clues?
Where was the challenge?
What is different from kersingās code in your code, what changes did you make?
Code written in arduino ide doesnāt really want to compile in platformio since the way arduino ide concatenates and compiles code, so pretty much anything is possible with arduino ide, whereas platformio is more strict at adhering to standards. What I did was chop it up somewhat and re-arrange some definitions into header files (there were loads of global variables around) - this alone took me a whole day(!). I am thinking the code needs to be restructured a little, at least to try and get rid of all the globals if nothing else; make it more functional. Anyways, github repository is there for you to have a look at. I hope someone finds use for it.
That is not my experience. I usually have no problems with compiling and uploading Arduino code with PlatformIO. But it helps if the board, framework (Arduino) and platform (ESP32) are supported which is the case for TTGO v2 (just select Heltec Wifi LoRa 32 as board for the TTGO v2 (or maybe even a TTGO v2 board definition has already been added).
PlatformIO is even more flexible than Arduino IDE as it allows separate libraries per project to be installed (and automatically).
I often drop existing Arduino sketches into the src directory of a freshly created PlatformIO project, remove the default main.c, add library dependencies (names) to platformio.ini and it is good to go. Referenced libraries are automatically downloaded as soon as platformio.ini is saved.
I tried kersingās version before and did have issues with it (but have not used it since). The issues occurred both in the Arduino IDE an PlatformIO. I doubt they were PlatformIO related.
Update:
@pele You are correct. I had forgotten what the ESP-sc-gway sources actually looked like.
A simple example would be to try to use a āglobalā variable defined somewhere at the beginning of ESP-sc-gway like, for example, MAC_array, anywhere inside txRx or wwwServer and see compilation fail miserably. Why you ask? Because it hasnāt been defined as such as per C (or C++) way of doing things. It should be declared extern by all āmodulesā that wish to use it and then properly initialised by the actual āmoduleā that āownsā it (i.e. ESP-sc-gway in this case). And many more examples like this. Same applies to functions. Within arduino ide you define your global variable at the beginning (or pretty much anywhere outside of a function) of your main .ino and it magically works pretty much anywhere youād care to use it.
As much as arduino ide may be good for beginners it is also very bad for them for the many reasons discussed elsewhere on the www (simply put it teaches wrong coding practices to kids). Take String for example. Slow death by heap (asphyxiation or poisoning, take your pick). Recently having written 2MB worth of multi-threaded firmware with i2c, spi, ble and tcp/ip (all at the same time) for esp32, my experience tells me a different story to yours.
I just made the minimal changes required to allow building for the esp32 controller. Please feed any improvements back to the original author. (Btw, that would easier if you cloned the repo and committed updates in stead of starting a new repository. Now you canāt create a pull request)
Yes you are correct on the globals. I did not interpret it as that at first.
The libraries get compiled separately and wonāt see the globals of your main source file, if Iām not mistaking.
Actually I tried to send them back to you but I couldnāt find a way of contacting you. Anyway, this builds just fine on esp32.
??? Private message on this forum? It is not like I am hidingā¦ However, please contact the original author.
As mentioned, I just did a quick hack to enable basic functionality on the cheap ESP32 modules to allow (our local) community members to quickly setup a single channel gateway. I am not a fan of single channel gateways (to put it mildly) but do appreciate not everyone has a couple of hundred euros to spend on a full gateway (and a lot of people live outside current TTN coverage)
If everyone agrees your project fulfills their needs (and that probably means it should be buildable in the Arduino IDE as well because PlatformIO is a step too far for a lot of people) I will remove my repository.
I can reply to this question myself.
When you put the ESP32 into deep sleep the GPIO pins go into high impedance mode, which is not good for devices on the SPI bus, such as LoRa.
With the SPI bus high Z the LoRa device (also in sleep mode) takes the sleep current up to 120uA, not good.
If you add pullup resistors on the 3 SPI pins and the LoRa device select pin, sleep current of an ESP32 and LoRa device is 7uA.
Also note that although you should be able to leave the LoRa NRESET pin floating (it has its own internal pullup) if your driving it with the ESP32 then add an external pullup resistor, the ESP32 in deep sleep drags this pin low.
All,
New to LoRa here, but excited. Iām working with some TTGO ESP32 V1 boards and confirm that theyāll talk to one another, and since Iām not near a gateway, I would like to stand up a single-channel for my own use while I test.
Iāve been battling kersingās single-channel fork of the ESP8266 code and have something I havenāt found in the monolithic threads yet!
I can build it, debug/serial shows that the gateway joins wifi, and starts WWW on 80. I can ping the address but I cannot get any response on port 80ā¦ so web services arenāt actually running, but I canāt quite see why they arenāt.
Has anyone else seen this and can toss me a breadcrumb?
Thanks,
J
I am looking for the same things. Currently i am experimenting with the following firmware: https://github.com/whitecatboard/Lua-RTOS-ESP32
Looks promising. I have not tried to run one TTGO board as gateway but I am able to communicate with my TTN gateway
best regards from Austria
Hey byteā¦
That does look interesting; what are you using for a gateway? Fortunately for playing with node-code, I have a borrowed multitech conduit, but, I wonāt have it for long. Iām also the only LoRa gateway in my area so having a test-setup when Iām at home is useful.
Iāll spend a bit more time today banging on the SC gateway, I need to toss some debug into the webserver bits and see if I can figure out where itās going sideways.
J