NuttX on ESP32 TTGO LoRa

394 views
Skip to first unread message

Alex Lennon

unread,
Aug 1, 2018, 2:19:43 PM8/1/18
to NuttX
Hi,

I'm following Alan's instructions to build an image for my ESP32 TTGO LoRa part

ref: https://acassis.wordpress.com/2018/01/04/running-nuttx-on-esp32-board/

ref: https://primalcortex.wordpress.com/2017/11/24/the-esp32-oled-lora-ttgo-lora32-board-and-connecting-it-to-ttn/

I have the bootloader, partitition binary, nuttx.bin built and it programs OK but when I reset the board I just get a load of crap out of the serial comms. over minicom. (defaulting to 115200, 8, n, 1 but I tried a range of other baud rates).

Then I dropped back to doing a "make flash" on the esp-idf "hello world" code that was used to build the bootloader and partition binary.

That programs OK to but I still get nonsense bytes out of the serial comms.

I the console output pins on the pinout above look sensible.

I'm wondering if it is something else like a crystal difference?

Has anybody had these problems?

Thanks!

Alex

Alex Lennon

unread,
Aug 1, 2018, 2:43:52 PM8/1/18
to NuttX

OK I figured it out I think. There's an XTAL definition which is defaulted to 40MHz nowadays and for my board it needs to be 26MHz. With this changed in esp-idf sdkconfig I see the correct Hello World text.

...

A bit more feedback which might help. Alan's walkthough was very useful. I'm on a virgin Ubuntu 18.04 VM and had to install various dependencies.

Then I had to grab kconfig-frontends which I see referenced as needed around and about.

It doesn't compile with my Ubuntu 18.04 and I had to comment out a static definition kconf_id_lookup() in libs/parser/hconf.gperf to get things going (with sudo ldconfig).

Going to try to get the NutXX image up and running now...

Cheers,

Alex


patacongo

unread,
Aug 1, 2018, 2:45:55 PM8/1/18
to NuttX

:

OK I figured it out I think. There's an XTAL definition which is defaulted to 40MHz nowadays and for my board it needs to be 26MHz. With this changed in esp-idf sdkconfig I see the correct Hello World text.

I am glad you figured that out.  I don't think anyone could have helped you that one.
Message has been deleted

Alex Lennon

unread,
Aug 1, 2018, 3:00:45 PM8/1/18
to NuttX
So I've got an NSH shell now :) 


     


I want to try to get this going as far as a possible as a working platform as it's a lovely little LoRa + OLED + LiPo charger board at only £12 or so.

OLED, WiFi, BLE, TLS, MQtt, low power, LoRa, uPython would be perfect so if anybody can advise on what's likely to be the low hanging fruit and what's likely to be painful I'd be grateful.

I saw Alan's post on support for LittleVGL yesterday so maybe I can get this going on the SSD1306 first ?


Cheers!

Alex

Alan Carvalho de Assis

unread,
Aug 1, 2018, 3:45:03 PM8/1/18
to nu...@googlegroups.com
Hi Alex,

Nice work! Kudos!!!

The ESP32 port needs the agnostic WiFi lib to be integrated on NuttX.
We could work together to get it done!

BR,

Alan

On 8/1/18, Alex Lennon <ajle...@gmail.com> wrote:
> So I've got an NSH shell now :)
>
>
> <https://lh3.googleusercontent.com/-4ixbwhF57mc/W2IDPNRxVnI/AAAAAAAAL2c/GTvWYgWHw8QERQihpvFcFaNEnv3YqiqlwCLcBGAs/s1600/ttgo.jpg>
>
>
> <https://lh3.googleusercontent.com/-5SMgwV4YlUg/W2IDRR5DI4I/AAAAAAAAL2g/1yeT3BZSo000Dt-rnfnpTlFR7JCcPdrAgCLcBGAs/s1600/VirtualBox_Ubuntu%2B18.04_01_08_2018_19_49_35.png>
> --
> You received this message because you are subscribed to the Google Groups
> "NuttX" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nuttx+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Alex Lennon

unread,
Aug 1, 2018, 3:48:14 PM8/1/18
to NuttX
Thanks Alan! Yeah let's do that then :)

atm I'm back tracking what I need to do to get the OLED going too... Looks like I have similar drivers for SSD over I2C available.

I added the i2c tool command to the nsh. Looks like I need some kind of driver implementation for the ESP32 for I2C and then to register that as bus 0 for starters?

Cheers,

Alex

Alan Carvalho de Assis

unread,
Aug 1, 2018, 4:04:04 PM8/1/18
to nu...@googlegroups.com
Hi Alex,

Yes, the ESP32 port is very basic! We need to add support to its
peripherals as well.

BR,

Alan

On 8/1/18, Alex Lennon <ajle...@gmail.com> wrote:
> Thanks Alan! Yeah let's do that then :)
>
> atm I'm back tracking what I need to do to get the OLED going too... Looks
> like I have similar drivers for SSD over I2C available.
>
> I added the i2c tool command to the nsh. Looks like I need some kind of
> driver implementation for the ESP32 for I2C and then to register that as
> bus 0 for starters?
>
> Cheers,
>
> Alex
>
> On Wednesday, 1 August 2018 20:45:03 UTC+1, Alan Carvalho de Assis wrote:
>>
>> Hi Alex,
>>
>> Nice work! Kudos!!!
>>
>> The ESP32 port needs the agnostic WiFi lib to be integrated on NuttX.
>> We could work together to get it done!
>>
>> BR,
>>
>> Alan
>>
>> On 8/1/18, Alex Lennon <ajle...@gmail.com <javascript:>> wrote:
>> > So I've got an NSH shell now :)
>> >
>> >
>> > <
>> https://lh3.googleusercontent.com/-4ixbwhF57mc/W2IDPNRxVnI/AAAAAAAAL2c/GTvWYgWHw8QERQihpvFcFaNEnv3YqiqlwCLcBGAs/s1600/ttgo.jpg>
>>
>>
>> >
>> >
>> > <
>> https://lh3.googleusercontent.com/-5SMgwV4YlUg/W2IDRR5DI4I/AAAAAAAAL2g/1yeT3BZSo000Dt-rnfnpTlFR7JCcPdrAgCLcBGAs/s1600/VirtualBox_Ubuntu%2B18.04_01_08_2018_19_49_35.png>
>>
>>
>> >
>> >
>> > I want to try to get this going as far as a possible as a working
>> platform
>> > as it's a lovely little LoRa + OLED + LiPo charger board at only £12 or
>> >
>> so.
>> >
>> > OLED, WiFi, BLE, TLS, MQtt, low power, LoRa, uPython would be perfect so
>> >
>> if
>> >
>> > anybody can advise on what's likely to be the low hanging fruit and
>> what's
>> > likely to be painful I'd be grateful.
>> >
>> > I saw Alan's post on support for LittleVGL yesterday so maybe I can get
>> >
>> > this going on the SSD1306 first ?
>> >
>> > ref: https://littlevgl.com/
>> >
>> > Cheers!
>> >
>> > Alex
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "NuttX" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to nuttx+un...@googlegroups.com <javascript:>.

patacongo

unread,
Aug 1, 2018, 4:39:26 PM8/1/18
to NuttX



OK I figured it out I think. There's an XTAL definition which is defaulted to 40MHz nowadays and for my board it needs to be 26MHz. With this changed in esp-idf sdkconfig I see the correct Hello World text.

Are you using a  an official Expressif ESP32 Core board, or some other board.  The Core board v2 (labeled (ESP32_Core_board_v2) did have a 40MHz crystal.

So either you are using some different ESP32 board, or they have changed the crystal.  In the latter case, there should be some note added to the README and perhaps a configuration option added.

People often take a configuration designed for one board and try to use it on another, sometimes with success and sometimes not.  If used on a different board, it requires a little engineering effort to adjust the board for pinouts, LEDs, switches, crystals, etc.

And often manufacturers release different versions of the boards that have slightly different characteristics.

Which is the case here?

I don't even think that the Expressif Core v2 board is even available anymore(?) .  The current seems to be v4: http://esp-idf.readthedocs.io/en/latest/hw-reference/modules-and-boards.html#esp32-devkitc-v4 .And there if refers to the v2 board as "previous" board at this link:  http://esp-idf.readthedocs.io/en/latest/hw-reference/modules-and-boards.html#esp32-devkitc-v4


patacongo

unread,
Aug 1, 2018, 5:20:00 PM8/1/18
to NuttX


Are you using a  an official Expressif ESP32 Core board, or some other board.  The Core board v2 (labeled (ESP32_Core_board_v2) did have a 40MHz crystal.

Nevermind... I am confused.  it has been a long time.  I forgot that the 26MHz cystal was a configuration option.  So this has already been handled.

Alex Lennon

unread,
Aug 2, 2018, 4:21:37 AM8/2/18
to nu...@googlegroups.com



On 01/08/2018 21:39, patacongo wrote:



OK I figured it out I think. There's an XTAL definition which is defaulted to 40MHz nowadays and for my board it needs to be 26MHz. With this changed in esp-idf sdkconfig I see the correct Hello World text.

Are you using a  an official Expressif ESP32 Core board, or some other board.  The Core board v2 (labeled (ESP32_Core_board_v2) did have a 40MHz crystal.



Alex Lennon

unread,
Aug 2, 2018, 4:22:05 AM8/2/18
to nu...@googlegroups.com


On 01/08/2018 21:04, Alan Carvalho de Assis wrote:
> Hi Alex,
>
> Yes, the ESP32 port is very basic! We need to add support to its
> peripherals as well.
>
>

Any thoughts on where we start with WiFI Alan?

Cheers,

Alex

Alan Carvalho de Assis

unread,
Aug 2, 2018, 5:10:07 AM8/2/18
to nu...@googlegroups.com
Hi Alex,

Espressif released the agnotic WiFi driver some time ago. The first step is looking the code and deciding the right way to integrate it on NuttX.

BR,

Alan
--
You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages