Offline Ethernet connection to send single characters

Dear all,

I am trying to pre-programme an Arduino UNO with Ethernet Shield for a light-footswitch. It has several switches, a display and is connected OFFLINE to a PC on which a lighting programme is installed (DASlight). By pressing on one of the buttons, a single character (char) shall be sent to the PC in order to trigger the light-programme.

So, how do I set up the ethernet connection correctly for using an offline-connection between Arduino UNO and a PC to send single characters?

Unfortunately, I am not creating the physical connections, I am "just" doing the programming and I was wondering, how I should set up the ethernet connection. Since both the Arduino AND the PC will not be connected to the Internet, I don't know, which addresses I need to put into the Arduino. Or do I actually need to put this kind of information when there is no internet connection, at all?

Your Arduino will need a MAC address and an IP address to allow it to use Ethernet whether it's connected to the internet or not. You will have to provide the MAC address - it usually comes with one on a sticker or, you can take one from the examples in the reference. Just make sure you don't try to use the same one for another connected device.

The IP address may be given to you by your router if you have one and it's configured for DHCP. Otherwise, you'll have to look at the PC's address and figure out an unused one on the same network.

I did this way back in the 1990's when Ethernet was first developed. Just two PCs connected by cable using an ethernet board in each. Have to use cables with the TX/RX switched on one end. The basic driver programs came with the boards. This was a just a test and I gave up while working on error recovery code.

The code you may be working with probably does not support point-to-point ethernet.

Paul

You might be able to do it by just giving the Arduino an pc an IP address in the same network as each other. For example:

PC 192.168.2.1 (you’ll have to undo this if you want to connect the PC to the internet again.)
Arduino 192.168.2.2

If you are forced to give an address for a network service like Gateway/ DNS etc, just use that of the PC.

This should work with a normal Ethernet cable (with modern interfaces) although a crossover cable may be better.

Crossed with the last two posts.

The setup is:
Arduino with footswitches -- lan cable -- computer.
Now I want to press the footswitch on the arduino and with this, send a keyboard stroke to the PC. This system should be offline. How exactly should I programme this? And do I not need to give the arduino an IP address of the other PC?

I'm just trying to understand in detail what you are attempting to do.

At the moment, you have a stand alone PC running "Daslight" lighting software. This software can accept commands via the PC ethernet interface and from the PC keyboard.

You have an arduino Uno with an ethernet shield and a display/buttons/footwsitch .
Your goal is that pressing a button connected to the Uno/shield sends a command via an ethernet cable to the offline PC and triggers the PC "Daslight" application.

Is that right ?

Provide a link for "Daslight" which which describes the external interface (ie protocols and command set) that have to be used to activate it as you need (indirectly triggered from a button press on the Uno).

Provide also a link to the ethernet shield/display/footswitch etc. which you are using on the Uno.

Daslight: https://www.daslight.com but you could just think about it like an editor and you want to send the letter "k" to be displayed in this editor from the Arduino. We used a normal keyboard for this before but on stage it's very unhandy to use a keyboard, so we want to use buttons on the ground for the feet.

You have an arduino Uno with an ethernet shield and a display/buttons/footwsitch .
Your goal is that pressing a button connected to the Uno/shield sends a command via an ethernet cable to the offline PC and triggers the PC "Daslight" application.

Is that right ?

yes, but it's more easy, the uno/shield shall send a keystroke to the PC via an ethernet cable.
daslight can take ascii and midi.
we have an arduino rev 3 and a Ethernet e5100 shield. the button is a standard two pole switch.

In general, you can’t send a “single character to an editor” over an Ethernet connection. The pc side software has to be explicitly network-aware.

You may find it simpler to use an Arduino that can emulate a keyboard, such as a Leonardo.

Exactly. If you are happy just to send keystrokes from your arduino to the PC hosting the "DasLight" software, simply use an ATMega32U4 based arduino (Arduino Leonardo, Pro Micro etc.) The connection between the PC and the Arduino Leonardo is then simply over a USB cable and no Ethernet module is required. Google for "Arduino Leonardo keyboard emulation" for examples.
The interface to the "DasLight" software over Ethernet appears only to support other "DasLight" modules (on quick reading of the supplied link) and the details seem not to be published.