robert-hh / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
6 stars 3 forks source link

TTGOv2.1.6 changes, finally! #1

Closed elloza closed 3 years ago

elloza commented 3 years ago

Finally with this changes I made it work! Thank you very much @robert-hh !! Let me buy you a beer for your patience!

I made the changes that you indicated :

drivers/sx127x/sx1276/sx1276.c  No change required
drivers/sx127x/sx1276/sx1276.h  No change required
esp32/main.c                    ! Change gpio numbers 14->23, 35->33, 34->32
esp32/tools/makepkg.sh          No change required
esp32/tools/size_check.sh       No change required
esp32/boards/make-pins.py       !Change GPIO number 14 -> 23
esp32/lora/sx1276-board.h       Line 25 sets the Clock. 0x09 = Crystal, 0x19 = TCXO to be tested (Crystal is the right one)
esp32/lora/board.c              No change required
esp32/lora/spi-board.c          No change required
esp32/lora/sx1272-board.c       No change required
esp32/lora/board.h              No change required
esp32/lora/pinName-board.h      ! Change gpio numbers 14->23, 35->33, 34->32
esp32/lora/sx1276-board.c       No change required
esp32/lora/gpio-board.c         ! Change gpio numbers 14->23, 35->33, 34->32
esp32/mods/machpin.c            No change required
lib/lora/system/spi.h           No change required

esp32/application.mk No change required

Finally the error were in the python side....I have had modified the python test code in order to check what was happening and I have changed something...(dammit!) I have tried with the simple ABP example from Pycom and it works. Then I tried with your original example an it is working (uplink and downlink):

Device was joined (again)
Message:
Sending: b'PKT #000 ++++++++++'
Received: b'\xaa\xaa\xaa', on port: 1
(rx_timestamp=422816209, rssi=-122, snr=-11.0, sfrx=4, sftx=4, tx_trials=3, tx_power=14, tx_time_on_air=134, tx_counter=0, tx_frequency=868500000)

I will do more testing, thank you for the support and for the patience!

robert-hh commented 3 years ago

That's excellent, and thank you for testing and the PR.

robert-hh commented 3 years ago

I changed the name of the board from "HELTEC" to "TTGO". So you can use:

make BOARD=TTGO FLASH_SIZE=4MB ....