Sending Sensor Data from MCU based board to Laptop Server without Router

Thread Starter

Kittu20

Joined Oct 12, 2022
434
Hello everyone,

I have a hypothetical situation and I'm seeking some advice. I have a single sensor that sends data to a 8 bit microcontroller (MCU). My goal is to transmit this sensor data to a server running on my laptop, which is connected to the microcontroller via a LAN cable. However, I do not have a router in my setup.

I am wondering if it is possible to establish a connection between the 8 bit microcontroller and the laptop server without a router. If so, what would be the best approach to achieve this? I'm open to any suggestions or insights you might have.

  1. Is it possible to establish a direct connection between the microcontroller and the laptop server without a router?
  2. Are there any alternative devices or components I should consider adding to my setup to enable this communication?
  3. Are there any potential challenges or limitations I should be aware of in this scenario?

I would greatly appreciate any guidance or experiences you can share regarding this topic. If you have any other suggestions or ideas, please feel free to contribute.

Thank you in advance for your help!
 

Thread Starter

Kittu20

Joined Oct 12, 2022
434
Do you want wired or wireless data transfer?
Thank you for your response. In this scenario, I am specifically looking for a wired data transfer solution using an Ethernet module. I want to establish a direct connection between the microcontroller and the laptop server using an Ethernet cable.

Is it possible to establish a direct connection between the microcontroller and the laptop server via ethernet cable without a router?
 

Ya’akov

Joined Jan 27, 2019
8,489
If MCU is running a IP stack, you can simple put the two (logically) on the same network, for example:

Server 192.168.1.1 with a netmask of 255.255.255.0
MCU 192.168.1.2 with a netmask of 255.255.255.0

The netmask is of arbitrary size, and could be as small as 255.255.255.252 covering only the two addresses and the network and broadcast addresses (.0, .3) or as large as 255.255.0.0 to cover all of 192.168.x.x

The choice would be based on whether the server had another 192.168.x.x address and needed to have a different route to it.

No extra router is needed, the IP stack has a routing table and can be told to use the LAN connection (which it will by default).
 

Thread Starter

Kittu20

Joined Oct 12, 2022
434
If MCU is running a IP stack, you can simple put the two (logically) on the same network, for example:

No extra router is needed, the IP stack has a routing table and can be told to use the LAN connection (which it will by default).
Is it possible to establish a direct connection between an Arduino uno and a laptop server using the ENC28J60 module.?

The ENC28J60 module is an Ethernet controller that can be used with Arduino boards to enable Ethernet connectivity.
 

Ya’akov

Joined Jan 27, 2019
8,489
Is it possible to establish a direct connection between an Arduino uno and a laptop server using the ENC28J60 module.?

The ENC28J60 module is an Ethernet controller that can be used with Arduino boards to enable Ethernet connectivity.
The details are entirely dependent on the protocol you choose, but if the MCU and laptop are connected to the same collision domain, that is, the same LAN segment, then you will never need a router.

The fact that they are connected directly ensures this.
 

Ian0

Joined Aug 7, 2020
8,938
Make sure you have the right ethernet cable with RX and TX swapped.
Most routers can internally swap RX and TX, but only some computers can, and ethernet modules can't.
 

Thread Starter

Kittu20

Joined Oct 12, 2022
434
The details are entirely dependent on the protocol you choose, but if the MCU and laptop are connected to the same collision domain, that is, the same LAN segment, then you will never need a router.

The fact that they are connected directly ensures this.
I'm looking to purchase an Ethernet module for an experiment I'm planning to perform. I was wondering if you have any Ethernet modules available or if you could point me in the right direction to find one.

If you have any recommendations or if there's a specific module you can offer, please let me know.
 

Thread Starter

Kittu20

Joined Oct 12, 2022
434

Attachments

Last edited:

djsfantasi

Joined Apr 11, 2010
9,126
Make sure you have the right ethernet cable with RX and TX swapped.
Most routers can internally swap RX and TX, but only some computers can, and ethernet modules can't.
It’s a little more complex. Recent laptops and desktop computers will auto-negotiate and automatically swap RX and TX. And I don’t know what you mean by “ethernet modules can’t”. Ethernet cards used in laptops and switches CAN and DO auto-negotiate RX and TX.

I have had experience with popular Arduino Ethernet Shields that no matter what I did would not directly connect between two instances. I had to connect the two devices through a four-port switch.
 

Ya’akov

Joined Jan 27, 2019
8,489
If the device supports Auto MDI-X if will configure itself for the pinout of the connector. If not, you will need a crossover cable, which is redadilay available, or easily made if you have a cropper.

There are also crossover F-to-F RJ45 couplers.

[Edited to fix incorrect spelling of incorrect reference to RJ45, which was rendered as RJ46. See below to understand my reference to incorrect reference]
 
Last edited:

Ya’akov

Joined Jan 27, 2019
8,489
"Auto MDI-X" - That the term I was trying to think of!
Hmm… I have no idea if the fine people of the UK ever call cutters “croppers” (since you are regularly “cropping” wires and leads) but my intention to say “crimper” was foiled but autocorrupt.

A crimper and some RJ45* connectors and, of course, some CAT5+ cable is all that is needed to make nice patch cables for whatever purpose.

*My inveterate pendanticism compels me to point out that I really should say “8P4C” or “8P6C” modular connector since “RJ45” is a mythical beast that arose from the land of Registered Jacks where there isn’t even such a beast.

Registered Jacks are standards for both a physical jack and its wiring. There is an RJ45S, which is an (obsolete) standard for modems and data connections, but it uses a keyed 8PnC modular plug. The only place I have ever actually used an RJ45S is on a DEC terminal keyboard.

The similar connector/wiring standards for Ethernet are found in ANSI/TIA-568 (TIA is the Telecommunications Industry Association) also know (incorrectly, at this point*) as “TIA/EIA-568” structured cabling standard which defines two pinouts for Ethernet termination into 8P8C connectors: A and B. The A scheme is supposed to be for horizontal cables in a structured cabling plant while B is recommended for the vertical—but can be used for the horizontals in the absence of other specifications.

For example, the federal government specifies in its contracts that the A scheme will be used for horizontals, while just about everyone else uses the B scheme everywhere.

So, rather than “RJ45” which refers to an immaterial standard and even to a non-existent part of it, we should say “ANSI/TIA-568” when referring to the physical plug and its pinout; and 8P, or 8PnC modular connector when referring to the bit of plastic and metal not-yet-wired up.

*The original standard was created in cooperation between the Telecommunications Industry Association and the Electronics Industry Alliance, the latter now being defunct. This version of the standard was replaced by the ANSI/TIA version.
 

Ya’akov

Joined Jan 27, 2019
8,489
Hmm… I have no idea if the fine people of the UK ever call cutters “croppers” (since you are regularly “cropping” wires and leads) but my intention to say “crimper” was foiled but autocorrupt.

A crimper and some RJ45* connectors and, of course, some CAT5+ cable is all that is needed to make nice patch cables for whatever purpose.

*My inveterate pendanticism compels me to point out that I really should say “8P4C” or “8P6C” modular connector since “RJ45” is a mythical beast that arose from the land of Registered Jacks where there isn’t even such a beast.

Registered Jacks are standards for both a physical jack and its wiring. There is an RJ45S, which is an (obsolete) standard for modems and data connections, but it uses a keyed 8PnC modular plug. The only place I have ever actually used an RJ45S is on a DEC terminal keyboard.

The similar connector/wiring standards for Ethernet are found in ANSI/TIA-568 (TIA is the Telecommunications Industry Association) also know (incorrectly, at this point*) as “TIA/EIA-568” structured cabling standard which defines two pinouts for Ethernet termination into 8P8C connectors: A and B. The A scheme is supposed to be for horizontal cables in a structured cabling plant while B is recommended for the vertical—but can be used for the horizontals in the absence of other specifications.

For example, the federal government specifies in its contracts that the A scheme will be used for horizontals, while just about everyone else uses the B scheme everywhere.

So, rather than “RJ45” which refers to an immaterial standard and even to a non-existent part of it, we should say “ANSI/TIA-568” when referring to the physical plug and its pinout; and 8P, or 8PnC modular connector when referring to the bit of plastic and metal not-yet-wired up.

*The original standard was created in cooperation between the Telecommunications Industry Association and the Electronics Industry Alliance, the latter now being defunct. This version of the standard was replaced by the ANSI/TIA version.
I will add that, of course, “RJ45” now means the connector and will never confuse someone unless you time travel back to when it hadn’t acquired its current usage. On the other had “8P8C modular connector” will not be so readily understood, though should be pretty obvious from context to most.

The use of ANSI/TIA-568B is still worth adopting, though, since people mistakenly say “Ethernet” or “CATn” pinout which is a different non-thing, and actually ambiguous.
 

Ian0

Joined Aug 7, 2020
8,938
Hmm… I have no idea if the fine people of the UK ever call cutters “croppers” (since you are regularly “cropping” wires and leads) but my intention to say “crimper” was foiled but autocorrupt.
Definitely “cutters” here, but if you like to refer to IC pins as “legs” then a “leg cutter” is an entirely different thing.

AAC should have a list of permissible incorrect terms, which should include such things as RJ45, RS232, RS485, choke*, light bulb etc.

*we never did establish what is in the set of inductors that are not chokes!
 

Thread Starter

Kittu20

Joined Oct 12, 2022
434
I'm struggling to find the appropriate documentation for ethernet module attached in my post #11 . I've searched extensively online but haven't had any luck so far.

I was wondering if anyone here could assist me in locating the necessary documents for this Ethernet module. I have attached a photo of the module to this thread to provide some context. If anyone has any knowledge about this module or can point me in the right direction, I would greatly appreciate it.

Thank you in advance for your time and assistance!
 

nsaspook

Joined Aug 27, 2009
12,262
I'm struggling to find the appropriate documentation for ethernet module attached in my post #11 . I've searched extensively online but haven't had any luck so far.

I was wondering if anyone here could assist me in locating the necessary documents for this Ethernet module. I have attached a photo of the module to this thread to provide some context. If anyone has any knowledge about this module or can point me in the right direction, I would greatly appreciate it.

Thank you in advance for your time and assistance!
Use something modern and supported like this that easily interfaces with TTL serial at speeds up to 460800bps.
1688662272563.png
Sensor Data Project using that ETH module
https://forum.allaboutcircuits.com/...nd-sensor-node-for-canbus.189388/post-1788083

https://www.waveshare.com/uart-to-eth.htm
  • 10/100M Auto-MDI/MDIX ethernet interface, regardless of cross-over or straight-through cable
  • Auto-reconnecting, provides a reliable TCP connection
There are cheaper modules with the same basic capabilities.
 
Top