February 07, 2025, 12:38:14 PM

Recent posts

#1
A20 / Re: update to Debian 12 (Bookw...
Last post by mbosschaert - February 06, 2025, 11:35:53 AM
For what it's worth it, I'm now running Bookworm from generic debian on Lime2 for over a year and it's rock stable. May not support all olimex nitty gritties on the board but it works for me running a fileserver (1T SSD) on one server, one server with BackupPC and one with Homeassistant.
#2
A13 / Re: enable internal Pullup in ...
Last post by LubOlimex - February 06, 2025, 09:12:01 AM
If you need them for I2C - internal pull up are too weak. Like 30k. Just add external.

Maybe first test via the sysfs before doing it in the DTS, refer to this python package that had internal pull up control:

https://pypi.org/project/pyA13/
#3
A13 / enable internal Pullup in sun5...
Last post by michal.bury - February 05, 2025, 05:17:33 PM
Dear olimex,

I need to enable internal pullups of A13 on pins

pin 49 (PB17): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB17
pin 50 (PB18): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB18

I want to do this with dts, any help is appreciated.

What shloud be added to sun5i-a13-i2c2.dts to achieve the task.



thank you
#4
STMP1 / Re: STM32MP1 OLinuXino-LIME U-...
Last post by LubOlimex - February 05, 2025, 08:28:07 AM
Did you find this forum thread: https://www.olimex.com/forum/index.php?topic=9356.0

I have published STM32MP OLinuXino image without AXP initialization here, try with it see if boots now: https://ftp.olimex.com/TEMP/LIME2-NO-AXP209/STM32MP1-OLinuXino-LIME-bullseye-minimal-20240604-101950.img.7z
#5
STMP1 / Re: STM32MP1 OLinuXino-LIME U-...
Last post by LubOlimex - February 04, 2025, 04:54:32 PM
What hardware revision is your board?
#6
PIC / Re: PIC32 boards to be produce...
Last post by LubOlimex - February 04, 2025, 11:55:34 AM
It is 0.1" spaced. If jumper wire fits in it is 0.1".

But we also sell 0.05" connectors, like here (these are usually used in our Linux boards):

https://www.olimex.com/Products/Components/Connectors/MALE-PAV16X-2x05/
#7
ESP32 / Re: Confused: Usable pins on E...
Last post by ethanjrt - February 03, 2025, 06:23:36 PM
Thank you for the thorough answer and the link to the very helpful ESP32 doc!
Best,
Ethan
#8
STMP1 / Re: STM32MP1 OLinuXino-LIME U-...
Last post by ninevoltz - February 03, 2025, 05:49:06 PM
I think I figured out the problem. I don't have a battery connected to the board, so the PMIC doesn't power on and doesn't respond on the I2C bus. I see a call to 0x34 with no ACK. If I jumper VBAT to the 5 volt input, it powers on every time. I soldered a 10 ohm resistor from +5VEXT to VBAT and it boots up reliably every time now.

Do you have a better recommendation to bypass the battery? I can't decipher the AXP209 datasheet well enough to determine where the PMIC gets its core logic voltage supply from.
#9
ESP32 / ESP32-GATEWAY-EA-IND rev. G ->...
Last post by staley - February 03, 2025, 05:48:13 PM
Hi.

I want to send data from the Olimex gateway board using ethernet (TCP/IP), using a simple TCP server on the PC (I am using Hercules...).

However, I am currently unable to make it work.

This is the current code (chat gpt):

#include <ETH.h>
#include <WiFi.h>

// --- Network Configuration ---
// Set a static IP for the ESP32 Ethernet interface.
IPAddress local_IP(192, 168, 1, 200);  // ESP32's IP
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress primaryDNS(8, 8, 8, 8);      // Optional
IPAddress secondaryDNS(8, 8, 4, 4);    // Optional

// Set the TCP server (Hercules) IP and port.
IPAddress serverIP(192, 168, 1, 150);  // Change to your PC's IP
const uint16_t serverPort = 23;        // The port on which Hercules listens

// Global flag to track Ethernet status
bool ethConnected = false;
// TCP client object
WiFiClient client;

//
// Ethernet event handler callback.
//
void WiFiEvent(WiFiEvent_t event) {
  switch (event) {
    case ARDUINO_EVENT_ETH_START:
      Serial.println("[ETH] Ethernet Started");
      ETH.setHostname("esp32-client");
      break;

    case ARDUINO_EVENT_ETH_CONNECTED:
      Serial.println("[ETH] Ethernet Link Up");
      break;

    case ARDUINO_EVENT_ETH_GOT_IP:
      Serial.println("[ETH] Ethernet got IP");
      Serial.print("   - MAC: ");
      Serial.println(ETH.macAddress());
      Serial.print("   - IPv4: ");
      Serial.println(ETH.localIP());
      ethConnected = true;
      break;

    case ARDUINO_EVENT_ETH_DISCONNECTED:
      Serial.println("[ETH] Ethernet Link Down");
      ethConnected = false;
      break;

    case ARDUINO_EVENT_ETH_STOP:
      Serial.println("[ETH] Ethernet Stopped");
      ethConnected = false;
      break;

    default:
      break;
  }
}

//
// Setup function: initialize serial, Ethernet, and register event handler.
//
void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("ESP32 Ethernet TCP Client Example");

  // Disable Wi-Fi since we are using Ethernet only.
  WiFi.mode(WIFI_MODE_NULL);
  // Register Ethernet event handler.
  WiFi.onEvent(WiFiEvent);

  // Optionally, configure static IP settings before starting Ethernet.
  ETH.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS);

  // IMPORTANT: Adjust the following parameters to match your board's PHY and pin configuration.
  // Function signature: ETH.begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, int power, eth_clock_mode_t clk_mode);
  ETH.begin(ETH_PHY_LAN8720,   // PHY type: adjust if you have a different PHY (e.g., ETH_PHY_LAN8710)
            0,                // PHY address (commonly 0 or 1)
            23,               // MDC pin
            18,               // MDIO pin
            5,               // Power pin (-1 if not used or permanently powered) 12
            ETH_CLOCK_GPIO17_OUT); // Clock mode: adjust as needed

  Serial.println("Waiting for Ethernet to obtain IP...");
}

//
// Loop function: once Ethernet is up, attempt to connect to the TCP server and exchange data.
//
void loop() {
  if (ethConnected) {
    // If not already connected to the server, try to connect.
    if (!client.connected()) {
      Serial.println("Attempting to connect to TCP server...");
      if (client.connect(serverIP, serverPort)) {
        Serial.println("Connected to TCP server!");
        // Send an initial greeting message.
        client.println("Hello from ESP32 TCP Client!");
      } else {
        Serial.println("Connection to server failed. Will retry...");
        delay(3000); // Wait before retrying
        return;
      }
    } else {
      // If connected, send periodic messages.
      static unsigned long lastSendTime = 0;
      if (millis() - lastSendTime > 5000) {  // every 5 seconds
        client.println("Ping from ESP32 client");
        Serial.println("Message sent to server.");
        lastSendTime = millis();
      }

      // Check for and print any response from the server.
      while (client.available()) {
        String response = client.readStringUntil('\n');
        response.trim();
        Serial.print("Server response: ");
        Serial.println(response);
      }
    }
  }
  delay(100);
}
#10
PIC / Re: PIC32 boards to be produce...
Last post by kyrk.5 - February 03, 2025, 04:02:43 PM
Quote from: LubOlimex on February 03, 2025, 01:35:42 PMhttps://www.olimex.com/Products/Components/Connectors/FEMALE-1X16-STD/
CON3 on the Pinguino OTG is a 0.05 spaced connector if I am right. It is not the standard pin header.

Quote from: LubOlimex on February 03, 2025, 01:35:42 PMThe powering priority is as follows: Power jack (9V in your case) > USB > Li-Po
In the PIC32 itsel from SW, I think it is not easy to determine. It was also some years ago when I tried, but as far as I remember, I had problems to read out from the USB module if there is power on the USB. I think I will check this again in the future. I mean USB can be read out theoretically. LiPo can be measured. If not of them gives power then obviusly it is external powered :)