# Waveshare RP2350-ETH, veml6030, UDP

**URL:** <https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374>\
**Category:** Networking, Protocols, and Devices\
**Created:** [August 1, 2025, 9:40am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374 "2025-08-01T09:40:35Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 1, 2025, 9:40am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/1 "2025-08-01T09:40:35Z")

</div>

Hello together,  
iam new in the Arduino worl. Maybe you can help me to create a smal code. The target is to send the Lux Value from the veml6030 wich is conected with i2c to the rp2350-eth via UDP Ethernet to a UDP Server wich is running on a PC. I try a bit and i can already see the LUX value from the veml6030 in the Serial monitor. But iam not able to send the UDP Telegramm. I look with wireshark but there are no data to see. I use the Configuration tool from Waveshare to configure the CH9120.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/3/8/b/38bbea9952cb3cf009795644d755acd8bc38548d.png)

This is the Actual code

```arduino
#include <Wire.h>
#include "SparkFun_VEML6030_Ambient_Light_Sensor.h"

#include <Ethernet.h>
#include <EthernetUdp.h>

#define AL_ADDR 0x48

#define ETH Serial1 // oder Serial2 je nach Board
#define BAUD_RATE 115200

SparkFun_Ambient_Light light(AL_ADDR);

// Possible values: .125, .25, 1, 2
// Both .125 and .25 should be used in most cases except darker rooms.
// A gain of 2 should only be used if the sensor will be covered by a dark
// glass.
float gain = .25;

// Possible integration times in milliseconds: 800, 400, 200, 100, 50, 25
// Higher times give higher resolutions and should be used in darker light. 
int integationtime = 100;
long luxVal = 0; 

void setup(){
  Wire.setSDA(0);
  Wire.setSCL(1);
  Wire.begin();

  Serial.begin(115200);
  Serial1.begin(115200);
  
  ETH.begin(9600);

  Serial.println("UDP Test gestartet");

  if(light.begin())
    Serial.println("Ready to sense some light!"); 
  else
    Serial.println("Could not communicate with the sensor!");

  // Again the gain and integration times determine the resolution of the lux
  // value, and give different ranges of possible light readings. Check out
  // hoookup guide for more info. 
  light.setGain(gain);
  //light.setIntegTime(time);

  Serial.println("Reading settings..."); 
  Serial.print("Gain: ");
  float gainVal = light.readGain();
  Serial.print(gainVal, 3); 
  Serial.print(" Integration Time: ");
  int timeVal = light.readIntegTime();
  Serial.println(timeVal);
}

void loop(){

  luxVal = light.readLight();
  Serial.print("Ambient Light Reading: ");
  Serial.print(luxVal);
  Serial.println(" Lux");  

  ETH.println("Patrick_Test");
 
  delay(100);

 
 

}

```

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 4, 2025, 12:31pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/2 "2025-08-04T12:31:28Z")

</div>

try the following using simple IO

```cpp
// RaspberryPi_rp2350-eth - UDP test

#include <Arduino.h>

#define ETH_RX 21 // ethernet serial pins
#define ETH_TX 20
#define ETH_CFG0 18 // Network config enable - when LOW enter serial config
#define TCP_CS 17 // TCP client states - LOW is sucess

void setup() {
  // initialize both serial ports:
  delay(5000);
  pinMode(ETH_CFG0, OUTPUT); // network enable
  digitalWrite(ETH_CFG0, HIGH);
  Serial.begin(115200);
  Serial2.setRX(ETH_RX); // Ethernet port - use Serial2
  Serial2.setTX(ETH_TX);
  Serial2.begin(115200);
  Serial.println();
  Serial.println("\n\nRaspberry Pi rp2350-eth UDP");
  Serial.print(" TCP_CS ");
  Serial.println(digitalRead(TCP_CS));
}

void loop() {
  // read from port 2, send to serial
  if (Serial2.available()) {
    int inByte = Serial2.read();
    //Serial.write('>');
    Serial.write(inByte);
  }

  // read from serial, send to port 2
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte);
    Serial2.write(inByte);
  }
}

```

on a Waveshare RP2350-ETH Mini UDP serial output

```arduino
Raspberry Pi rp2350-eth UDP
 TCP_CS 0
packsender test 1 1234567890
packsender test 2 123456789 abcdef
packsender test 3 abcdefgh

```

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/0/7/c/07caa2484d02010e6149252fae63d4342963069a.png)

if it works you can add your sensors

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 5, 2025, 9:04am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/3 "2025-08-05T09:04:25Z")

</div>

Hello Horace,  
First of all, thank you very much for your code. I'm trying it out right now, but no packets are arriving yet. Can you send me a snipping of the Net Module Configure? Is there anything else I need to consider with the gateway if I have a direct connection between my laptop and the RP2350-ETH? Thank you very much!

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 5, 2025, 9:42am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/4 "2025-08-05T09:42:29Z")

</div>

> [@patrick\_bs](#):
>
> I have a direct connection between my laptop and the RP2350-ETH?

I am connecting via a router (not direct) so using DHCP to get IP addresses

this is the RP2350 configuration I am using

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/a/f/6/af68465ee3b5299b2b9ea4bff2553cb8bcb3a093.png)

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 5, 2025, 9:57am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/5 "2025-08-05T09:57:21Z")

</div>

The Ip from the RP2350 is the 192.168.1.70  
Mode is UDP Server? and Dest IP you have also 192.168.1.70?

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 5, 2025, 10:21am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/6 "2025-08-05T10:21:43Z")

</div>

> [@patrick\_bs](#):
>
> Mode is UDP Server? and Dest IP you have also 192.168.1.70?

wrong screen image!  
this is the correct one where the target PC is IP 192.168.1.65 and the RP2350 is 192.168.1.70

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/6/1/161d8b7d2ca82b716eaed4fb3fc3083b7306abb9.png)

packet sender running on target PC

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/8/1/1/811346c29055022cc7af67f3a48a209e141da7d8.png)

the UDP Server is simply waiting for datagrams  
as UDP is connectionless there tends to be little difference in UDP servers and clients in that either can transmit or receive datagrams depending on application requirements  
if I set the Net module configure the UDP Client the PC \<\> RP2350 communication works just the same as with UDP Server

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 5, 2025, 11:20am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/7 "2025-08-05T11:20:33Z")

</div>

![image](https://europe1.discourse-cdn.com/arduino/original/4X/e/9/e/e9e9b01d47e40a716bc031d6a9dc1b4ee4b61a84.png)

for sending the test package i just write this codeline in the serial Monitor and press enter?

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 5, 2025, 12:08pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/8 "2025-08-05T12:08:36Z")

</div>

> [@patrick\_bs](#):
>
> for sending the test package i just write this codeline in the serial Monitor and press enter?

yes  
or you could write of line of text, e.g.

```arduino
  Serial2.println("RP2050 test message");

```

the Packet Sender displays  
 ![image](https://europe1.discourse-cdn.com/arduino/optimized/4X/6/c/5/6c5eb5bfd025a31900dda6e479bbd3a63014a201_2_690x51.png)

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 5, 2025, 7:56pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/9 "2025-08-05T19:56:58Z")

</div>

do you use also the generic RP2040 library? Maybe my Hardware is damaged 😕 I ordered a new RP2350-ETH. I find out that i should select "new Line" on the right site on the serial monitor. Thanks for youre support 😀

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 5, 2025, 8:09pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/10 "2025-08-05T20:09:36Z")

</div>

not impressed with the RP2350-ETH - it is complicated to use and documentation is very poor - looking at the Waveshare ESP32-S3 ETH Development Board

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 6, 2025, 12:03pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/11 "2025-08-06T12:03:14Z")

</div>

Do you use the RP2350-ETH for yore testenviorment? Which libary do you use for youre test? I spend a lot of time for this test 😅

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 6, 2025, 12:59pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/12 "2025-08-06T12:59:36Z")

</div>

> [@patrick\_bs](#):
>
> Which libary do you use for youre test?

the code of post 2 did not use any libraries - I just communicated with the RPi RP2350 CH9120 using the Serial2 interface transmitting and receiving UDP datagrams using IP/port parameters set up by the CH9120 Network Module configuration program  
the Ethernet library is designed to work with W5100/W5200/W5500-based devices, EthernetENC with ENC28J60 devices, etc, not with a [CH9120](https://files.waveshare.com/upload/d/d3/CH9120DS1_EN.pdf) which has a UART interface

the Waveshare ESP32-S3 ETH Development Board has an onboard W5500 which I have tested in the past using the [EthernetESP32 library](https://github.com/Networking-for-Arduino/EthernetESP32) with a ESP32-S3-DevKitC-1 dev board

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 6, 2025, 1:53pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/13 "2025-08-06T13:53:10Z")

</div>

just to be shure, when i using the same software as you postet it should work. Thats why i ask that you using the RP2350-ETH Hardware too? Which hardware do you use in youre test?

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 6, 2025, 2:08pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/14 "2025-08-06T14:08:02Z")

</div>

I used a RP2350-ETH module (configured using Net Module Configure as shown in screen dump post 4) connected to a router via Ethernet cable  
I ran Packet Sender (see screen dump in post 2) on a PC which was connected to the router via WiFi  
also ran Arduino IDE connected to USB port of RP2350-ETH (IDE serial output shown in post 2)

1. text entered on IDE Serial monitor was sent via the RP2350-ETH to Packet Sender and appeared on the log
2. when Send button on Packet Sender was hit the ASCII/HEX data was sent to the RP2350-ETH and appeared on the IDE serial monitor

---

<div class="post-metadata">

**Author:** ![patrick\_bs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/patrick_bs/32/1098795_2.png) [@patrick\_bs](https://forum.arduino.cc/u/patrick_bs)\
**Post date:** [August 6, 2025, 6:50pm UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/15 "2025-08-06T18:50:55Z")

</div>

Can you make a final Test with a direkt Connection Like in my Setup? Maybe there ist Sonnenproblem. When do you have the Same effect incan save a Lot of time. Yore Support i really great 🙂

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 7, 2025, 9:58am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/16 "2025-08-07T09:58:57Z")

</div>

> [@patrick\_bs](#):
>
> Can you make a final Test with a direkt Connection Like in my Setup?

setup PC ethernet interface to static IP, e.g. 192.168.10.71

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/d/2/3/d23a0033b92ccdd16b79fafc9616fcd2e5b14263.png)

using normal Ethernet connection configure the RP2350 using Net Module Configure program - note same subnet as PC static address above, e.g. it's IP is 192.168.10.70 target UDP IP is 192.168.10.71

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/3/d/23da32a5fe03ec5b5299f21a722f4d503950ce1f.png)  
connect RP2350 direct to PC Ethernet interface

run Packet Sender to send/receive UDP datagram to/from RP2350

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/1/5/215434c1da24dcd77f1c6ace3bc1fce1b68c7325.png)

run RP2350 code to send/receive datagrams to/from Packet Sender  
serial monitor output

```arduino
Waveshare RP2350-ETH Mini UDP test
 TCP_CS 0
packsender test 1 
packsender test 2 1234567890

```

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [August 8, 2025, 9:12am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/17 "2025-08-08T09:12:49Z")

</div>

given up on the RP2350-ETH and consigned it to the junk box

have a look at the [Waveshare ESP32-S3 ETH Development Board](https://www.waveshare.com/esp32-s3-eth.htm)  
it has onboard W5500 ethernet module so works with libraries such as EthernetESP32, EthernetUdp, WebServer, ESPmDNS, etc  
implemented webserver, UDPchat (including direct connection),etc without problems  
it also support POE  
in addition the ESP32-S3 has onboard WiFi and BLE

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [February 4, 2026, 9:13am UTC](https://forum.arduino.cc/t/waveshare-rp2350-eth-veml6030-udp/1399374/18 "2026-02-04T09:13:19Z")

</div>

Closed on February 4, 2026, 9:13am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
