May 16, 2024, 10:14:33 AM

Recent posts

#1
ESP32 / Re: ESP32-gateway...different ...
Last post by LubOlimex - Today at 08:19:45 AM
There are major changes between those two revisions.

> i installed mini lcd in both units to pin 11-12-13-14 and i connect pins 12 to 9....in revision E it's correct work, but in revision G no...

GPIO9, GPIO10, GPIO11 in revision E shouldn't be used in first place since they are connected to the internal memory. In newer revision they were completely re-routed from the headers so that you can't affect the memory. Probably one of these two major changes affect your work:

- GPIO6-11, which are used by the ESP32's internal flash, were disconnected from CON1 and the 6 SD card signals are now routed instead for use when SD card is not present;
- SD card changed from 4-bit mode of operation to 1-bit mode of operation! Added 3 NA resistor pads (R9-R11) for backwards compatibility.

You can find full revision changes and track the changes that occured from revision E to revision G here:

https://github.com/OLIMEX/ESP32-GATEWAY/blob/master/HARDWARE/README.md
#2
ESP32 / Re: ESP32-WROOM-32E-N8 - LoRa8...
Last post by LubOlimex - Today at 08:11:50 AM
Did it work? If yes, and if and when you have the time can you make a short post with description and maybe code on how you get it working. That would be helpful for a lot of people. The problem we face with the LoRa boards is that we don't have any public TTN network anymore in our town to help us test (we used to have a couple of such points, but they are no longer operational).Thank you in advance.
#3
PIC / TCP/IP Stack Lite: PINGs Quit ...
Last post by kc25chief - May 15, 2024, 07:35:27 PM
Disclaimer: I'm new to Olimex and Microchip's current line of toolset and chipsets beyond PIC12 and PIC16s using Assembler and not XC8.


I have created a short little program Targeted to the PIC-WEB PIC16F67J60 Ether PHY mirco using the TCP/IP Stack Lite using the latest most up to date everything in the toolchain and plugins to just do two things;

1. Toggle an onboard the onboard Red LED
2. simply reply to a 'PING' request via the PIC18F67J60 Ethernet PHY peripheral.

There are 2 Methods in which I 'blink' the onboard LED:
Method 1. from a RTC interrupt once a second.
Method 2. from the main() white(1) loop;.
Results:

With Method 1: when I Ping, both 'ping' replies and an LED 1-Second Toggle occurs just as expected- no problems.

With Method 2: when I place the LED toggle in the while(1) loop of the main() function; the LED toggles just fine- Very fast of course. However, the 'Ping' replies cease to occur and I get a timeout on the requester.

Can someone please give me some insight what is going on? Maybe the Network_Manage() call is getting 'starved for attention' and dropping out, but that seems crazy because the toggle should be only 1 instruction execution amount of time; in the nanoseconds range.

I have also tried a 'dummy function' for the led blink which is a simple delay bypassing the physical toggle of LED also achieving 'Request timed out.'.  I find this baffling and also lowering my confidence with the whole out-of-the-box solution.

Thanks in advance for any insights you may have,
KC Chief
#4
ESP32 / ESP32-gateway...different revi...
Last post by luca1978 - May 15, 2024, 02:50:49 PM
i have 3 unit:

-1 unit....esp32-gateway revision E (works correctly)
-2 units...esp32-gateway revision G (not works)

i installed mini lcd in both units to pin 11-12-13-14 and i connect pins 12 to 9....in revision E it's correct work, but in revision G no...

can you help me?

best regrads
Luca
#5
ESP32 / Re: ESP32-WROOM-32E-N8 - LoRa8...
Last post by Steff - May 15, 2024, 02:34:24 PM
Thank you so much LubOlimex. You are a hero.

Sorry for not reading all the details in your first post.
#6
UEXT / Re: Changing I2C address of MO...
Last post by ilario - May 15, 2024, 11:55:06 AM
QuoteYou need to power down the board, close jumper PROG, power up the board then issue the change address command, then power down the board, then open the jumper PROG and finally power and check new address.

Thanks for the clear instructions!

QuoteAre you sure it is on I2C port 1? It can be I2C 0 or 2?

Yes, using i2cset I can open and close the relay using port 1 (which is UEXT).

Interestingly, I can open and close the relay regardless if the PROG was closed or not (changing the state of PROG jumper, then powering up the MOD-IO2 and then running the i2cset command).

I replicated all of this on two MOD-IO2 boards.

QuoteSure you can try modio2tool, there is explanation on how to compile and use:
https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/UEXT%20MODULES/MOD-IO2/linux-access-tool

Ok!
I tried to use the precompiled one and it gave an unexpected error:

# chmod a+x ./modio2tool
# ./modio2tool
bash: ./modio2tool: No such file or directory

but then I realized that it was because it was the 32 bit executable and I am on A64-Olinuxino so it is a aarch64 platform so I compiled it with "make" and now it works :)

Before trying with modio2tool, I checked its source, and noticed that it was using an undocumented 0xF0 data address, and that this address was used also in the firmware in the OLIMEX.h file:
#define SET_ADDRESS    0xF0
So I tried to add the data address 0xF0 to the i2cset command, and it worked :D

unplug power
close PROG jumper
plug power
i2cset 1 0x21 0xF0 0x22
unplug power
open PROG jumper
plug power
and now the MOD-IO2 has address 0x22

I double checked that if the PROG jumper is open it does not work, and it does not, as expected.

So I would suggest the following changes in the documentation:

In MOD-IO2 user manual revision E:

page 13, section 2.4.2 replace

i2cset 2 0x21 0xHH
with

i2cset 2 0x21 0xF0 0xHH
page 19, section 5.6.1 remove the whole section. From my tests it does not look like the PROG jumper has that described function.

In the readme of the firmware version 4.3:

page 11, section 4.10 correct as above including 0xF0.

Thanks!



#7
ESP32 / Re: ESP32-WROOM-32E-N8 - LoRa8...
Last post by LubOlimex - May 15, 2024, 10:53:01 AM
If you are using Olimex LoRa868 - you need to check your software for the state of PA_BOOST. Did you disable PA_BOOST mode in the library? Again check here:

https://forum.mcci.io/t/olimex-mod-lora868/264/2
#8
UEXT / Re: Changing I2C address of MO...
Last post by LubOlimex - May 15, 2024, 08:21:05 AM
You need to power down the board, close jumper PROG, power up the board then issue the change address command, then power down the board, then open the jumper PROG and finally power and check new address. Are you sure it is on I2C port 1? It can be I2C 0 or 2?

Sure you can try modio2tool, there is explanation on how to compile and use:

https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/UEXT%20MODULES/MOD-IO2/linux-access-tool
#9
ESP32 / Re: ESP32-WROOM-32E-N8 - LoRa8...
Last post by Steff - May 14, 2024, 08:52:58 PM
OK that's great. After taking it all apart and rebuilding the whole setup, i now can read the registers with this
https://github.com/StuartsProjects/SX12XX-LoRa/tree/master/examples/SX127x_examples/Basics/2_Register_Test

And the MCCI LMIC 4.1.1  does not crash on the ESP32 ;D

But I do not see a Join-Request. Not on Thingpark, not on TTN.
The APPEUI, DEVEUI and APPKEY are correct. I've tested this with a LilyGo Lora32 1.6. This works.

The MCCI debug output is this
RXMODE_RSSI
691735: EV_JOINING
691741: engineUpdate, opmode=0x4
802330: engineUpdate, opmode=0x4
802349: EV_TXSTART
802429: TXMODE, freq=868500000, len=23, SF=7, BW=125, CR=4/5, IH=0
1118044: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 4
1118678: RXMODE_SINGLE, freq=868500000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 1119204 rxtime: 1118669 entry-rxtime: 535 now-entry: 5 rxtime-txend: 312375
1180544: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 5
1181178: RXMODE_SINGLE, freq=869525000, SF=12, BW=125, CR=4/5, IH=0
rxtimeout: entry: 1195530 rxtime: 1181169 entry-rxtime: 14361 now-entry: 5 rxtime-txend: 374875
1195559: processRx2Jacc txrxFlags 0x2 --> 00
1196212: EV_JOIN_TXCOMPLETE: no JoinAccept

So if some one has an idea, please let me know. If i should open a new thread, let me know.

I've spent so many hours on this, i'm probably overlooking a detail.
#10
UEXT / Changing I2C address of MOD-IO...
Last post by ilario - May 14, 2024, 07:12:59 PM
Dear all,
I recently (approx 6 months ago) bought a few MOD-IO2.
Using only one, I can use the relay just fine :)
But I did not manage to change their I2C address so that I can use more than one.

Currently I have 4 of them connected in a line to a A64-OLinuXino-2Ge8G-IND.

Reading the documentation, seems that closing the PROG jumper has two functions:
  • from user's manual revision E section 5.6.1 "When closed this jumper allows addressing a single MOD-IO2 (the one with the closed jumper) over all others stacked to it – since initially all connected MOD-IO2 boards have the same address."
  • from user's manual revision E section 2.4.2 "Changing I2C device address [...] i2cset 2 0x21 0xHH [...] Note that PROG jumper must be closed to be able to change the address."

But for me it had neither of the two functions (or maybe I misunderstood).
Most importantly, I could not change the I2C address using the i2cset 1 0x21 0x22 command (I tried booting the MOD-IO2 with the jumper set, setting it afterwards and then launching the command, power cycling the MOD-IO2, and it is still at 0x21 regardless of what I do).

In the manual I saw that the address can also be changed with modio2tool, should I use that instead?

Thanks!