Micro with easy to use ethernet - Page 1
Forum section: electronics / general

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 02:03:29 pm
content: Any micro's out there that have easy to use ethernet ?With easy to use ethernet i mean- can be 10mbit or 100 mbit- wire up a magjack, no need for phy- a couple of registers to set mac and ip address- built in dhcp- built in UDP and TCPBasically i want something that doesn't require half a megabyte ethernet stack , operating system and other fluff. or complicated learning curves. the API should have a few basic functions SetIP ,SetMac , SetDHCPserver, Openport,closeport, portstatus,Sendpacket (target_IP,port,*data) and an interrupt when a packet arrives for me.it doesn't need security. It will sit on a dedicated lan that is not exposed to the outside world. All these things need to be able to do is send simple packets to each other. no need for web pages or anything. payloads are small ( fit in one base ethernet packet )Before you suggest arduino and wiznet and other stuff : too large and bulky. i'm looking for a small micro. 40 pins QFN max. ( 10mmx10mm max body size. i want to tuck it under the magjack )The idea is to have this drive an I2C bus with I/o expanders. basically remote I/O over ethernet.Bonus points if it can do single pair ethernet

author: tepalia02
author_rank: Regular Contributor
timestamp: April 14, 2022, 02:10:43 pm
content: What about Raspberry pi?

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 14, 2022, 02:27:17 pm
content: Simple solution is use a W5500 or LAN8720 or DP83848 module with either an AVR (Arduino) or STM32 controller or other micro's with serial or SPI or RMII. Other option is ESP32 with wifi, but that technically is not ethernethttps://nl.aliexpress.com/item/32832354059.html(Uses a SPI interface)https://nl.aliexpress.com/item/32485939954.html(Ethernet PHY so needs a RMII interface on the micro)https://nl.aliexpress.com/item/1893559945.html(Ethernet PHY so needs a RMII interface on the micro)There are plenty Arduino examples on the net where simple data is send over the ethernet connection. Not sure about the DHCP though. This requires a bit more protocol handling.Not sure if there are micro's that have the actual PHY incorporated.Edit: Microchip does have controllers with MAC and PHYhttps://www.microchip.com/en-us/products/high-speed-networking-and-video/ethernet/ethernet-mcus-and-mpus

author: nctnico
author_rank: Super Contributor
timestamp: April 14, 2022, 02:47:06 pm
content: I'd look at something from Wiznet with an integrated CPU: The W7500P for example (https://www.wiznet.io/product-item/w7500p/)Alternatively you can look at a microcontroller with an integrated PHY but I don't know any from the top of my head. If you can find some, then LWIP is reasonably simple to get going for an embedded software engineer (OS not needed). I'd recommend to run LWIP with at least 16kB of RAM. Recently I had to squeeze LWIP and a simple application into 8kB and that wasn't fun; component shortage for other parts prevented me from using the Wiznet W5500.

author: MarkL
author_rank: Unknown
timestamp: April 14, 2022, 04:29:37 pm
content: I've used these in several projects for clients:https://www.digi.com/products/models/dc-me-y402-lxIt might be a little overkill for what you're describing, but it's all-in-1 and not much bigger than a Magjack itself. The IP stack just works since it's linux. You can interface to it with I2C, SPI, or TTL-level UART, but not all at the same time due to the limited number of pins. You'll probably need to do some development on the module to support your needs unless you're happy with scripting via the serial console pins.It's $51 qty 1. Arrow has them in stock.

author: MarkL
author_rank: Unknown
timestamp: April 14, 2022, 04:50:56 pm
content: I should also mention that Lantronix has a thing similar to the Digi module:https://www.lantronix.com/products/xport/It's a simpler device and the embedded OS is not accessible like in the Digi module, but it can do the IP functions you want (DHCP/UDP/TCP). It only supports serial, so everything has to be scripted.It's a little bigger than the Digi module, but still not much larger than a Magjack.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 14, 2022, 05:07:59 pm
content: If you don't mind proprietary, Hilscher makes a line of fairly powerful SoCs. "Easy" might be relative, I don't know. I forget how much protocol stack they integrate, but it's some kind of multicore thing, with one (or more) fed either with mask ROM (doubtful?) or Flash, supplied by libraries.Tim

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 05:26:28 pm
content: i'm familiar with those digi and lantronix things. too expensive and difficult to work with.The wiznet part is also not very easy to work with.i'm leaning towards an esp32 and maybe ditching the ethernet altogether and hop on wifi. If i flash it with Annex RDS it should be easy peasy.Code development simplicity is what i'm after.

author: Miyuki
author_rank: Frequent Contributor
timestamp: April 14, 2022, 06:36:48 pm
content: ESP32 supports ethernet but needs to use a phybut can get modules with all you need for cheapLike those and many more

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 07:03:04 pm
content: Quote from: Miyuki on April 14, 2022, 06:36:48 pmtoo complicated to use. i really do not want to delve into the software stack.But. an ESp32 combined with a W5500 looks like the way to go. I can use the Pico-D4 flavor (raw chip , no modules) and load Annex RDS on it. Simple BASIC interpreter with all the simple functions i need without needing muckery with a stack , compilers and whatnot.All this thing has to do is listen to incoming control packets , read and write some I/o chips and reply . 2 bytes in , 1 byte out (target port + data byte and reply with current state of port. LSB of target port controls read or write operation. basically i2c over ethernet0x20,0xA1 : write 0xa1 to i2c address 0x20 ,reply with one byte holding current value0x21,0x00 : read from 0x20 , 0x00 is just a dummy byte , reply with read resultthat's all it needs to do. data will be plain ascii

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 14, 2022, 07:12:49 pm
content: Not cheap, but probably does what you want:https://store.ncd.io/product/ethernet-to-i2c-converter/https://coptonix.com/en/products/lan-i2c-adapter-ms/just google "i2c ethernet adapter"

author: kripton2035
author_rank: Super Contributor
timestamp: April 14, 2022, 07:43:28 pm
content: Quote from: free_electron on April 14, 2022, 07:03:04 pmyou program them with the arduino IDE ! configure them as web client or server like an esp32 wifi, or esp8266it's dead simple !

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 07:47:33 pm
content: Quote from: kripton2035 on April 14, 2022, 07:43:28 pmThat in itself is too complicated. compile , flash , find the bug , compile , flash, find the bug... Boooooring. and arduino is not an IDE ... it can't even set breakpoints , watchpoints, trace or singlestep code. i expect more in 2022.Anyway. problem is solved. i'm going the esp+5500 route and using a simple interactive way of developing code

author: kripton2035
author_rank: Super Contributor
timestamp: April 14, 2022, 07:48:12 pm
content: some modules are even POE.

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 07:59:54 pm
content: Quote from: pcprogrammer on April 14, 2022, 07:12:49 pmThat doesn't cut it. It requires the usage of a controlling PC. Once this thing is built it will have no control. One ESP32 will run a time scheduler that fires commands to the slaves. There is no user interface or controlling PC. It runs standalone (after configuration)It's a sprinkler controller. the network cable carries a tx pair, a rx pair and the other two pairs are phantom POE power. Each "node" can drive 8 valves. The node can detect valves (it senses current). So if a valve coil fails open it can be detected and reported. you can also interrogate it how many valves and what channels are attached. ( it sense the coil resistance)It makes large landscape management easy. Ethernet switch , a bunch of slaves wired with simple CAT5 and a master controller. The master controller has a command line style UI. You can see which channels have valves. if the current state deviates from the stored state we have a broken valve. the rest is a list with channel number and runtime. driven by an RTC. a simple display shows what channel is active and how much longer. the list is processed based on a clock event. It's tuesday 6am ? launch list 32.You connect to the master controller through a web interface ( can be opened in a browser , but it itself is not connected to the internet , you need to be near it). it talks to the slaves over a wired, sealed off network.

author: hans
author_rank: Super Contributor
timestamp: April 14, 2022, 09:21:00 pm
content: There is the PIC18F97J60 family with integrated ethernet mac+phy. But it's in LQFP-64.. and being a 8-bit niche PIC, probably not most widely supported device out there. I have some around, but never got around to get firmware loaded onto it and see what a TCP/IP stack can do with it.But its perhaps acceptable for an I/O module.

author: thm_w
author_rank: Super Contributor
timestamp: April 14, 2022, 09:45:24 pm
content: Quote from: free_electron on April 14, 2022, 07:47:33 pmArduino IDE is horrible, there have been better alternatives for years now, eg:https://visualgdb.com/tutorials/arduino/esp32/

author: free_electron
author_rank: Super Contributor
timestamp: April 14, 2022, 11:05:23 pm
content: Quote from: hans on April 14, 2022, 09:21:00 pmoh i happen to know that one. chamberlain uses it in their garage door openers with My-Q internet connectivity.But that's again beyond my requirements. I don't want to deal with a stack or the learning curve. I want simple to use that just works.Can't beat a basic interpreter.

author: westfw
author_rank: Super Contributor
timestamp: April 14, 2022, 11:26:00 pm
content: QuoteMicros with an ethernet Phy are remarkably uncommon.QuoteThat makes it not so much a "micro", but a "module" with SIGNIFICANT amounts of internal software. That's been done for Bluetooth and WiFi (keeping the network stack proprietary and within legal control (esp radio) seems to be difficult enough that having a user-programmable section in the same micro is less common than implementing a separate "networking module.")The WizNet products are probably closest at the chip level. At the generic "module" level there are a bunch more options (which have been mentioned), and if you can put up with a single-connection specific purpose ("serial to tcp/ip") you get even more.There is/was a neat Luminary Micro LM3S6432 chip with built in phy, used on thecute little MDL-S2E board, that I had high hopes for, but it doesn't seem to be one of the chips that TI "kept" :-( Still seems to be sold, though.None of these seem to be the sort of thing that you're looking for, though. Good Luck.

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 01:16:55 am
content: Quote from: westfw on April 14, 2022, 11:26:00 pmin this internet of things age you'd expect to find those things under every rock you turn. Same for pre-embedding the entire stack and having a simple API using only a few registers.set your mac and IP , the routers IP. a few bits to fire off a DHCP and autodiscovery.Then simply specify target ip and write your data into a buffer and flip the transmit bit. kind of like a uart for ethernet.It's 2022 and we're still mucking around like we are in the dos days and trying to install novell... IOT: Idiots Owning Trinkets...anyway. I'm going the esp32 +w5500 route. Probably the Pico D4 or similar ( bare chip with Flash + psram on board. i'm rolling my own board. no modules. )

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 15, 2022, 03:10:35 am
content: Quote from: free_electron on April 15, 2022, 01:16:55 amWell, yes but no. The whole IoT trend has exploded concurrently with the explosion of wireless communication. Neither vendors nor users (except for niche applications/or some pro applications maybe) care for Ethernet, for the most part. Fewer and fewer home users (for which the bulk of IoT devices is made) actually have an Ethernet network! And since it's more expensive to implement (connectors, PHYs, size of the connectors themselves requiring relatively bulky devices), it has become an almost no-go.That's a shame, but just the way it is.That said, some MCUs support Ethernet and only require an Ethernet connector (with integrated transformer, which are very common these days), so hardware-wise, that's an easy task.The NXP iMXRT MCUs for instance. For quick prototyping, all it would take is a Teensy 4.1 for instance, with the cheap Ethernet kit:https://www.pjrc.com/store/ethernet_kit.htmlSoftware-wise, that's something else but I'd expect Wi-fi to be pretty similar for the network stack. lwIP works decently.

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 15, 2022, 05:26:49 am
content: Quote from: free_electron on April 15, 2022, 01:16:55 amQuote from: free_electron on April 14, 2022, 07:59:54 pmYou probably already thought about galvanic isolation since you are choosing ethernet, but make sure to use a similar setup for your power supply. If the POE you mention is actual POE from a network switch, I guess it will already have a small transformer in the DC/DC converter needed to bring the voltage down to what is needed.If not true POE, using ethernet won't make a difference when lightning comes in to play.

author: westfw
author_rank: Super Contributor
timestamp: April 15, 2022, 09:10:03 am
content: QuoteI noticed that an ESP8266 wireless module (which does essentially what you want by default - send it AT-like dial commands and get a simple TCP connection to somewhere) is cheaper than (just) a CAT5 Ethernet cable of reasonable length (say, 10ft.)(On Amazon: ESP8266 module: 3 for about $12. 10ft "Amazon Basics CAT6 Ethernet cable": about $7.)That's just ... really weird.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: April 15, 2022, 09:42:42 am
content: If you want my help I can design it for you, it would take under 5 hours to make a webserver and it has all the bells and whistles that you need, any ARM cortex device plus a simple PHY like KSZ8081RNAIA would do it, it has a very easy layout too!This combo is cheap and has very good bang per buck,STM32H750VB + KSZ8081RNAIAIf you do not like this, Just choose your ARM cortex Device and let me do the reset

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 15, 2022, 10:48:20 am
content: Quote from: free_electron on April 14, 2022, 05:26:28 pmIn what way? - I've used the W5500 for UDP applications and once you have the SPI set up right and understand the buffer pointer handling it's pretty straightforward - about 100 lines of C to implement and Artnet receiver. I don't know if TCP/IP is any trickier though.The only limitation I've found is it doesn't support fragmented UDP packets

author: cdev
author_rank: Super Contributor
timestamp: April 15, 2022, 01:12:14 pm
content: Ralink makes some SOCs that can do Ethernet x2 and can run Open WRT which is a full featured Linux distro for small devices with an emphasis on wireless devices like firewall-routers. You can make them Ethernet ready by just adding the jack and magnetics. The resulting device is very small, has multiple GPIOs and is fairly flexible. Its a good way to make use of old hardware that has Ethernet jacks in it already, like old routers.

author: newbrain
author_rank: Super Contributor
timestamp: April 15, 2022, 01:36:50 pm
content: Quote from: ali_asadzadeh on April 15, 2022, 09:42:42 amWell, that part I can do too!(sorry, I could not resist)

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 02:29:18 pm
content: Quote from: pcprogrammer on April 15, 2022, 05:26:49 amnot needed. i send 24v AC down the line. sprinkler valves run on 24v ac. i use the two unused pairs as power carrier. current draw is minimal. like 30 mA

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 02:30:13 pm
content: Quote from: westfw on April 15, 2022, 09:10:03 amamazing isn't it ? it cost less than the effing cable !

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 02:45:27 pm
content: Quote from: ali_asadzadeh on April 15, 2022, 09:42:42 amthanks, but no thanks. i need to be able to work with it. i don't want a webserver. Simple transport. packet in , packet out. basically a serial port with an addressthe rest is plaintext ascii. no json ,xml or other complicated ballast. It has to be simple. I can design hardware like the best. coding ? not so much , and i don't feel like delving into all the networking stuff and other complicated mess that typically comes along with things. I did all that stuff in the 80's and 90's. it's 2022 . i expect this to be much easier now. a couple of simple functions and off we go. So an interactive code editing is the way to go. Think commodore 64 over a remote terminal ( but without line numbers)This thing is not well defined yet and will grow as i work with it. i may want to add local soil moisture and other things.I lost several plants due to valve problems. ( stuck valve refusing to open or wire disconnected due to corrosion , or simply a broken coil) This controller will sense the coil current. if i activate a valve and there is no current (or overcurrent. i've seen irrigation controllers fried due to shorts): send notification. It will also "autodetect" valves. after wiring send the autodetect command and it lists you all channels that are in use. it saves this as a I/O bitmap. It will poll this every few hours. so if a channel "disappears" -> notificationThe simple irrigation controllers (even rachio and b-hyve) are "stupid" in that respect. They are also stupid in the sense they cannot activate more than one output simultaneously. i want to use a fertilizer injector. every other week : open the injector valve. I have different injectors. (depending on citrus or other plants)

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 02:46:28 pm
content: Quote from: cdev on April 15, 2022, 01:12:14 pmi said SIMPLE. 1 trillion transistors and 50 megabytes of operating system is not SIMPLE by my definition.

author: free_electron
author_rank: Super Contributor
timestamp: April 15, 2022, 03:40:44 pm
content: Quote from: mikeselectricstuff on April 15, 2022, 10:48:20 ami plan on using that one. Fragmentation is not a problem. my commands fit well within the 1500-odd bytes max length of a packet.Command structure is a fixed number of bytes (3)out ->  (3 bytes , coded in ASCII HEX so 6 characters)in <-  (1 byte coded in ASCII HEX 2 characterstarget is the direct i2c address, last bit is r/w bit. based on that bitI had one of the first devkits for the 7100 and that left a sour taste ... that thing was so complicated. You needed to handle the protocol state machine in code. ( you had to craft the packet yourself. so you needed to learn how to craft a ping command, a http command etc ...) There were no simple routines like OpenPort , UDP_Sendstring or HTTP_Send etc. i spent days trying to get ARP and PING to work. I had done this on a CS8900 years before. That thing was similar. it behaved as a chunk of RAM (16 bit addres and 8 byte data on a motel bus wired to a Silabs F120 cpu). Simply fill the TX buffer , set a bit and the packet left. it gave you an interrupt when a packet came in (it could only do MAC address filtering, but no IP). you needed to encode/decode the packet. I spent weeks learning how to make ping and arp and upd send. It was wonderful and exciting. Succeeding in sending the first hello world as a http packet to a browser and receive a POST operation. Now ? I don't want to go down that route anymore. It's 2022. it should be handled by now.I don't have the patience nor drive anymore to do all that stuff. I have a heart condition that has hit very hard (people probably noticed i got crankier in the last year on the forum). So i try to find joy in still building things and repairing stuff. But the "fiddly annoying bits ?" not so much. I expect my resistor to be a resistor and my communication port be as simple as a RS232. This block of data here, send there.Anyway, i have a solution. AnnexRDS basically gives me a BASIC interpreter over ethernet. So it's easy to write code. no need for compilers. interactive commands. open a web browser and we're done. I can focus on writing code that opens the valve on time (as opposed to debugging why a packet is malformed.)

author: PlainName
author_rank: Super Contributor
timestamp: April 16, 2022, 04:01:39 pm
content: QuoteBut if it's in a module where, you already said, you don't want to deal with the internals, what do you care how it's implemented? Logically, your only beef should be a) complexityto youand b) cost.

author: hans
author_rank: Super Contributor
timestamp: April 17, 2022, 09:21:10 am
content: I think this is converging towards the classic "Use RPi and Python" or "use a 555 timer" -- to blink a LED.Each solution is easy, for a software and hardware engineer, respectively.Using a 400MHz SoC/MCU to transmit a I2C GPIO write to some I/O board, is overkill (which is not necessarily an issue), but can also make things incredibly complex by itself.Since those SoCs are designed to do many other thingswell, you would first have to crawl through all those holes to finally get to the level of abstraction you want.For example, as a hardware engineer, I imagine it's easier to just send raw UDP frames with the Mac and IPv4 header hard-coded for the given protocol, than it is to initialize a complete Lwip TCP/IP stack, configure ARP/ICMP/DHCP correctly, make sure none of the statemachines or allocating structures ever lock up, and then deploy it in the field (literally).OTOH if you were to spawn a Linux OS, you can be pretty certain those things are bullet proof, but you must go more and more out of your way to get the same level of low abstraction in that environment.. given all the dependencies (that will keep changing, so it's like chasing a moving target). If you don't work with these systems every day, then I can imagine why something lower level and perhaps hardcoded can be easier.Now FE did state to want to have UDP/TCP, DHCP and easy to set up IPv4, so the target device must have some polished (embedded) TCP/IP stack/library built in.

author: free_electron
author_rank: Super Contributor
timestamp: April 17, 2022, 02:23:15 pm
content: Quote from: hans on April 17, 2022, 09:21:10 amClose. What i'm looking for is the FTDI equivalent for WIFI. USB was bloody hard trying to do it with the first cypress/intel micros. Then comes along FTDI . USB to serial. easy peasy. now the world is peppered with dirt cheap usb to serial chips. Why ? because it's simple. The drivers exist for any OS and the application firmware is dead easy. You get a pipe: throw a byte in and it comes out the other side. No need to mess around with the USB stack. You didn't really have to learn anything new.That's what i seek for Wifi / ethernet. No need to muck with anything. Same virtual wire. Throw a byte in and it comes out the other way. OK, it's a bit more complicated as you need to specify an endpoint (IP address) , but not much.in stead ofserial.print("hello world") you doEthernet.Print(IP_Address,Port,"Hello world")or if you want a bit more low levelEthernet.Sendpacket(IP_Address,*packet,packetlength)Espressif's ESP8266 and ESP32 seem to fulfill that role. They are literally everywhere. pop open any Wi-Fi thingy and there's a good chance you find on of them. And they are cheap. 2.5$. By the time i buy an STM32 and a wifi chip i just blasted by a t 3 times the cost , and i'm nowhere. I still need to muck around with complicated software frameworks that have a steep learning curve. The ESPxxxx ? Not so much, it comes ready out of the box. They even have a special ESP network mode that emulates virtual serial ports.My case is a bit different because i want hardwired ethernet , not wifi. There wiznet seems to fit the bill. So making a little board with both on it gives me all i want : a cheap powerful processor and cheap simple ethernet with wifi and ble on top of that should i want it. There is framework that lets me write code easily using a BASIC interpreter. Open a web browser and off we go. It's like having a distributed network of commodore 64's.Since i need to send power to the slaves i can just as well send the data . I don't need "internet" , only networking. I can see at least 10 other routers and peoples printers and whatnot in the air here. No need to throw in a bunch of new wireless things. You stay off my network , i stay off yours.Why not do something like modbus or a distributed serial over RS485. or even CAN ? Well, i thought it's 2022... IoT is everywhere.. so ethernet by now should be easy.not so much apparently.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 17, 2022, 05:16:42 pm
content: If you're looking for something very simple that is higher level and doesn't require fiddling with network stacks and such, there is this chip:http://wch-ic.com/products/CH9121.htmlYou can find eval boards of it (and the bare chip) on Aliexpress (also on LCSC.)Wiznet chips/modules are frankly easy enough to work with, but this one is even easier if you directly want Ethernet to UART connection.

author: free_electron
author_rank: Super Contributor
timestamp: April 17, 2022, 05:23:18 pm
content: Quote from: SiliconWizard on April 17, 2022, 05:16:42 pmthey seem to have mulitple one. Let's see where i can get those ...

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: April 18, 2022, 06:57:25 am
content: Is this code considerd easy enough!?The receiving partCode:// Notify the user application about UDP socket events.uint32_t udp_cb_func (int32_t socket, const NET_ADDR *addr, const uint8_t *buf, uint32_t len) {// Data receivedif ((buf == 0x01) && (len == 2)) {// Switch LEDs on and offLED_out (buf);}return (0);}The Transmitting partCode:// Send UDP data to destination client.void send_udp_data (void) {if (udp_sock >= 0) {// IPv4 address: 192.168.0.1NET_ADDR addr = { NET_ADDR_IP4, 2000, 192, 168, 1, 10 };// IPv6 address: [fe80::1c30:6cff:fea2:455e]// NET_ADDR addr = { NET_ADDR_IP6, 2000,// 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// 0x1c, 0x30, 0x6c, 0xff, 0xfe, 0xa2, 0x45, 0x5e };uint8_t *sendbuf;sendbuf = netUDP_GetBuffer (2);sendbuf = 'A';sendbuf = 'l';sendbuf = 'i';sendbuf = '\r';sendbuf = '\n';netUDP_Send (udp_sock, &addr, sendbuf, 5);}}

author: Miyuki
author_rank: Frequent Contributor
timestamp: April 18, 2022, 05:10:49 pm
content: Just beware if you send a UDP packet over wifi, you will never have that 100% delivered as with send over serial port or other methodsYou must always expect, some will just vanish into the ether

author: fchk
author_rank: Frequent Contributor
timestamp: April 18, 2022, 06:58:05 pm
content: I've used a PIC18F67J60 in the past for various projects. The hardware is basically a single-chip design, comparable to an FTDI FT2232H UART-Serial in complexity. Software and compilers can be downloaded from Microchip for free. The most expensive part in the board shown below is the RJ45 MagJack. This ist the cheapest, smallest, and least complicated way to get wired Ethernet. The PIC contains CPU, RAM, Flash, Ethernet MAC, Ethernet PHY, UART, SPI, I2C, timers,... - just add a 25 MHz crystal, some passives and 3.3V power supply. There are also PIC18F87J60 and PIC18F97J60 - same chip, just more IO pins.fchk

author: nctnico
author_rank: Super Contributor
timestamp: April 18, 2022, 07:57:04 pm
content: Looks interesting but could do with EMI filtering and protection on the ethernet lines. As-is this device likely won't pass / survive certification testing.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 18, 2022, 08:56:16 pm
content: It's a Magjack, it's got that internally??Tim

author: nctnico
author_rank: Super Contributor
timestamp: April 18, 2022, 08:59:33 pm
content: Typically only some common mode filtering but that is not enough to suppress higher harmonics (coming from crappy phys) and deal with surges / pulses. Typically I put 10 Ohm @100MHz ferrite beads (with even higher impedance at higher frequencies) in series with ethernet signals coming from Microchip devices. For some devices Microchip themselves recommends to use series resistors and ESD diodes to make sure a device stays OK. Such information is usually hidden deep in application notes.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 18, 2022, 10:33:58 pm
content: Ah, MCP specific? Haven't worked with any yet, at least in terms of lab testing. Good to know.ESD not usually a big deal in my experience, but can indeed be done, there are TVSs available specifically for that. Usually just clamping diodes into a TVS, which charges up to peak signal level and so doesn't load the signal much. Even easier with H-bridge style output drivers (mostly gigabit, but I've seen a family that does it for 100M also) which can be pre-biased by (A)VDD for even less signal loading.Tim

author: nctnico
author_rank: Super Contributor
timestamp: April 18, 2022, 10:36:35 pm
content: Power over ethernet is a situation where you have to add protection against spikes on the signal lines. I'd say any of the lower cost ethernet chips are suspect; better safe than sorry.

author: DiTBho
author_rank: Super Contributor
timestamp: April 19, 2022, 08:03:32 am
content: The Cirrus Logic CS8900 is an old and well documented Ethernet module with a parallel bus.Easy to be interfaced to a MPU with a parallel bus (8 or 16bit), easy to be initialized and used.CH9121 is easier, but you lose the control. I mean, it's more like a "trans-receiver" that adapts uart to Ethernet, and only with limited networking services.CS8900 isn't so much complex

author: KE5FX
author_rank: Super Contributor
timestamp: April 19, 2022, 08:15:15 am
content: Netburner'sMODM7AE70is pretty nice.

author: free_electron
author_rank: Super Contributor
timestamp: April 19, 2022, 02:54:27 pm
content: Quote from: DiTBho on April 19, 2022, 08:03:32 amCS8900 is very easy , from a base hardware and software layer ( register read/write). it sits on a standard motel bus (motorola/intel) so yuo can hook it to almost any processor out there. The problem begins implementing the network stack... like i said , i did that in the late 90's. from scratch. i got as far as getting arp, ping and a base telnet working . hardcoded mac and ip address. done on an 8051. All the stuff was written in PL/M from scratch based of the protocol specifications. It was fun .... 20 years ago. i don't want to go through all this again. I expected this to be solved by now. And it looks like it is. just not as ubiquitous as FTDI yet..

author: free_electron
author_rank: Super Contributor
timestamp: April 19, 2022, 02:56:33 pm
content: Quote from: ali_asadzadeh on April 18, 2022, 06:57:25 amI want to be able to connect to this using a web browser, or at least something like telnet. anyway, leave it. software wise i have a solution now.

author: peter-h
author_rank: Super Contributor
timestamp: April 19, 2022, 03:37:49 pm
content: There is no such thing as "easy to use ethernet" unless you use a ready made Linux or similar board, or get one and copy the schematic and the software, and use ready made OS and apps.Or you buy-in a module, which works (quite a few are buggy too). This is how it was done in the old days of 8/16 bit micros (Z80 etc) which could never run a TCP/IP stack.Ethernet and everything to do with it is incredibly complex. The libraries for the various chips are full of bugs. Almost nobody understands in detail how it works, well enough to fix bugs. I am working on a ST 32F417 with the ST ETH libs and someone here spent a year of Mondays (he works 1 day a week only - not much I can do because I never found anybody else who understands this stuff) fixing bugs in LWIP, and then another god knows how long fixing bugs in TLS (and everybody and their dog "needs" HTTPS now). I would pay someone to do this work but nobody wants to take it on because it is never ending, and my budget isn'tThen once you got the bugs out of some narrow application scenario, you find some other part of the API which you didn't use but somebody else does, doesn't work properly.Fortunately USB is working well enough otherwise I would go crazy and drop this whole project. Everything else I can code myself.ETH and USB are both incredibly complex. Most libraries are buggy as hell and implementers spend months googling for bug reports. Most of these lead nowhere (because 99% of those who fix bugs don't usefully describe what they did, because they did it in company time, etc) and occassionally you find a snippet which enables you to fix a bug. Then you move to the next bug. Then you get a bug which breaks the system just once a month. The mfg doesn't support the product, other than via a, you've guessed it, a forumAnd on there are 1000 desperate posts every week, most remaining unresolved.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 19, 2022, 04:39:06 pm
content: The Wiznet chips are easy to use. You don't need to buy a "module", they are available as bare ICs as well.You don't need to implement any network stuff with them. They just have a few registers to fill to get a working solution.Of course, they have limitations, but it's impossible to know whether those limitations would be a no-go for a given project without knowing the full specifications.

author: free_electron
author_rank: Super Contributor
timestamp: April 19, 2022, 04:42:02 pm
content: all i need is a simple connection. telnet or a browser.Anyway it is solved. the Wiznet chips handle all i need and they are supported by the platform i want to use (ESP32 + AnnexRDS)

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 19, 2022, 05:00:46 pm
content: I've used a Wiznet chip years ago, it was just supporting 10Mb at the time. It worked well, but the throughput was not that great.The more recent ones support 100Mb with much larger internal buffers, so the throughput should be much higher. I actually ordered a couple modules (W5500) to evaluate that.I'd like to find similar solutions, but for 1Gb ethernet, but I haven't found anything like that.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 19, 2022, 07:21:05 pm
content: Quote from: SiliconWizard on April 19, 2022, 05:00:46 pmW5500 supports SPI up to 60Mhz, so if your host can handle it, you can get about 50% of the possible throughput. Onboard buffer is 16K in each direction, unfortunately you can't trade off buffer space between tx and rx direction.The problem when you go to 1G is what interface you use to talk to it. That sort of bandwidth pretty much needs DMA direct to your memory, so only practical as a peripheral on a SoC type device

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 19, 2022, 07:45:32 pm
content: Quote from: mikeselectricstuff on April 19, 2022, 07:21:05 pmThe max is actually 80MHz, but the following note in the datasheet is kind of facepalming...QuoteQuote from: mikeselectricstuff on April 19, 2022, 07:21:05 pmIt just needs a FIFO interface such as what you get with FTDI chips. The USB HS are just an 8-bit FIFO @60MHz and can handle the 480Mb/s throughput, from which you can achieve something like 30MBytes/s, which is not bad. The FT60x support USB SS and have either a 16-bit or 32-bit FIFO interface @100MHz. For gigabit ethernet, some 16-bit FIFO interface would be a no-brainer, but even just 8-bit @100MHz would be fine.But there's probably not a significant market for this. Problem is, if you want gigabit ethernet, you'll usually have either to use a full, Linux-capable SoC, or some FPGA with a soft core, or with a hard core, such as the Zynq stuff. There's nothing in between.

author: cdev
author_rank: Super Contributor
timestamp: April 19, 2022, 08:15:15 pm
content: There is a commercial product called Vocore that uses an SOC to provide a wireless PC running linux that can work with a mag jack and minimal additional components.

author: westfw
author_rank: Super Contributor
timestamp: April 19, 2022, 08:37:52 pm
content: QuoteOh come on. Let's not conflate "Ethernet" with "full Internet stacks that include modern encryption features."QuoteGiven that "a browser" is about two orders of magnitude more complex than "telnet", this sounds like you have a really poor idea of your actual requirements (of the Networking Layers.) Elsewhere you said something like "just transfer a few bytes", for which even Telnet (or anything TCP) is probably overkill.

author: DiTBho
author_rank: Super Contributor
timestamp: April 19, 2022, 08:44:14 pm
content: I have a couple of miniPCI Ethernet modules (not express), never hit more than 30Mbyte/sec on an udp/ip connection.To go faster, you need to off-load the CPU and allocate the largest buffer possible. It is also necessary to improve the DMA policy or the DMA engine itself.Out of curiosity, I built a miniPCI-to-PCI bridge to interface aTulip Giga Ethernet card, a large professional card, used in 2009 for serious business (server), and ... well, on the same router, with the same Linux kernel, it offloads so much the CPU and it has such efficient DMA and bigger buffers that I have seen 50Mbyte/sec!boooooooom from 20 to 50 Mbyte/sec is impressiveNot bad at all! So the hardware chip of the net-module can make a big difference

author: free_electron
author_rank: Super Contributor
timestamp: April 19, 2022, 10:07:34 pm
content: Quote from: westfw on April 19, 2022, 08:37:52 pmWell , how do i talk to it without having to reinvent the wheel ? telnet and browsers are available on every computer. It has to be simple. just like using an FTDI chip. open serial port using putty or a terminal program and off we go.That's what i want , but for ethernet. That was clear from the beginning no ? i stated very clearly that i did not want to be bothered with complicated software development. give me a virtual pipe and i'm happy. that means BOTH sides need to be handled readily. Yes, i don't know all the details of all those protocols. i'm not interested in them. Too complex.Anyway, it is solved. I have my dev platform in an easy to use language (basic interpreter on the esp32) and it does everything i want ethernet wise.This is not for a commercial produc.t it's for a one-off to control the sprinklers in my landscaping. The commercial sprinkler controllers can't do what i want.

author: Kjelt
author_rank: Super Contributor
timestamp: April 20, 2022, 06:37:06 am
content: For that application rs485 would have been more than enough.You have a proprietary protocol, no need to use it on top of an international defined standard protocol to communicate with other parties.I think the reason there are no (or limited) cpu's with integrated PHY is:- a PHY is also pretty intelligent, fast and takes on plenty silicon surface which would make the cpu too expensive- it would limit the customer, to a certain max. dataratePretty much why there are no cpu's with built in rs485 transceivers. Some want more robust expensive 15kV esd protection, or high speed, others want the cheapest.The reason there is no ethernet firmware in a cpu is obvious, pretty much every new disclosed cve security vulnerability requires a fix, at least when you are connected to the world wide bad guys web.But since you are not, as said ethernet is perhaps not the most obvious choice for your project.

author: peter-h
author_rank: Super Contributor
timestamp: April 20, 2022, 11:06:07 am
content: The OP states (post 1) he wants to run over a LAN, and use DHCP. That is a "modern LAN"And rest assured that any customer who reads the internet will ask about "security"If he can use an RS232 or RS485 connection, that is of course dead simple to implement. But he didn't say that.There is a mid-way, for a LAN: use UDP packets. Many years ago I nearly became a distributor for a German product - basically what used to be called a "statistical multiplexer - which ran four RS232 lines over ethernet. You set up the MAC # on each box, on dipswitchesSo it would not work through any switch or router. But it needed to contain almost no software. Back then, that would have been ok. I didn't take it on because I asked the guy ~10 questions and he answered only 7 of them, then I spent weeks extracting the answers to the other 3, generating 20 other questions in the process, and eventually I gave upOh and BTW that product avoided the need to purchase a block of MAC numbers, because you created your ownActually I think a lot of chinese firms do that too; if you pick random numbers, the chance of a collission is miniscule, so long as nobody reports you.

author: free_electron
author_rank: Super Contributor
timestamp: April 20, 2022, 05:49:51 pm
content: Quote from: Kjelt on April 20, 2022, 06:37:06 amThe reason i wanted to go that route is the following- simple prewired cables ( ok i can run whatever over ethernet cables. i2c if i'd wanted )- simple ethernet switch can do multipoint. i was going to use hardcoded ip addresses, no need for dhcp. but if it can do that : bonus points- this thing is off the big bad internet. it runs in a vlan on my home network. so i can point a browser there to see the status and alter settings.- the slaves have no intelligence. they export a simply command interpreter.Waarrdd -> reply with ddRaarrdd -> reply with dd.(aa = address on the local i2c bus , rr is register in the device , dd is data byte).xxxxxxx -> abort (a single X aborts. sending 7 means that no matter where you were in the command string it gets flushed) this is for humans only. This also aborts the i2c busAny valid read or write operation resets the watchdog. Non recognized commands do nothing. (it's the i2c routine that resets the watchdog)no valid command for longer than roughly 5 minutes -> hard reboot a simple r/c with a schmitt-trigger that gets reset with a transistor by the SCL line of the i2c bus. (capacitively coupled. so if the i2c bus gets stuck it still trips the watchdog after 5 minutes. there needs to be bus activity (transitions).- why ethernet ? cause its 2021 and i was wondering if we were at the same ease of use like USB-Serial. These things are everywhere now. My train of thought was "if they got this nailed down, it should be at the point where i can just open a remote terminal and off we go. since iot is everywhere these days ... apparently we are still in the stone age when it comes to ease of use. Espressif seem to be the only ones that have solved a lot of the things.i had the intention writing this on a 8051 (cause i know those best) but during preliminary research i found that an esp32 is so cheap... but is wifi only. then i found the basic interpreter that can run on it. write code using a browser. no need for stinking compilers , jtag dongles. it's like having a distributed network of commodore 64's accessible through a browser.this is a one off project. The reason for attempting ethernet was purely because i thought that would be easy by now (and it's galvanicaly isolated. i will be sending 24 volt AC down the unused other pairs (sprinkler valves run on 24v ac) and use a small 1:3 transformer to produce local dc and maintain isolation.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 20, 2022, 05:56:30 pm
content: I wasn't considering your project as one-off, but if it is, then why not use something like a SBC (RPi or similar)? You'd get a full OS, full Ethernet support...

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 20, 2022, 06:21:41 pm
content: Quote from: peter-h on April 20, 2022, 11:06:07 amNobody could do anything even if they did 'report' you.If you want legit MACs, Microchip sell EEPROMs with a MAC preprogrammed

author: fchk
author_rank: Frequent Contributor
timestamp: April 20, 2022, 06:56:45 pm
content: Quote from: free_electron on April 20, 2022, 05:49:51 pmPlease note that the Wiznet chips you have chosen don't support 802.1q VLANs.For hardcoded Ip addresses you may consider IPv6. Each IPv6 port has got a default local address, and gateways and other information are distributed via stateless discovery.fchk

author: free_electron
author_rank: Super Contributor
timestamp: April 20, 2022, 07:16:36 pm
content: Quote from: SiliconWizard on April 20, 2022, 05:56:30 pmTo steep of a learning curve. not interested. needs ot be simple. rpi and linux is anything but simple.

author: free_electron
author_rank: Super Contributor
timestamp: April 20, 2022, 07:32:48 pm
content: Quote from: fchk on April 20, 2022, 06:56:45 pmVLAN may not be the right terminology. It is a regular network that is blocked at the switch level. One simple switch ties all these devices (8 or 9 slaves and one controller) together so they see each other. The slaves don't talk unless talked to by the controller. Slaves don't talk to each other. There is one "uplink" from that switch to my regular network where there is a managed switch. That one is set up so only one computer on my home network can see the devices. (IP/MAC filtering). The idea is the PC used only for software development. Otherwise the uplink port is closed (i simply tell the managed switch to shut that port down when i don't need to be on that network) and the thing runs headless.My home network is already partitioned like this.

author: Kjelt
author_rank: Super Contributor
timestamp: April 20, 2022, 09:27:09 pm
content: Ofcourse I respect your choices, everyone would make different choices I guess.If you go the ethernet way then I would make it PoE so you have DC already at every node to switch valves etc.Quote from: free_electron on April 20, 2022, 07:16:36 pmI beg to differ. Lots of examples on the internet and my sixteen year old nephew wrote an UDP based controller for his AV receiver in thirty lines of python code in a couple of hours.The problem with rpi is that it is not OS so a beaglebone would probably be more your cup of tea since you can design everything yourself if needed and it has an M3 I believe coprocessor to do some nice low level embedded stuff if you need it.

author: pqass
author_rank: Super Contributor
timestamp: April 20, 2022, 11:52:13 pm
content: I haven't seen any mention so far for the ENC28J60 from Microchip.It is a 3.3V part but is 5V tolerant. It interfaces to your MCU via SPI and only needs a crystal, some passives and a modular RJ45 with magnetics (SI-60002-F). Digikey doesn't have any in stock right now but you can get ready made modules; google "enc28j60 module". Although it can only do 10mbit, it may be all you need.I've successfully built this implementation:https://www.open-electronics.org/low-cost-ethernet-shield-with-enc28j60/See the EtherCard library (download) in the link above. It provides a simple library for TCP, UDP, DNS, DHCP, and HTTP server (no SSL). The C++ code is fairly easy to understand. It's GPL.

author: ve7xen
author_rank: Super Contributor
timestamp: April 21, 2022, 12:39:24 am
content: Quote from: free_electron on April 20, 2022, 05:49:51 pmTo each their own, I guess, but as a networking professional, these small-scale or niche embedded hardware designed this way is a bane of my existence. Nonstandard behaviour. Possibly hardcoded things like addresses because they couldn't be bothered / didn't know how to make it configurable, then you can only have one such on the network and the one device dictates the configuration of everything else. Duplicate MACs, no ARP caching, no respect of DHCP lease timers, the list just goes on and on. They also tend to be *incredibly* fragile when sent unexpected traffic or when there's a lot of broadcast traffic on the network or whatever. The protocols are usually undocumented and weird. Not to even get started on the security considerations... And even so, these guys probably put a lot of work into their implementations, it's just a huge task to do properly. If what you 'really' want is a UART, I would just use a UART-based system like RS485. CAN might also be an interesting choice here.If you actually want to make a decent networked product, either a *lot* of work needs to go into the stack, or you avoid reinventing the wheel and use one of the existing ones, whether that's lwIP or Linux (mostly the latter, because even with lwIP it's kinda a pain to actually make a proper robust product). Products these days aren't trivial, almost nobody wants to use Ethernet as an expensive UART; they need a full-fledged HTTPS client or server to actually talk to the I of IoT. Sure you could I guess embed some TCP/IP implementation in mask ROM, but you're still writing C against it, so there's really no practical difference between that and using a source library like lwIP except that it lives in user flash and you have to write a few dozen lines of HAL code - and have the opportunity to tune the capabilities of the stack to your application or add bug fixes. There's only disadvantages to doing it as gateware instead, at least outside of niche high performance use cases.Not really grokking why you are so opposed to using a library. As far as the developer interface is concerned, it's basically the same as any other embedded solution including WizNet - you write the HAL, then you call the high-level (existing TCP/IP library or your HAL->SPI one) functions to implement your application. Sure it requires some flash space, which costs money, but so does a WizNet chip. Hell, writing the HAL driver for lwIP is probably simpler than writing the higher-level mapping to the WizNet SPI interface. CubeMX or whatever high-level development environment for your micro platform will pretty much take care of this all for you these days.FWIW while you seem to think Espressif offers what you want, the networking is all just library code... Also the ESP32 has an Ethernet MAC, so if you like that solution, go ahead and use it, just add a PHY, they are cheap as chips.If you like the idea of BASIC on ESP32 to solve this, microPython does include full network abstraction and an easy to use interpreted language. It has been ported to many boards with Ethernet already there like Nucleo 746ZG, and also ESP32 (though not sure which boards might have a PHY).A small off-topic bugbear (not directed at you free_electron, I was just a bit triggered reading the thread): WiFi is Ethernet. Fibre Ethernet is Ethernet. Copper Ethernet is Ethernet. Ethernet specifies many physical layers, it's not a synonym for RJ45 or base-T.Edit: ENC28J60 doesn't really make a lot of sense here, it's just a MAC+PHY, if you already have a MAC (which many micros do) it offers nothing, and it does nothing to solve the stack implementation problem, since it doesn't implement any of that.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 12:48:06 am
content: Quote from: Kjelt on April 20, 2022, 09:27:09 pmThe valves require 24V AC (50 or 60hz...) not pulsed DC but true AC (polarity reversal) so POE doesn't work. i need AC at point of load. i will send 24VAC down the wire on the two unused pairs. a small local transformer will maintain isolation. or i may use a simple rectifier driving a DC/DC. depends on what is cheaper. i do want to retain galvanic isolation between modules. have not looked into detail on this yet.Quote from: free_electron on April 20, 2022, 07:16:36 pmrpi is expensive (compared to esp32), draws way more power than an esp32 and they are hard to get these days and an annoying form factor. hats, capes , whatever. yuck. even using the CM is a problem. Those connectors are finnicky.Python is not up for discussion, nor is anything that smells like or is lunix for that matter. I don't want a whole OS. So many times i had to reformat my SD card in the rpi i have played with. It got hosed during an uncontrolled shutdown. no thanks.following is NOT a rant. just trying to clarify what i seek in simple terms :Besides solving my irrigation problem i used this as a kind of experiment to figure out if we have asimple AND cheapethernet/wifi networking solution yet.The ESP32 (or 8266) is a winner hands down in the price camp. can't beat it.My definition of cheap is 5$ max (i can get a usb uart for 2$ and a processor for 3$)Espressif is actually cheaper than that.It is also the winner in the simplicity camp , albeit way more complex than an FTDI solution. yes you can do udp in an easy way but that is not "simple" as it requires custom stuff on the other side. To stick within the realm of simple : point a browser or open a telnet port. something ready made that itself is cheap and simple.Simple means just that : simple. Simple as in commodore 64 simple. Basic simple. FTDI usb simple. i am looking for that kind of simple to use ethernet. in 2022 it should be simple by now. Python on a pi may be simple for others , it is not my definition of simple. a small micro is simple. granted, esp32 is not exactly a small micro but it comes in small 48 pin QFN (pico-d4), does not need an OS and i could even use the factory built in basic interpreter. That classifies as simple.commodore simple means : apply power and 10 milliseconds later you have a prompt and can start writing code. no need for compilers, ide's , jtag probes and whatnot. turn it off when you want. will not turn into a brick , doesnt take 10 seconds to boot , hard rom. no need for endless os updates.ftdi simple means : write string, read string. behaves as a buffered uart.Basic simple means : interactivity , non endless space / tab / whitespace nonsense , no case sensitivity no semicolons or other nonsense that cramps my colon. understanding when = means assign and when it means compare. simple english without fluff. no endless [ compile , fix case mismatch / missing semicolon / forgot to define variable, compile again , flash , crash , figure out problem using printf statement] cycles.i can fire up an old 8052-ah-basic processor, hook it to a ftdi chip (i would use the silabs 2021 now) , open a terminal program and off we go. that's simple in my mind. Or i can take a raw 8052 (feel free to substitute with your micro of choice) and do the same using a cross compiler ( i would use PL/M since that is close to pascal as a language and highly efficient for small processors. it was designed for intel micros). driving a uart is like 5 instructions. wait for buffer empty bit , throw byte in tx register , repeat for however many bytes you want to send. you get an interrupt on receive. Print hello world is like 30 bytes of rom space (and that includes the constant "Hello world") and requires no ram. That kind of simple. The FTDI chip hides the complex stuff. And it just works. That's what i am looking for , but on ethernet or wifi network.Damn it starts looking like a rant.Maybe it's because i am from a different generation. Things were simple in my day. Not so much anymore.

author: ve7xen
author_rank: Super Contributor
timestamp: April 21, 2022, 01:43:42 am
content: What you want is not fundamentally simple like a UART that like you said can be implemented with a handful of instructions - especially if you want to do it remotely 'correctly'. The idea of comparing the two is pretty ridiculous, there is a good reason your UART driver is a handful of instructions and your TCP/IP stack is a couple dozen KB, that code wasn't written for shits and giggles. You're also eschewing most of the simple-to-use solutions that are internally complex but hide that complexity for you (though you seem to be okay with some of them for reasons I don't understand). Either you deal with the complexity yourself (and please don't...), or you embed a fairly thick stack of abstraction to deal with it for you. You can't have it both ways.QuoteThere are several cheap and easy to use options, you are just choosing not to use them because you call them 'complex' or for very dubious reasons like your bias against Python and Linux. It's not 1985 and in 2022 if someone is going to be designing something to parallel the intent of your ROM BASIC chip with an interactive interpreter for a scripting language, dollars to donuts it's going to use the most popular scripting language of 2022, which is by far Python, it'd be silly to choose something else for your product.

author: uer166
author_rank: Super Contributor
timestamp: April 21, 2022, 02:07:05 am
content: I don't think Ethernet is a good solution here, you want something RS485/CAN/whatever based. I would recommend PLC RS485 using a THVD8000 chip: basically you have shared 24V (or whatever) power and the AC riding on top is the data. It's super easy to use, you need one master, and multiple slaves that reply. Everything is normal half-duplex UART, just like regulat RS485. 2 wires makes the whole bus, which delivers both power and data.If you want to totally avoid the PLC filter complication (although it's super easy to prototype with their dev-board), then you're looking at CAN or RS485, CAN being the much more complicated option. Horses for courses, use full featured, secure Ethernet to talk to external world, use something much simpler to implement and manage if it's internal (there is a reason vehicles still use largely CAN bus to talk to all the nodes, unless high speed is required).

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 21, 2022, 02:11:43 am
content: Ethernet is pretty old (several decades), and things were never simple with it. Networking is not simple.And, if you wanted something "simple" to develop for Ethernet (of course "simple" means very different things to each of us), I still think going for a SBC would be the easier path. You don't have to know all the minute details, as there are tons of languages and libraries you can use for that. The real downside IMO is power consumption (if that ever matters in your case), and boot time (again, if that ever matters in your case - certainly a SBC would take a couple seconds, if you don't start X/ a desktop environment, compared to a couple ms for a MCU-based solution). Now boot time is probably not all that relevant in this case though, because anything using Ethernet will take a few seconds to be ready to communicate on the network anyway, especially if you use DHCP, so...)

author: Bassman59
author_rank: Super Contributor
timestamp: April 21, 2022, 02:36:27 am
content: Quote from: free_electron on April 21, 2022, 12:48:06 amI'm following this because I want to do the exact same thing: create a better irrigation controller and learn microcontroller-based Ethernet control.Face it: everyone who has to set up a yard/garden irrigation system has gone to the big box home improvement stores and seen the Orbit and Rain Bird value controllers. And ... they really suck. The user interface is crap. My back yard timer can control up to six valves but it has only three "programs." It's annoying to set up. There's no easy way to see how it's configured. Etc etc. And as much as I'm annoyed by things that "have an app," well, fuck, I'd like to "have an app" that lets me control the valves without having to walk across the yard, enable manual mode for a valve, walk over to where I think the tubing has sprung a leak, note it, walk over to the timer, turn off the value, lather, rinse, repeat.The things we are controlling are trivial. The micro needs to control four relays that switch the 24 VAC that energizes the values, so literally four output ports, four transistors, four relays, done. The micros all have real-time clocks, so "programs" are just a list of events. Not difficult.So yeah, the timer box needs to run a web server. I have a dozen examples of how to control bits and things with a webserver -- TI CCS has examples for TM4C and MSP432. SiLabs has examples for EFM32GG. NXP has examples for LPC54628. I'm sure ST has examples.My problem is that I get all bogged down in the weeds of implementation. For example, with the TM4C I got it to work with lwIP 1.4 ... sort of. (Also lwIP 1.4 is ancient.) I rigged up a a temperature and humidity sensor and a strain gauge reader for my 3D printer. That all gets read by the TM4C and the web page displays the readings. Except that there's something going on security-wise that Safari doesn't like and it won't run the little Javascript that manages the web page. Firefox is happy with it. An NXP version of this has TLS and serves up https with a certificate, and that works. but then there's the overhead of an RTOS and that gets in the way.And then I think, "why not just send little messages over TCP/IP to sockets ..." because you can do that from Python and there are nice examples of how to do that from macOS and iOS but that's more weeds.And I don't smoke weed.We all can learn this stuff if we set aside the time to actually study it. Maybe that's the problem. Who has the time when it's not directly related to the job?

author: uer166
author_rank: Super Contributor
timestamp: April 21, 2022, 03:01:11 am
content: Quote from: Bassman59 on April 21, 2022, 02:36:27 amWell there's yer problemBut seriously, nothing wrong with some sort of central "gateway" such as an ESP32 that is WiFi-enabled, talking to your PC (or, heck, have the PC issue the RS485 commands directly), and RS485 for all the nodes outside your house that talk to that gateway, they all need power anyway so it's not a wiring problem. That's basically how modern cars and large factory embedded systems work anyway. People love shoehorning things into designs to make them compatible with things they don't actuallyneedto be compatible with, and get into lots of trouble since it's much harder than they expect, when a more old-school is both easier and an order of magnitude more reliable.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 03:32:23 am
content: Quote from: SiliconWizard on April 21, 2022, 02:11:43 amyes, i know. if this was for a commercial application i would go that route. and i would not have anything to do with firmware, i'd hire someone to do that. Firmware is not my field of interest. i do hardware. I know to do enough bit twiddling in register to set up a peripheral ( i would not dream of using the prewritten libraries that yield a metric ton of code just to configure the i/o matrix. ) but i am not an application developer. i know enough C to write my own programs, but using other people libraries... not so much. Often they are very cryptical , use special features own to C like post increment and whatnot. i like simplicity. Split the damn thing on two lines. write x=x+1 instead of x++ (it compiles the same !) and do not use cryptical stuff like like a = ++x and a = x++. Write it as a=x ; x=x+1; That is clear what it does, even for someone who has never seen that language.And that whole case sensitivity irks me. some libraries capitalize first letter , some use other rules. SerialPrint i2c_print LCDprint.. i can never remember what it's supposed to be. yeah the IDEs can handle it , but somehow it annoys me. it's not "simple"So i'd like this complicated protocol stack to be hidden from me. Just like the usb serial emulation systems hide the entire misery for 2$, i was looking for something similar AT THE SAME PRICE POINT and just as simple to use. Something that gives me a telnet connection or web browser connection and exposes a uart on my side so i can hook it to whatever.Point telnet to the device on one side , serial on the other. I'm kind of amazed nobody has made a ready to run app for an esp8266 or esp32 that does exactly that. Set up required params through uart ( dhcp server or static ip, gateway address, username and password for the login, can be stored in the flash as defaults or overridden through uart.user connects, username + password and telnet is running.esp8266's are dirt cheap.There is a library for the arduino platform that implements telnet but i don't have the patience to complete it into a uart <> telnet bridge that is to my liking (there's all kinds of problems with it), and it's for wifi , not for ethernet and that solves only one element, it wouldnt solve the device to device connection. and and and.anyway, enough crying on my end. i'm probably boring you all. i have a solution. esp32 running Annex RDS hooked to a wiznet 5500- basic interpreter on board, no endless compilation sessions , no cryptical libraries.- module to module communication- wired ethernet- wifi for software development using nothing but a browser.- starts fast- costs 5$i'll set it up so that it wifi only opens if you hold down a hardware button. you can override using debug mode. so if you are not physically next to the slave , and have the jumper installed this thing will not talk to you (the browser ide does not start. it simply runs the payload)Code:const debugmode = falseif DebugMode or DebugJumperInstalled()startwifimodeelsestartethernetmodeend ifIf i ever feel the desire i may explore that telnet demo and see if i can alter it to my liking- multiple users + passwords- multiple sessions- support for w5500 so telnet can come from wifi or ethernet- no blabbering ( no serial port activity unless asked. )- commandset +++just freewheeling here for a second.+++createuser wifi/wired/both user,pwd returns user number max 9 user per port ( 1 to 9 , 0 is admin cannot be removed )following function return a single character ! or # ! = ok , # = failed/syntax error+++deleteuser usernumber (0 for all, except admin) , return ! or #+++SetAdmin password+++EnableAdmin wifi.wired true/false enable admin account.+++SetMac Wifi/wired xxxxxxxxxx+++SetIP wifi/wired xxxxxxxxxx+++SetDHCP wifi/wired true/false+++SetDHCPserver wifi/wired xxxxxxxxxx+++Reset+++SetBaud xxxxx+++SetSessionMax wifi/wired : set how many concurrent connections are allowed ( max 9, session 0 is always for admin)+++Flushbuffer wifi/wired sessionnumber+++CloseSession wifi/wired sessionnumber+++selectsession wifi/wired sessionnumber connect uart to specific session ( 10 sessions on wifi , 10 on ethernet ) !if port open , # if port is closedThis returns data+++length wifi/wired sessionnumber = reads length of message in buffer+++GetSessionstate wifi/wired sessionnumber returns 1 or 0 ( port open or close)+++Whois wifi/wired sessionnumber returns usernumber+++Read bytecount , 0 = entire buffer+++GetBufferState : returns a 32 bit number encoded as hex characters. bits 19 to 0 represent if there is data in that particular buffer so you can do if bufferstate >0 we have data the bits show you which buffers have data+++GetSessionState : returns a 32 bit number encoded as hex characters : bits 19 to 0 tell you if there is a session runninganything else is sent transparently to the selected channel (if open) otherwise discarded2 hardware pins besides the txd and rxd :buffer_empty pin : if current selected buffer is empty , goes high. if data in buffer stays low.interrupt pin : if any buffer receives something : goes high. can only be low if all buffers are empty.support for 2x16 line lcd character display in 4 bit modetop line shows wifi ip, bottom wired ip

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 03:47:22 am
content: Quote from: Bassman59 on April 21, 2022, 02:36:27 amyup. none of them can have more than one valve open at a time...my controller will use two simple tables as a program.one holds on byte containing the bitmap for day of week , starttime , startline and linecountthe program table is nothing but a simple array of two 32 bit numbers. first is count in seconds for the line to be active, second is a bitmap where each bit represents a valve. simply set the bits for the valves you want to be open.programs can be as long as you want. they can even overlap.program 1 = 0b01011111 (all days except sunday, week begins at saturday), 700 (7:00),604 (program begins at index 604) ,23 (and is 23 lines long)program 2 = 0b00100000 , 700,602,25 begins 2 lines earlier , so basically it includes program 1 . those commands inject fertilizer in the circuit for examplelines 604 and following604 : 130 (1 minute 30 seconds ) , 0b000010000000001100000000 (valve bitmap)605 : 55 (55 seconds) , 0b000010000000000100000000 (valve bitmap)the engine scans day bitmap and starttime (minute boundary). if we have a positive the program launches until completion.There is no testing for user stupidiy. if you try to launch another program while first is still running it won't start. (those things can be handled by the pc software or UI software should one desire a flashy app that runs on the phone.). the controller is nothing but a sequencer. if it is time , a sequence launces and runs till completion.QuoteFinally someone who understands my pain. Instead of developing the sprinkler controller, 99% of the effort is spent mucking with the #$^%&%@# connectivity and debugging networking crap and wading through piles of bad documentation!FTDI solved that for USB by emulating a simple serial port. Who has solved it for ethernet ? (cheap and simple, roughly same $ cost in hardware and software effort/learning curve as a usb <> serial)

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 04:07:44 am
content: Quote from: uer166 on April 21, 2022, 03:01:11 amyou haven't seen a modern car then... CAN , Lin and the likes are only used for slow speed stuff and then only very local for things like the ultrasonic sensors (and even there they are on their way out). Data is aggregated in local controllers like a door controller or a seat controller. And those communicate over ethernet to the main controller... the modules all use OPEN. (One Pair Ethernet). They run 100Mbps over a single pair. microsecond latency controlled with all kinds of safety features. In some cases it reduces up to 80% of cabling/connectors cost (only a single twisted pair is required for a point to point) and 30% in cabling weight reduction.Protocols like AUTOSAR define the framework for ethernet in car.802.1Qat and Qav define stream reservation and queueing / forwarding for AV bridges. used for the camera streamsThe entertainment system sends audio through A2B (Automotive Audio Bus) directly into the remote amplifiers.https://www.ti.com/lit/wp/szzy009/szzy009.pdf?ts=1650436619497&ref_url=https%253A%252F%252Fwww.google.com%252F

author: ve7xen
author_rank: Super Contributor
timestamp: April 21, 2022, 04:09:47 am
content: Quote from: Bassman59 on April 21, 2022, 02:36:27 amIf you just want to solve the problem, without a bunch of extra constraints on how, the modern way to do it is to stick together a few high-level blocks. At a high level, I would probably do:Home Assistant for the UI and scheduling, maybe add weather tracking and automation here too. Very flexible for this sort of thing.ESPHome to connect an ESP module's GPIOs to your valves (and sensors)Whatever I/O hardware is necessary to interface the valves/controllerIf you don't already have a convenient place to run Home Assistant, use a Raspberry for that and something like mqtt-io to expose the Pi's GPIO to HA instead.Should be pretty much install the software, wire it together, and then pretty gui to set up the schedule / triggers (TBH HA's built-in scheduler UI kind of sucks, but there is a good community addon for it). Add moisture sensors or whatever. Get crazy. Learning curve practically zero, and no software development required.Someone built a simple lashup of hardware around this basic model:https://github.com/TJPoorman/SplHAshQuoteWCH, but TANFL and I'd barely call this a network device.

author: uer166
author_rank: Super Contributor
timestamp: April 21, 2022, 04:27:58 am
content: Quote from: free_electron on April 21, 2022, 04:07:44 amI'm sorry, but not only have I seen them, but until recently my work was LV systems engineering in a EV company that makes most EVs that exist today.. The cars coming down the line have somewhere between 4 and 10 CAN buses with many nodes on each bus. I never said the high-speed stuff wasn't Ethernet, what I said is most controllers in a vehicle talk to eachother and the gateways via CAN. Just because some supplier puts out app-notes, doesn't mean engineers use it. These cars have no Autosar (thank Jesus, that "framework" exists as managerial masturbation, nothing more), and I never even heard of A2B.Anyway, totally off-topic, just wanted to dissuade the BS.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 04:43:15 am
content: Quote from: ve7xen on April 21, 2022, 04:09:47 amand pull another insteon like drama ? no thanksNobody knows how stuff works anymore. it's layer upon layer of cruft.anyway, moot point. the excercise was "simple and cheap ethernet<>serial".

author: Monkeh
author_rank: Super Contributor
timestamp: April 21, 2022, 05:07:15 am
content: Quote from: free_electron on April 21, 2022, 04:43:15 amThis is not Insteon. It is not a cloud-based service which could go away, it is a piece of software you run locally. Ten seconds of research goes a long way.

author: westfw
author_rank: Super Contributor
timestamp: April 21, 2022, 05:17:37 am
content: BTW, I think "industry standard" is something like "use a library that supports the BSD "sockets" interface."Whether that library runs on top of something like a Wiznet chip with embedded TCP support, or on top of a pure software stack working over a bare ethernet chip (or slip, or wireless, or whatever), is supposed to be irrelevant.(or, you know, the Arduino libraries.)Heh. I used to use an OS where you'd open a file (using the standard OS calls for file opening) named something like "TCP:192.168.123.45.2034", and then read and write to it just like it was any other file.It was actually pretty broken; most appliactions wanted a fair amount of not-normal-file-like behavior out of their network connections. (Sort of like CON: being almost useless in windows, without the set of functions to set the speed, and raw mode, and DTR, and...)

author: TomS_
author_rank: Frequent Contributor
timestamp: April 21, 2022, 06:38:32 am
content: Sorry if missed it while flicking through, but was there a reason why something like RS485 wouldn't work for this application, especially if you just need to send/receive a couple of bytes here and there?

author: DiTBho
author_rank: Super Contributor
timestamp: April 21, 2022, 08:13:09 am
content: Quote from: westfw on April 21, 2022, 05:17:37 amOn BeOS there was a Nazi-policy that *all* the Be-compliant applications must have to respect, and in that policy filesystem metadata was used to manage filesystem-sockets.If a file had a metadata telling it was a socket to $protocol, at $port, then all the fopen,fread,fwrite,fclose were re-addressed to the proper primitives in the Be-netbone-socket library.Pretty simple and useful, damn I loved it... except ... it was pretty not portable to any other Unix-like OS because it was dependent on the relational capabilities of the Be-filesystem, a unique filesystem in the world that no other OS has ever had.So, like tears in the rain, great during its golden age, but gone like dinosaurs.RIP

author: DiTBho
author_rank: Super Contributor
timestamp: April 21, 2022, 08:18:14 am
content: Quote from: evb149 on April 21, 2022, 05:26:28 am/dev/tcp/*/dev/udp/*I think it's distro-dependent.

author: DiTBho
author_rank: Super Contributor
timestamp: April 21, 2022, 08:26:05 am
content: Quote from: DiTBho on April 21, 2022, 08:18:14 amYup, just checked, it's a "virtual function" provided by Bash rather than a feature provided by the kernel, I mean you need to compile Bash with "–enable-net-redirections", so it has the capability of using a TCP and UDP redirection.Interesting

author: peter-h
author_rank: Super Contributor
timestamp: April 21, 2022, 10:29:26 am
content: QuoteSo what stops lots of small companies just generating random MAC numbers?One needs to watch the 1st byte, bit 0 I think = multicast, and you don't want that.QuoteI am coming to the same realisationHowever, most of the time it doesn't matter because one is not running a public facing web server or similar. Most "IOT" (to use the fashionable name) boxes go out to a private server and they have only got to work with that. Those which don't (e.g. ADSL routers, WIFI APs, etc) are invariably built with a chinese ripoff 80x86 hardware and Linux and stuff like OpenWRT, and they tend to work ok. Buggy for sure, and slow as a pig with e.g. a browser config taking 10 secs to load a page (I have a POS called a RUT240 right here which is just that).The OP here sounds like he would just be doing the above. But still a good number of man-months of work to do it with ETH.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 21, 2022, 11:24:34 am
content: Quote from: peter-h on April 21, 2022, 10:29:26 amNothing, apart from a perceived risk of issues from collisions.

author: nctnico
author_rank: Super Contributor
timestamp: April 21, 2022, 12:48:08 pm
content: Quote from: peter-h on April 21, 2022, 10:29:26 amRandom would not be a good option but there are plenty of huge MAC ranges assigned to defunct companies. Using one of those ranges incrementally is pretty safe. Since a MAC address is used for ethernet only (IOW: a MAC address only lives on a local network), the chance of running into a duplicate is next to zero. The only negative part is that your device will show up with a different manufacturer name in network sniffing tools.The EEPROMs with preset MAC from Microchip (which mikeselectricstuff mentioned earlier) are a neat solution though. I have used these in a design recently.

author: Scrts
author_rank: Frequent Contributor
timestamp: April 21, 2022, 01:45:23 pm
content: Out of all options I've tried, I've found STM32 (tried F2 and F4) with Micrel/Microchip PHY and LwIP to be the easiest solution whether you use RTOS or run bare metal. The LwIP took care of DHCP, ping, TCP handling and I did UDP handling manually for the compressed video data.ENC28J60 was promising until I connected the device to a bigger LAN and it just choked of data packets going around... Its buffers were constantly overfilling.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 01:45:55 pm
content: Quote from: TomS_ on April 21, 2022, 06:38:32 amyes, but that was not the point.My quest ( besides the sprinkler end goal) was to see how easy it would be to do ethernet, in a similar fashion like usb<>serial.The usb<>serial has been solved by FTDI and many other companies (silabs, microchip, cypress, chinese outfits like CHM series) to the point you can find these chips at sub 2$ point. FTDI was pricey in the beginning and the chips were large 64 pins TQFP. now you can find that stuff in 14 pin packages... You don't need any software. Both ends are handled. Almost any micro out there has a uart and there are drivers for any possible OS. Most OS's don't need a driver as VCP is a built-in class of the USB stack. No need to run a complicated USB stack. Bring your own micro.So , where are we with ethernet ?Price is a difficult point. by the time you have a decent micro , a phy , the magjack , the antennas ( if doing wifi) your bom cost has ballooned. Enter Espressif and wiznet. ESP8266 and ESP32 are cheap, dirt cheap, 2$ cheap.But they are not turnkey like the USB<>serial solutions. You need to write code and wade through an extensive library. At least you don't have to reinvent the wheel, you get something that sort of rolls. to make that into a working solution is still a fair bit of work. It's not as easy as usb<>serial. not in a long shot.Networking is a collection of protocols. What can we use that is SIMPLE. Simple in this context means something that works everywhere without requiring code. A web browser is everywhere , even on your phone or in your car or TV. Telnet is an oldie and there's plenty of ready to run telnet applications too.So there should be something where you can point a browser to an ip address, get a login screen(if desired) and you can run post and get operations. All running on a 2$ chipset. Same principle : bring your own micro and you are shielded from the complex things.

author: DiTBho
author_rank: Super Contributor
timestamp: April 21, 2022, 02:36:19 pm
content: The first of April, a friend of mine made me find one network card on my desk, both with the label "hacked for fun"Out of curiosity, I immediately tried and when I plugged the net-card into the PCIe and listed by ifconfig on the Linux console, the showed mac address wasCode:0xf1 0x6a 0x01 0xca 0xfeI don't know how he changed the mac address, which is supposed to be un-editable and ROM-based (probably flash ...), but LOL, that's great hacker-humor

author: JPortici
author_rank: Super Contributor
timestamp: April 21, 2022, 02:50:43 pm
content: his your friend from milan or whereabouts?

author: DiTBho
author_rank: Super Contributor
timestamp: April 21, 2022, 03:12:56 pm
content: If I remember correctly, he was born 250 km from Milan, heading south, near BolognaAnyway, the post above said: don't assume the mac address is really unique, it can be hacked and changed. Not easy to be done, but it's possible.Even the Linux kernel can bring up an Ethernet interface with a different mac address; OK, this is a software solution that doesn't reprogram anything, but speaking of the machines listening on the network, once again you can't assume that mac- address it is truly unique because even in this case it can be modified, and in this case it is easier to do, only super-user permission is needed to issue a couple of commands on the shell.

author: pqass
author_rank: Super Contributor
timestamp: April 21, 2022, 03:13:13 pm
content: Quote from: free_electron on April 21, 2022, 01:45:55 pmIt sounds like you're asking for something similar to a serial Bluetooth interface where your code interacts with a state machine via AT commands. Your code must still handle the complexity of establishing and sustaining multiplexed byte streams asynchronously.Networking is not simple; it's a large multilayer onion that is a la carte. It's just easier, cheaper, more flexible to keep the hardware interface at send/receive packet and everything else is a library where your application interacts with the network at the Socket or higher API (eg. HTTP, TLS, see /etc/services|protocols). Silicon that does everything (if that's even possible) would be too expensive and a subset wouldn't please enough buyers, and would also be a moving target (potentially being stuck with obsolete inventory).

author: peter-h
author_rank: Super Contributor
timestamp: April 21, 2022, 03:44:16 pm
content: On any embedded system you can use any mac # you want. It is just a #define in the ETH source code.On some PC ETH cards the mac# can be reprogrammed, and this is key to breaking copy protection because a lot of floating licensing stuff is locked to the mac #. Being able to duplicate the mac # on the ETH card is critical to being able to replicate a floating license server for FLEX-LM so you have a backupI won't buy or use anything that uses that but others have had to.Digressing...I would never use ETH if it could be done over RS232, RS422 or RS485. ETH is good for (primarily) remote access. If you are only ever connecting locally then USB is fine. For a more permanent connection but still "local", say up to a few tens of m, use RS232. Using ETH for configuring a product is horrible because the target needs to either obtain IP over DHCP, or the laptop used for config has to get an IP from your product over DHCP, or you have to fart around changing the laptop from DHCP to 192.168.1.10 or whatever because (like so many) the target is 192.168.1.1 and people just tear their hair out. One previous threadhttps://www.eevblog.com/forum/embedded-computing/how-would-you-implement-config-with-a-browser/msg3865049/#msg3865049The big argument forbrowserconfig is that it avoids writing an executable config program for each OS, and especially avoids writing phone apps which is a complete nightmare. However, AIUI, you don't need ETH for this; you can implement an ETH device profile over USB and then you can use a web browser over a USB connection.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 21, 2022, 04:07:49 pm
content: Quote from: peter-h on April 21, 2022, 03:44:16 pmOn some PC Cards, the preprogrammed MAC can be overidden simply by a value in the device driver advanced settings, which can be useful for the abovementioned scenario, or to make it an easily recognizable value when doing network analysis.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 05:29:24 pm
content: Quote from: peter-h on April 21, 2022, 03:44:16 pmwell that's the whole intent !sit in my office, open a browser to the device on my network and do my thing. connect to slaves : write code and interactively control things. connect to master : write code and setup the sprinkler programs. I do not need world wide web connectivity. that's another thing. but remote debugging/developing a system that sits sprinkled around my property ? yup. that's the intent. no need for jtag dongles , going to the board and whatnot.It's dawning that people may have misunderstood what i want to do. This is not a monolithic sprinkler controller where there is one box that sits in the garage with a bunch of wires to valves. This is a system where there a 9 or 10 boards , each driving a number of valves, scattered throughout the property. Each underground valve box has an ethernet cable coming in that feeds connectivity and power. each of these boards listens to a central controller. Some valve boxes have 2 valves, some 8The hardware can sense the valves and report things like an open or shorted valve ( coil open or shorted , or abnormal current draw) and the presence of a coil. i can send a command asking the module : which channels are occupied ? so i can get status of the coil wiring. if a coil goes bad or wiring is corroded i can find out. i can read soil moisture for each channel. i got some other ideas as well.Ethernet cables are cheap and robust. i can get a 1000ft roll of direct burial ethernet cable for 90$. ever bought sprinkler wire ? 100$ gets you a 250 ft roll with 7 wires in it. and it's that copper clad aluminum crap !Why not wifi ? cause i don't want this to be "visible" . it runs on a closed network without internet connectivity.Why not rs485 rs232 modbus can lin firewire or any other of the plethora of busses ? just because ! I thought it would be easy. point browser and go. And out of curiosity to see if we are at the point where ethernet is simple to use. It is 2022 ! Ethernet was invented for a machine that was built from 74xx series chips. it didn't even have a processor and under a megabyte of memory, yet had a full fledged GUI , networked file storage and more ( xerox alto). That was 50 years ago ! it even had telnet ability ( well, close )My whole house is network cabled and my wifi covers the entire property. So i can have these controllers wherever i want. open a browser to an ip address and off we go.My thermostat is networked, my printers are networked, my nas is networked, my tv is networked , my clothes washer and dryer are networked , my tablets are networked. even my water softener is networked so it can let me know when i need to add salt.Network is everywhere.i want a simple to use and cheap solution to plug anything i want on the network.similar to how easy usb is now : you don't deal with usb stack. i'm looking for the same but on wired or wireless network.Anyway , i've had it with these endless discussion about why this and that. The answer is Because ! Any damn topic these days strands in these kind of discussions. All we do is add lipstick on a pig , or put a hat on it.Use a rpi , use a beaglebone, use linux , use rs485...Alto did full blown networking it with a pile of frigging 16 pin ttl ic's ! Ethernet has been around for 50 years. it should be simple and cheap to use by now. 50 years ago we put men on the moon with nothing but a pile of quad nor gates. now we have a supercomputer in our pocket to play "flappy bird". my old nokia phone needed charging once a week. my latest and greatest phone runs out after a day. it just sits there, screen off, doing nothing. same to the nokia. all it has to do is wait for an incoming call.I was just musing about power supplies.( i'm restoring few E3611A that have leaky caps). it doesn't get much simpler than that. two power transistors, three opamps (one voltage, one current and one reference) and two comparators. Some of these on my bench are 35 years old and they work flawlessly (apart from leaky caps after all these years). Look at a modern power supply. 400Mhz processor , color touchscreen , firmware updates required because it sometimes crashes. But is it BETTER as a POWER SUPPLY ? Does it have lower noise ? better impulse response ? recovery time ? regulation ? no ! on the contrary , it's worse for all the stuff that matters. But it has lipstick , a nice hat and a whole bunch of flashy bling-bling. If you wipe the lipstick off you find a 3 legged pig with a couple of teeth missing and scabies. Some versions aren't even a pig. If it gets sick all the vet can do is put it down. Those old school power supplies are pigs that can maul any predator and would survive many cold winters in siberia.rant off. i'm old and cranky. everything has gotten so complicated nobody understands it . we just keep adding another coat of paint.

author: PlainName
author_rank: Super Contributor
timestamp: April 21, 2022, 05:32:42 pm
content: Quote from: mikeselectricstuff on April 21, 2022, 04:07:49 pmOr to be the green player (hence not as standout against the background as the other players) in Doom. Not that I ever used that feature to get an advantage, oh no.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 21, 2022, 06:15:35 pm
content: Side thought with MAC addresses, but just like I2C addresses and USB VIDs, I think those are a big PITA and work against more open standards.The fact they require a centralized organization of some kind to deliver them is fucked-up, but devising a different system is hard. Ideally, addresses would be a completely decentralized affair. That could be done using GUIDs, but while those have a very low probability of ever clashing, the probability is not zero, so if GUIDs are to be shared on a large scale, that can become a problem.If anyone has an idea to solve this issue and come up with a scheme that wouldn't require centralization?

author: woofy
author_rank: Frequent Contributor
timestamp: April 21, 2022, 07:25:00 pm
content: Quote from: SiliconWizard on April 21, 2022, 06:15:35 pmHard to do, In the case of I2C we are kind of stuck with it. Manufacturers do provide a means to select the address with pin voltages but that just moves the problem to the user to prevent clashes.For Ethernet and USB it could have been done differently. The problem is to have identical client modules but still be able to uniquely identify them. To do that there MUST be something unique about it. USB modules could be identified by position in the hub hierarchy and then assigned a unique ID by the host. Same for ethernet, the switch/router path providing a unique position that the host can use to assign a UID. Yes, I know there's got to be more to it than that, but not too much. To late now though.I have been faced with something like this a couple of times, both on RS485 networks. The first we simply programmed our own UID into the product during manufacture. As the protocol was defined by us, we provided the means for the bus master to search the bus and locate the slave modules.The 2nd time is closer to the issue here, there was no unique ID in the slaves at all - they are identical. But to identify each module there has to be something different. In this case I used the physical position on the bus. A global command is sent to all slaves to flick a relay that puts the slaves in series on the bus. Now the master assigns a UID that only the 1st slave will hear. It stores it, releases the relay and plays no further part in the sequence. In this way the master assigns a UID to all slaves.

author: ve7xen
author_rank: Super Contributor
timestamp: April 21, 2022, 07:26:53 pm
content: Quote from: peter-h on April 21, 2022, 03:44:16 pmYou can, and many do, but *please* don't if there's any chance it ever makes it out of the lab. Random is better than that (as long as it's persistent, maybe your micro provides a unique ID register for example), and there's some precedent for randomized MACs on WiFi these days from major players like Apple and Google (for privacy, but clearly they have decided it's acceptable from a policy point of view).QuoteThe real problem is not that collision of GUID is inherently likely (I think even with the birthday paradox it's probably still extremely unlikely and not a concern), but that there's no way to enforce correct generation of GUIDs. If you decentralize it you are effectively asking the community to 'please respect the usage rules' and trusting them to implement them correctly (for example, using a random generator without bias and the correct distribution). For example IPv6 unique local address prefixes are supposed to be randomly generated, but admins are humans, and instead choose to use simple / easy to remember ones. In this case it doesn't matter much because they are *local* addresses by definition, so there's no risk of impact to others, but if you're talking about MAC addresses or USB VID/PID, the whole reason for unique IDs is being able to coexist with literally any other device ever created. And some of these are pretty low entropy to begin with, so collisions are quite likely.So yeah, if someone has a scheme that's not 'random' (which really means user-defined) or centrally managed, I'd love to hear it.QuoteThe solution here is yet more complexity - mDNS and link-local addresses (aka. APIPA for IPv4) for directly connected devices or mDNS and DHCP or IPv6 link-locals for ones connected to an existing network. Then users can browse to 'yourdevice.local' or whatever, regardless of what address it ends up with.QuoteI suppose you don't need to implement the PHY this way, but you still need the whole protocol stack (*and* a USB stack) since the USB is just presenting as an Ethernet NIC.QuoteThe central controller needs Ethernet in this design, but it doesn't make a ton of sense to use Ethernet for the individual nodes that are nothing more than a couple switches and sensors that don't need to integrate beyond your controller. Especially if your property is large enough to need 9 or 10 of these nodes, seems like you're going to be pushing the 100m Ethernet distance limitations. Use a Raspberry or similar as the controller that speaks 'web browser', and RS485 or whatever to talk to the nodes. It will be much cheaper due to the simpler PHY, doesn't require a switch, much longer range, you can daisy chain the data cables between nodes which is probably more efficient with cable and trenching (it can go with the plumbing) than a star, it has the simple interface you want... You don't need the performance of Ethernet, you don't need its multiplexing capabilities, and you don't need its universal connectivity since you control the controller so it's not really adding much other than complexity here.The closest thing to what you are asking for is probably something that takes an existing serial-style interface and brings it into Ethernet, like Modbus/TCP which should work similar to Modbus/RTU over RS485, which is ancient and old-school command/response register based thing, so you'd probably like it. You can buy premade cards with relays or digital inputs or whatever that expose them via Modbus/TCP registers for like $20. Since it's a remote register based model, it's dumb and flexible so kind of has the properties you are looking for. Most of these cards probably have web interface too. But if you're implementing it yourself, you still need to deal with the network stack somehow which means scary libraries and RTOSes.QuotePlenty of people understand it. You don't, you don't want to learn, you don't want to do things the modern simple way, and you insist on using Ethernet for something it's not really designed for; that is a you problem, not an everything/everyone else problem.

author: PlainName
author_rank: Super Contributor
timestamp: April 21, 2022, 07:59:06 pm
content: QuoteJust like IP addresses, then.I don't see centralization where appropriate a bad thingper se- it's the implementation that might be sucky. And, as with IP addresses, you only need centralization at the top of your particular tree, which may extend no further than your household.

author: bingo600
author_rank: Super Contributor
timestamp: April 21, 2022, 08:03:38 pm
content: Something popped up from my "Old SNA VTAM (APPC) days" ...Where i had a ReedBook about APPC suggesting that we could use 4000.xxxx.yyyy Token Ring MAC's as they were locally administered.So the MAC equivqlent to TCP's RFC1918 is :Locally administered MAC addressesQuoteSo for home use you could use these MAC-Ranges as they are "Locally administered"Locally Administered MAC addressesx2-xx-xx-xx-xx-xxx6-xx-xx-xx-xx-xxxA-xx-xx-xx-xx-xxxE-xx-xx-xx-xx-xxReference(s)https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresseshttps://macaddress.io/faq/what-are-a-universal-address-and-a-local-administered-addresshttps://honeywellaidc.force.com/supportppr/s/article/Locally-Administered-MAC-addresses/BingoPs: This OUI assignment table is supposed to be updated , fun reading (lookup's)https://devtools360.com/en/macaddress/vendorMacs.xml

author: Bassman59
author_rank: Super Contributor
timestamp: April 21, 2022, 08:09:14 pm
content: Quote from: ve7xen on April 21, 2022, 04:09:47 amI have a Raspberry Pi running Home Assistant.It's ... well, I have opinions.I like how it can talk to Wemo things without needing Belkin's crap.I don't like how it scanned the entire network and wants to show me my Synology NAS box and all of the computers and printers and such. And it's got the most confusing user interface ... and the support is crap. If I need that Pi for something else, Home Assistant is going away. The Rule here is that if it doesn't work with Apple HomeKit, I don't want to know about it.Re: MQTT -- I've looked at it, and it requires basically a "man in the middle" to act as a broker. I want my computer or smartphone to talk directly to the device I want to control.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 08:11:49 pm
content: Quote from: ve7xen on April 21, 2022, 07:26:53 pm- ease of development. login to the slave using a browser and see what is happening. ability to interactively try out commands , maybe new firmware update. if slave can run an interpeter like lua or micropython or basic: no need for toolchains. remote development.- ease of wiring. buy an existing ethernet switch and jack in ready made cables.Quoteyes. but CHEAP and SIMPLE. 2$ to 5$ range. like for usb. serial over ethernet. Simple 2 wire tx/rt on one end , browser get/post or telnet on the other end.QuoteCorrect. I do not want to deal with an ethernet stack , rtos and other stuff. I am seeking a solution akin to usb<>serial. turnkey, out of the box, transparent , cheap.The hardware exists : esp8266 / esp32 , wiznet chipsets (wired). Where's the firmware ? i'd thought that would exist by now... buy a esp32 , flash a readymade binary, hook up processor of choice and off we go.

author: Bassman59
author_rank: Super Contributor
timestamp: April 21, 2022, 08:27:32 pm
content: Quote from: westfw on April 21, 2022, 05:17:37 amI think the more modern version of this isWebSockets, which looks to be ideal in the sense that the user interface is a web browser and the messaging is simple. I suppose it has to be supported by the IP library.The irrigation timer is just one project idea. I have a few other ideas, all of which are basically variants on hardware that could be remotely controlled.If you have any interested in audio recording, there is a device called a "monitor controller," which is basically a fancy router. It has a handful of inputs and a handful of outputs and lets you route any input to any output or outputs. Most studios have their Big stereo monitor speakers, their Small stereo monitors, a feed to a recording device, a feed to the studio where musicians want to hear playback, and headphones, too. I built one, it works well enough, I have a little box with knobs and buttons and LEDs to control it, and I wrote a small macOS program to control it too. The control box talks to the brain over RS-232.I want to control it with Ethernet. So the control breaks down to the route selection and the volume control. All of this is simple. It's about getting a message from the user interface to say "Select output 1 source from Input 3" and "Set output 1 volume to XYZ."And the idea is to use a web browser for the control because that makes all of the host software development vanish.Anyway.

author: ve7xen
author_rank: Super Contributor
timestamp: April 21, 2022, 08:29:36 pm
content: Quote from: Bassman59 on April 21, 2022, 08:09:14 pmYeah, it's...a bit interesting, but very powerful.You may find OpenHAB more to your liking, I haven't spent enough time with it to compare the two but they seem similar in capabilities.QuoteI don't think it's really scanning your network. Most of these devices use mDNS for service discovery themselves, AFAIK HA is just listening to those same service announcements and offering to set them up for you, same way Windows or Linux or whatever will show mDNS-discovered printers automatically for you.If it doesn't work with Apple HomeKit, my assumption is that this is Apple's fault because Apple are belligerents when it comes to open platforms and interoperability. Though in this case, HA seems to support HomeKit.QuoteIt's just a pub/sub message bus. You can run the broker locally, which is what I was suggesting, just to get HA access to the RPi's GPIOs (since HA deprecated/removed direct GPIO integration). There are certainly other ways to accomplish the same thing (for example running a shell command to set/clear the GPIO), but HA has good support for MQTT so it seemed like a logical plug-and-play route. It seems a bit wasteful to run an instance of HA for every 'device' rather than just having one HA instance collect MQTT (or similar) endpoints you can manage in one location, but I guess that's an option.

author: pqass
author_rank: Super Contributor
timestamp: April 21, 2022, 08:32:40 pm
content: If you insist on having an Ethernet physical layer, you don't have to pile TCP/IP on top of that. Just pick an unused EtherType field and send custom packets to your nodes (incl. s/w update ability). You can run as large a switched Ethernet network you may need and your controller PC/RaspPi would have the webserver-to-custom-packet gateway software.

author: bingo600
author_rank: Super Contributor
timestamp: April 21, 2022, 08:32:56 pm
content: @free electronWT32_ETH1 (Aliexpress)There could be an issue w power on (prob. slow rising VCC) - But if you make your own board ..... (Reset manager or RC circuit)https://wled.discourse.group/t/wt32-eth01-hangs-on-boot-after-psu-power-up/2937https://community.hiveeyes.org/t/power-supply-for-the-esp32/1859/6See attachments too.Not many IO pins left , but bitbanging some HCT595's or some use some I2C expander .....Or as you want ... A pure Ether to Serial GW , and then your favorite 8051 to do the "Magic"/Bingo

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 08:43:34 pm
content: Quote from: pqass on April 21, 2022, 08:32:40 pmRequires software development on a host. not "everywhere". web browsers are everywhere. i can access the devices from a pc, max, linux, iphone , android , roku box, my tv, my car. Anything that has a browser can interact.The idea is really bring your own micro that has a serial port on one side and a browser (or telnet) on the other side. i can grab any platform with a serial port, slap this thing on it and (after initial configuration) point a browser to it . it's transparent.So i can take any processor i want. if i were to take a board running LUA or Micropython or a basic interpreter or really anything, that today works over a 2 wire serial port (txd/rxd pair uart), slap this thing on it and done.That would open so many possibilities. just like the usb<>uart chips opened doors for many people.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 08:59:35 pm
content: Quote from: bingo600 on April 21, 2022, 08:32:56 pminteresting. binary available ? probably not...It's close to what i seek. question is what does it look like from the other side ? can you just point a browser or telnet to it ?

author: pqass
author_rank: Super Contributor
timestamp: April 21, 2022, 09:17:43 pm
content: Quote from: free_electron on April 21, 2022, 08:43:34 pmHaving one gateway node (avail. 24/7) with the webserver software is, to a random browser, functionally no different to having a webserver at each node. Instead of the URL's IP address field being different, you'll have a unique parameter field.The gateway software can be written in a beginner-friendly language like Python. It's unfathomable to me why you'd put a massive stack on a node just to switch a transistor or take a ADC reading; something easily/cheaply handled with an ATTINY and RS485 transciever.At some point you're going to have to write some software.

author: Bassman59
author_rank: Super Contributor
timestamp: April 21, 2022, 09:48:13 pm
content: Quote from: free_electron on April 21, 2022, 08:43:34 pmThis is the key.This is why the device should run a web server. Yes, it's "heavier" than simple sockets, but it really eliminates the whole issue of writing host software for several disparate platforms.

author: pqass
author_rank: Super Contributor
timestamp: April 21, 2022, 10:09:53 pm
content: Quote from: Bassman59 on April 21, 2022, 09:48:13 pmThe difference is:----HTTP/TCP/IP/Ethernet--------GPIO---transistor/ADCvs.----HTTP/TCP/IP/Ethernet--------UART/RS485/twisted pair--------GPIO---transistor/ADCYou won't be writting software for disparate platforms (just two; gateway software and node software, but not for every potential client). The gateway is under your control, built once, using the tools you're familiar with. The browsers still interact the same way whether a phone, tablet, set-top box, etc.It's just about moving most of the complexity from the node to the gateway; the underlying network connecting the gateway to the nodes is hidden. It makes the nodes cheaper/easier to build and can evolve without the browser being aware of any underlying changes.

author: free_electron
author_rank: Super Contributor
timestamp: April 21, 2022, 10:20:20 pm
content: ok, let's isolate the things here.what i seek is browser <> uart. cheap and simple.The final application is not important (mine is sprinkler controller.) the sprinkler portion is handled. software dev and all.but in the future this could be something else.replace usb<>uart by browser<>uart.

author: pqass
author_rank: Super Contributor
timestamp: April 21, 2022, 10:55:48 pm
content: Quote from: free_electron on April 21, 2022, 10:20:20 pm"usb<>uart" just lets one byte stream pass through/back; a physical interface converter. No end-user software installed.With "browser<>uart" there could be silicon that implements a "socket server" but the AT commands and framing (socket/len/vardata on uart-side) to support that don't exist/not standardized. You'd still need to implement the HTTP/Telnet/whatever server on the uart-side processor.Pick a cheap processor with Ethernet and uart interfaces, write the software, document the uart-side protocol, and sell a bunch.I'm thinking like ncat where AT commands twiddle the parameters.

author: PlainName
author_rank: Super Contributor
timestamp: April 21, 2022, 11:07:27 pm
content: Quote from: free_electron on April 21, 2022, 08:11:49 pmThere is also the HC05 which does BLE to serial out of the box, transparently and cheaply. But the thing about the HC05 (and similar) and USB being usable out of the box transparently is that there is a COM: port driver available. The PC sees the link as just another serial port. That doesn't exist for Ethernet/Wifi, hence your problem finding some simple and out-of-the-box transparent product. Browsers and telnet connections are fine, but they are useless for some controlling app that expects to see a com port.The reason for this state of affairs may be that USB and Bluetooth had serial stream built into the protocol, so half the work of making them look like a com port was already done. Ethernet has never had that so any implementation is going to be a custom job and what works for one application won't be suitable for another.So, I think you are (not really) ranting at the wrong thing - it is not the ESPxxx or Wiznet or whatever module that needs furkling but just some COMx->Ethernet driver on the PC that needs doing.

author: free_electron
author_rank: Super Contributor
timestamp: April 22, 2022, 12:43:23 am
content: Quote from: dunkemhigh on April 21, 2022, 11:07:27 pmyou're assuming i will use a pc. i'm a mac guy. i'm a linux guy. i use android , use use beos. i have a roku tv with browser.... see where this is headed ?It needs to work on a common platform.... a browser is a common platform. http is a common protocol. get and post are standard http operations.usb<>serial works because we had drivers. now its built in to the operating systems. initially usb was VERY hard. I Remember the first intel micro with usb (that 540C something. 8051 core based). you needed UV to erase it. it was a nightmare to develop for. Then it started gaining traction for things like printers. Once USB was everywhere the smaller companies started complaining they wanted usb too but it was so difficult. tatarataa here comes ftdi. Convert existing device with almost zero effort to usb. stick it in front of your existing uart and go. completely transparent. initially windows only , mac and vxworks followed quickly and then linux and others. Then the knock-offs came and ftdi had the wole "driver cripples fake" debacle... Once some patents expired cypress, silabs, microschip, chm and others started making cheaper versions. the first usb<>uarts were relatively big chips ( 64 pins) , required external eeprom and a lot of fluff. the FT232x is a 16 pinner that doesn't even need a crystal anymore. costs 3$... less in volume. Now those things are everywhere. and very simple to use. open com port and talk form the computer side. have uart on micro on the other side. it's a virtual two wires.Now, onto ethernet.Why ethernet ?- cheap , easy available wiring ( cheaper than usb cables. my god those cables cost more than the printer you need them for !)- cheap hub ( i can get a 8 port ethernet hub [actually a switch, hubs are gone] for 10$. try finding a 7 port usb hub. minimum 35$ )- wireless ability (wifi) and easy to bridge from wired to wireless. no such thing as wireless usb ( they tried. died a quiet death, surpassed by ... wifi !)- if correct protocol is chosen : no drivers needed. any compute platform with a ethernet stack has what we need : http or telnet.- galvanic isolation or airgapped (wifi). not possible with usb. Yes, there are usb isolators but 12Mb only.looks very attractive no ?Protocol wise http post/get to serial port ticks the boxes: standard frontend (http protocol handled by a browser. ANY browser on ANY platform.)Backend :it's a uart. we know that !We have minimal overhead ( a small command interface to read/write set ip address and dhcp on/off. You have to configure the usb<>serial chips too. Settings stored in nonvolatile. You can preprogram them if you want). Settings can only be changed when in config mode which requires hardware access to flick a jumper , or from the uart side. not from the web side (unless the jumper is active)Hardware must be cheap. usb<>serial cheap. . we have that in the form of ESP8266 and ESP32. Even if you don't use built in bluetooth or wifi on those chips, they are dirt cheap and powerful. Bonus :they have wifi on board.(and the esp32 has an wired ethernet mac too ! slap on a phy and off you go)But, the remaining dilemma is that you need to develop your software ON that processor. this requires a huge development toolchain and a steep learning curve. That thing is the remaining hurdle.If we can solve that we have a working solution.I'm amazed nobody has done an open source thing yet that does exactly that. I thought that would be the first demo for these chips. a simple demo doing browser or telnet to uart interface. all source available.

author: ve7xen
author_rank: Super Contributor
timestamp: April 22, 2022, 02:19:27 am
content: Quote from: free_electron on April 22, 2022, 12:43:23 amSure, 20 years ago when USB was hard and lots of companies wanted to bring USB to their existing UART-based designs, and allow their old UART-based software to connect to their new USB devices. Hardly anyone is building USB devices that are a UART bridge to something else these days. The software has improved, availability has improved, the legacy UART stuff is long dead, and there are Device Classes that are way more functional than a serial interface ever could be for most kinds of things you'd want to implement. And extra huge bonus for the developer, make a class-compliant device and you don't need to write a driver at all!QuoteNot really, though. There is no trivial API I'm aware of for streaming serial over HTTP, especially not without client-side javascript to handle it. GET and POST are not streaming, they are atomic. You can of course use WebSockets for this, or polling, or some old-school hacks, but you still need to implement some sort of web client to actually present a UI to the user. People have made this as a product, you can buy it for $10 on AliExpress or go Google for implementations on your favourite platform.Telnet isn't typically implemented on phones and in browsers. Widely available, sure, but it's not really that trivial either. If you really like serial, though, RFC2217 allows you to extend a serial port over the network and with appropriate support in your OS, actually bind it to a virtual serial port and connect your favourite serial client to it. It's basically just telnet with some control characters, so you can use it interactively too.QuoteI don't think you will ever get a wired Ethernet product quite as cheap as a WiFi one. Silicon is cheap. Transformers aren't.QuoteDo you even *try* to find solutions before you go ranting? I know you don't want to have to learn anything, but come on, Googling or Githubbing for projects is very low effort, considering you want someone to do all this for you. This exact thing exists for ESP as either the popular ESP-Link or ayushsharma82/WebSerial that seems to do the same thing. There are also plenty of app notes covering an Ethernet-to-serial bridge on a variety of microcontroller / RTOS / middleware combinations.

author: westfw
author_rank: Super Contributor
timestamp: April 22, 2022, 08:08:46 am
content: QuoteThank you! I'm shocked that it took so long for anyone to point that out.DECNet would set the Ethernet MAC address to a locally administered value derived from the DECNet address."Good" ethernet controllers can sometimes support multiple MAC addresses (in addition to multicast.)

author: PlainName
author_rank: Super Contributor
timestamp: April 22, 2022, 10:59:03 am
content: Quote from: free_electron on April 22, 2022, 12:43:23 amNo, I used 'PC' to mean your controlling thing, but I assumed it would be one of Windows/Linux/Mac.QuoteWell, two things there. It needs to have a common interface (i.e. fake a com port), and a browser is a common platform but it's not a common interface. You need to differentiate between using as a flesh and blood user (a browser is good) or using as an automaton (a stream API is good). Wanting to use the wrong one for the job generally leads to tears.QuoteKind of. What it needs is for someone to do all that hard stuff and then flog it burned into the chip as a serial Ethernet chip. Then you, as the end user, use it like the FTDI stuff. Currently you are aghast at doing that because you know full well how much code and stuff is needed, but if you didn't know you're just connect up the Tx/Rx wires, send a few AT commands and think how great it was.You could do that right now. Forget about shoving your networked watering system on a ESP or whatever. Just do the serial stuff once and you've made your own FTDI chip (though it would actually be a dev board, maybe a hat or something). You could even flog it to recoup investment.If not you, why would anyone else? Typically they'll have a specific itch to scratch and their solution will do exactly that. Making a generically usable interface without some overarching target it will be a part of, just because, is something companies do to try and make a buck in a saturated market.QuoteAs I mentioned before, the telnet to uart is simple(ish), but what would you do with it? Telnet is a user-level thing, and what you want is an application-level thing. That is, a com port interface. I'm sure there must be applications out there that use telnet to control stuff, but they're nowhere near as common as apps using a com port to do it.So, just two things needed:1. ESP32 with the UART/lwip/stuff flashed to it and the chip markings lasered off.2. Libs for your chosen OS (preferably all three) that fake a com port.Why has no-one done 2? That's the question you should be asking, but you're concentrating on the (solved) 1.

author: free_electron
author_rank: Super Contributor
timestamp: April 22, 2022, 02:13:40 pm
content: Quote from: ve7xen on April 22, 2022, 02:19:27 amyes i did. nothing shows up. wifi to serial i found several in various states of development, mostly never finished or broken.i am looking for hardwired ethernet to serial. ESP-link looks interesting did not find that one. probably because that is for a 8266 , not for a esp32.ESP link ticks all the boxed ( apart from wired ethernet) : remote flashing for popular micros, serial console and telnet.

author: free_electron
author_rank: Super Contributor
timestamp: April 22, 2022, 02:42:53 pm
content: Quote from: dunkemhigh on April 22, 2022, 10:59:03 amHold it ! I Never said fake com port. Hardware uart on one side , telnet port or web browser port on the other side. I do not need a virtual com port on the PC side ! Point a web browser and done. To send something to the serial port simply open a link to198.14.128.77/Send_this_to_the_serial_portreplies with a no-frills webpage with whatever was in the buffer. ( return messages are buffered in the module until fetched. )Or it could show a simple web page with a virtual terminal. looks like that is what the esp-link does.telnet is of course telnet.That is all i want to do: An easy mechanism to use a browser to send HUMAN READABLE letters and numbers to a remote serial port and fetch what is there. i don't even need anything that is not alphanumeric. (apart from a few select punctuation like : ? + - . , (so i can show positive negative numbers). Received underscores get replaced at target site to spaces so i don't have to type %20 every time result comes back as a no frills simple web page showing the content of the uart buffer.point a browser to an ip address and send simply human readable commands with the least amount of typing or zx81-style finger cramping required.QuoteOf course ! that's why i ask the question.When you need a vector drawing program , do you write one ? ( even using a toolkit ) no, you ask around what is there. sometimes you buy adobe illustrator. if you are on a budget : inkscape.So, i'm doing the same. Since those esp chips are cheap i figured someone would have done the heavy lifting by now. There is no need to reinvent the wheel every time you want to do something. So i'm looking around. i couldn't really find something on my own. I figured eevblog is full of smart people, someone will know.It just seems that forums these days are always full of replies that bring nothing to the answer. it all ends up in endless discussions about why? why this why that , cant you use xyz. ? you're doing it wrong , you're using the wrong OS , colorscheme, editor, processor, language, wearing the wrong shirt, you're stupid.mods: you can close this topic . i'm tired.

author: nctnico
author_rank: Super Contributor
timestamp: April 22, 2022, 09:08:43 pm
content: Quote from: free_electron on April 22, 2022, 02:42:53 pmI find this thread very educational. This thread lists many good roads towards a goal but if anything it also very clearly shows that how well a solution fits in the big picture is highly circumstantial.

author: martinribelotta
author_rank: Regular Contributor
timestamp: April 25, 2022, 10:34:23 pm
content: ch32v307 have ethernet 10M with MAC+PHY on chip:https://github.com/openwch/ch32v307Its a risc-v mcu at 144Mhz with 64K of RAM and 256K of flashIs like an stm32 clone but with risc-v core and similar group of IPCores (SPI, i2c, usart/uart, SDIO)

author: Bud
author_rank: Super Contributor
timestamp: April 26, 2022, 01:17:17 am
content: Quote from: free_electronThis is not how browsers work though. Browsers use HTTP *protocol*, meaning there are tags and data formatting sent that need to be *interpreted* on the other side, as well as response needs to be formatted before it is sent so the browser can understand it. Same with Telnet, which also uses its *protocol*. Your query would look more like198.14.128.77/mypage.php?data=mycommand123So your data aquisition side (say your remote sensor) has to run a HTTP server application to provide http connection AND an application that can process queries and pack response data. More, the application must be able to talk to your data source, e.g an ADC,etc. Which is custom code. I recall Lantronix provides commands relay through HTTP service to either serial port or GPIO, but I understand you do not want to use it.

author: free_electron
author_rank: Super Contributor
timestamp: April 26, 2022, 02:38:54 am
content: Quote from: Bud on April 26, 2022, 01:17:17 ami know that, but if you access a resource you get that as a string. so i would piggyback on that to avoid having to serve a real webpage. the served webpage would be a simple html page that shows the response. it woudl avoid having to build webpages and whatnot. it's just quick and dirty. it fits the simple command interpreter i built. this is a debug channel only so i can interact simply.no matter what "page" you access the response would be <ht_ml><bo_dy>whatever was received so far</bo_dy></ht_ml> (i inserted underscores so the forum would not try to render this.) but you get the idea.anyway it was just an idea.The idea was to have a simple pass-thru device that emulates a terminal. i don't need an actual virtual serial port.You now have a board hooked to a serial port , open a terminal and can type and see the serial port communication. Put this device on the existing serial port and point a web browser to it and you get the same , but running in a browser. you could develop anywhere on anything ( provided it has a webbrowser. )Something along the lines of web-serialfor 8266 but then sent transparently to a real serial port. ESP-link fits the bill but it is ESP8266 and wifi only. i want wired network and cheap (esp8266 or esp32 is not selected based on wifi, it is based off the price point. those processors are cheap. the esp32 single chip is sub 2$ and small (esp32-pico in 48 pin qfn)What i seek is not limited to that sprinkler. that is just the first application i want to use it for. The idea is to be able to plug this onto a wired ethernet network and hook up up to anything that now uses a serial port or a usb<>serial. i just need to be able to read/write to the uart using a browser. that's all. so that ESP-link fits the requirements apart from the wired network. i don't really want modules like the Digi or other platforms. just a binary i can flash onto a chip and done.I'm close now.I got cranky earlier because of the endless "noise" . Every body starts yelling to use other things but that brings no answer to the table. It is ok if you don't know the answer , or even if there is no answer ( then i'll have to make it, but its better to see if ). This is a common ailment on forums these days. Everybody has an opinion, but doesn;t address the question. i know about all those other protocols and systems, but it is not what i want. i want wired ethernet. browser to hardware serial port, bring your own cpu. Why ? Because that's what i want.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 26, 2022, 02:47:43 am
content: Many typical IoT solutions are not "local", so that may be why what you're looking for is hard to find.The typical IoT device talks to some remote server, and then the user accesses this remote server as well for the UI. The IoT devices almost never act as servers themselves.But I'm sure what you want to achieve may be interesting for others. And maybe there's some such project out there. But the way I see it, if you don't want to have to go through a remote server, you'll have to implement a basic HTTP server on the device itself. And I remember another thread talking about this.

author: free_electron
author_rank: Super Contributor
timestamp: April 26, 2022, 03:36:01 am
content: Quote from: SiliconWizard on April 26, 2022, 02:47:43 amAgreed, but this is not the intention to make an IoT device that sends MQTT or whatever to some remote service. The goal is to have a board that i do not have to sit right next to ( on my desk). Now we used a serial port or serial over USB to connect to whatever thingie we are working on.The idea is to remove the usb<>serial bridge, attach this thing to it , point a browser to it and start typing and see what comes back. basically use your web browser as a serial terminal (i don't even need VT52 emulation.)Why a browser ?- because browser are everywhere. even my TV and car have one. I can have an old netscape 1.0 on solaris or hp/ux and it would work.Why wired ethernet ?- isolation. Ethernet is by design galvanically isolated. You have a transformer on both sides.- cheap ubiquitous wiring and ethernet switches.- not "in the air" so not visible by neighbors.- seal off a protion of the network. these devices do not communicate to the outside world. they do not need "internet" access. They only talk on the local network (LAN, not WAN)Why ESP32 ?- cheap. dirt cheap . Find me another processor with ethernet mac and all horsepower for 2$. you can use standalone or as a module. easily accessible parts.

author: DiTBho
author_rank: Super Contributor
timestamp: April 26, 2022, 09:46:18 am
content: console on http

author: free_electron
author_rank: Super Contributor
timestamp: April 26, 2022, 02:31:10 pm
content: Quote from: DiTBho on April 26, 2022, 09:46:18 amexactly ! That's what i want. MY board is somewhere on my property , i can connect to it and read/write using nothing but a browser. Same as if i were using a terminal program connected to the board dangling off my machine. only , remote.it does exist :https://forum.arduino.cc/t/remote-terminal-monitor-for-esp8266-esp32/643879https://github.com/jeelabs/esp-link. This one even has a built in programmer for AVR and ARM so you can remote flash your target board.but they use wifi. i am looking for the wired implementation ( either using a phy connected to the MAC in the ESP32 , or using a wiznet 5500 . Doesn;t even have to be an ESP32 as long as it is cheap (2..3$) and simple to use (single chip, readily available)

author: nctnico
author_rank: Super Contributor
timestamp: April 26, 2022, 09:18:24 pm
content: Quote from: DiTBho on April 26, 2022, 09:46:18 amGoogle cloud computing has that. You can open a console to your virtual machine from a browser.

author: free_electron
author_rank: Super Contributor
timestamp: April 26, 2022, 10:01:59 pm
content: Quote from: nctnico on April 26, 2022, 09:18:24 pmVisual studio code has a plugin to do that. There's several libraries to implement that but they all are used with applications running on the target cpu. from a software perspective you have a serial port. the backend is a browser.I need to bridge that to a real serial port so that this thing basically becomes a hardware uart to console in a browser. bring you r own application cpu. ( could be an existing board that now uses a max232 or an ftdi like device. cut off the cable or usb bridge and slap this thing on an voila : networked console. zero software changes required.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 26, 2022, 10:21:00 pm
content: I recently built a small module with I/O and serial port using a PIC32MX and the LAN8740 PHY.Very easy to get up and running with whatever protocol you want using the Harmony3 framework.Did not need an OS to run the network, Just timers and a state machine. Very simple and worked well.

author: free_electron
author_rank: Super Contributor
timestamp: April 26, 2022, 11:19:19 pm
content: that looks interesting....

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 26, 2022, 11:26:33 pm
content: I should note that in my application I used the following protocols:UDPNTPDHCPSo at startup it uses DHCP to get an address and other configured parameters, followed by NTP to get calendar time (and set the RTC). Once this was complete the messaging system used UDP.

author: Datom
author_rank: Contributor
timestamp: April 27, 2022, 12:54:18 am
content: Here is a chip integrated with PHY，CH32V307VCT6.This board can be found on Alibaba.

author: free_electron
author_rank: Super Contributor
timestamp: April 27, 2022, 04:46:40 am
content: Quote from: Datom on April 27, 2022, 12:54:18 amThanks, but the chip itself is not readily available. Not interested in boards/ modules.@DrGeoff : i watched microchip's video that shows how to configure that stuff and even set up a console port. looks like the support telnet. that would be an acceptable solution. I think i'm going to order one of their devkits. The processor is readily available as is the phy (1.2$ for the phy. perfect ). I'm not stuck to a console in a browser, telnet is acceptable as there are telnet applications for almost anything out there. i can install on ios or android so run from tablet or phone or regular computer.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 27, 2022, 05:38:35 am
content: Quote from: free_electron on April 27, 2022, 04:46:40 amYes, it supports a range of protocols, including many TCP based ones. For my application I did not need or want the overhead of TCP, so elected to use UDP with security and integrity built in to the protocol encoding and application.FYI I used a PIC32MX675F256H as it has a small (QFN64) footprint, coupled with the LAN8740 device and RJ45 with integrated magnetics.

author: DiTBho
author_rank: Super Contributor
timestamp: April 27, 2022, 08:11:35 am
content: Yesterday I implemented the console over HTTP with a PHP script that generates the output HTML based on the output of a remote serial node, also takes input from a text area box, sanitizes it and sends it.You have a minimal HTTP-console, you can type something, press "send", the button generates an event for the PHP module, which takes the text area, sends it to the node over the serial (PHP handles the whole serial_out(), serial_in() functions) and waits for its response, which will be converted to HTML and displayed in the browser.It would be interesting to mimic what the PHP script does with a bare metal piece of C code that speaks directly to an HTTP layer without the need of a full PHP interpreter plus a PHP module attached to the Web-server (Apache2 on GNU/Linux).Here I have to think about it, but talking about HTTP server, I have also implemented a very simple HTTP server for an ARM node running ucOS/2. Here I need RTOS support, also because the node cannot be blocked waiting for an incoming HTTP connection.Certainly doable, it just needs better engineering process

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 27, 2022, 09:54:06 am
content: Quote from: DrGeoff on April 27, 2022, 05:38:35 amAs far as I can see, only the PIC32MX6XX and 7XX parts have ethernetAlso looks significantly more expensive than a 32MX1xx plus W5500

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 27, 2022, 11:51:29 am
content: Quote from: mikeselectricstuff on April 27, 2022, 09:54:06 amSorry about that, mistyped. PIC32MX675F256H is the device. I'll edit the post so as not to mislead anyone else.

author: martinribelotta
author_rank: Regular Contributor
timestamp: April 27, 2022, 02:31:05 pm
content: This is in stock at many suppliers:https://www.aliexpress.com/item/3256803997446944.html?spm=a2g0o.productlist.0.0.3bb035cb3RNNJ1&algo_pvid=585c3be8-b1d1-4da4-9580-07038f6f25ad&algo_exp_id=585c3be8-b1d1-4da4-9580-07038f6f25ad-6&pdp_ext_f=%7B%22sku_id%22%3A%2212000028311983680%22%7D&pdp_npi=1%40dis%7CUSD%7C%7C5.35%7C%7C%7C%7C%7C%40210318cf16510692881577719e015b%7C12000028311983680%7Cseahttps://www.aliexpress.com/item/1005004009053957.html?spm=a2g0o.productlist.0.0.3bb035cb3RNNJ1&algo_pvid=585c3be8-b1d1-4da4-9580-07038f6f25ad&algo_exp_id=585c3be8-b1d1-4da4-9580-07038f6f25ad-2&pdp_ext_f=%7B%22sku_id%22%3A%2212000027725660949%22%7D&pdp_npi=1%40dis%7CUSD%7C%7C5.31%7C%7C%7C2.63%7C%7C%40210318cf16510692881577719e015b%7C12000027725660949%7CseaIncluding lcsc but at this moment them only have 4pcs:https://lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_WCH-Jiangsu-Qin-Heng-CH32V307VCT6_C2943979.htmlI hope that lcsc will have more stock in the near future.

author: free_electron
author_rank: Super Contributor
timestamp: April 27, 2022, 03:02:33 pm
content: that chip is off the table. Too hard to get (digikey/mouser/avnet) and software development required. i want minimal development effort . something that is ready-to-run. Doesn't fit the requirements

author: SL4P
author_rank: Super Contributor
timestamp: April 27, 2022, 05:17:17 pm
content: QuoteIf this is going outdoors with long cable runs, why are you using ‘ethernet’ ?This is exactly what RS485 was designed for.

author: free_electron
author_rank: Super Contributor
timestamp: April 27, 2022, 05:52:49 pm
content: Quote from: SL4P on April 27, 2022, 05:17:17 pmBecause i want ethernet. end of story. this goes beyond the sprinkler system.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 27, 2022, 06:13:31 pm
content: I think you'd rather have something "ready to use", but anyway, this project might be a nice starting point if you're ready to delve into it:https://github.com/khoih-prog/EthernetWebServer

author: free_electron
author_rank: Super Contributor
timestamp: April 27, 2022, 06:19:56 pm
content: Quote from: SiliconWizard on April 27, 2022, 06:13:31 pmYes of course. no need to keep reinventing the wheel. i was hoping someone would have made such a thing already and published the design somewhere. in this day of open source, arduinos and iot you'd think this to exist....Found two that come close but do wifi.

author: CJay
author_rank: Super Contributor
timestamp: April 27, 2022, 06:30:34 pm
content: Anyone suggested W5100S-EVB-Pico?RP2040 with Wiznet chip, magnetics in a package about an inch longer than a 40 pin DIL and about $5

author: free_electron
author_rank: Super Contributor
timestamp: April 27, 2022, 06:42:11 pm
content: Quote from: CJay on April 27, 2022, 06:30:34 pmHardware is not the problem. Firmware is the problem !I don't want to delve into developing the firmware. That's the whole idea behind this. Not having to deal with that. Just like you use a usb<>serial chip. it's all done. Except in this case either console in browser or telnet on one side, hardware uart on the other side.

author: tellurium
author_rank: Frequent Contributor
timestamp: June 05, 2022, 09:11:03 pm
content: Quote from: free_electron on April 27, 2022, 06:42:11 pmMy company has a product which implements something close to what you want. It is a pre-built firmware for ESP32 (can use any ESP32-based hardware). The differences are:- Instead of terminating TCP or HTTP endpoint, it bridges to some remote MQTT or Websocket endpoint of your choice- It has a UART console, though: use can view / send to the UART remotely- Like ESP-Link, it can reflash external micros- It uses a hosted dashboard- It is commercial, though for a few devices it is freehttps://vcon.io/docs/#overview- take a look at the overview, and a quick start (an arduino is chosen there). We have users who use it with ESP-POE boards.My understanding is that you'd like ESP32 to terminate a TCP and bridge that to serial. Then, you could use netcat command from any machine to talk to serial:Code:-------------- ESP 32 ---------- --------- PC -----------|--- UART <---> Opened TCP port | -------------- | netcat IP PORT---------------------------------- --------------------We haven't added that functionality cause our users usually run their own MQTT servers on premises.

author: free_electron
author_rank: Super Contributor
timestamp: June 06, 2022, 03:55:28 am
content: This relies on another server either in a cloud (someone elses hardware , which , if goes offline you have a pile of junk. see the insteon scenario), or requires an on premises server tat also needs maintenance . That is exactly what i do NOT want.All i need to know is the local ip address of the device , point a browser or a telnet client to it and i'm up.i made a little board with an esp32 and a 2x16 lcd display. At power up it tries to connect to the network. once it obtains an IP address it shows the ip address on the display. done. i'm now working to get it running over the wired ethernet. (WIZ5500 over SPI on the ESP32)ultimately i'm not interested in using the wifi, i want hardwire ethernet (fake PoE in my case : 24V AC)there's many reasons for wanting hardwired ethernet , one being the requirement of power deliver and the other the fact that i do not like wifi. my house is completely wired with CAT6e. i only have wifi on a closed off section that is for the phone and ipads only. There's already too many radios in the air around me

author: peter-h
author_rank: Super Contributor
timestamp: June 07, 2022, 12:28:58 pm
content: QuoteEmbedded ethernet ("IOT") will always be like that. If you implement a server, then you end up in a hole because the software cannot (in most cases) be updated as new back doors are discovered. Or the open source coder got himself a girlfriend and disappearsSo any such box cannot be public facing. So, IOT boxes limit their internet profile to calling up a private server somewhere andthatimplements the link to public users. This simple strategy prevents its discovery and hacking and enables fixed (and inevitably buggy) code to run "for ever". And yes if that server goes down, your product likely becomes useless.QuoteSure, and that IP, which must be an open port (unless you do clever stuff like knocking), will be discovered by chinese and russian hackers within hours if not minutes.

author: PlainName
author_rank: Super Contributor
timestamp: June 07, 2022, 01:32:04 pm
content: QuoteI disagree with this premise. Yes, if you follow the 'standard' IoT implementation that vendors with an axe to grind implement then you will merely duplicate their issues. But that's not the only or best way.A simple solution to the public internet-facing issue is to just have it not directly accessible. Instead, it accepts only LAN connections, and if you happen to be external then you will use a VPN to get onto the LAN. There are knock-on benefits to this in that many other services (webmail, perhaps) will be useable yet not visible to the internet. And if you make it your default on-the-move connection then all your off-site communications will be secure regardless of what you connect to.

author: peter-h
author_rank: Super Contributor
timestamp: June 07, 2022, 01:46:46 pm
content: Yes, it is quite true that if you are happy to use a VPN, and you have a VPN router (VPN terminator) set up at the server end, then your box can just exist on a "local LAN". Right now I am messing around with a plain HTTP server for exactly that.That would work for a hobbyist but it won't work commercially. It would be hell to support in the long run. I've set up many VPNs and one finds that e.g. on one android device you can run PPTP but not L2TP, on another you can run PPTP and L2TP, on an IOS device you cannot run PPTP because Apple say it is insecure (BS), cannot get L2TP to work, but OpenVPN runs ok. Then on a win10 laptop you can run most but not all of them. PPTP runs on everything except Apple. IPSEC (which can be L2TP, or not, apparently) is another nightmare which cannot be set up unless you have a detailed appnote for your exact router.Of course commercial interests like to charge for the server so they get ongoing revenue but it is also the only "smooth" way to make it work. You can then also do firmware updates, by the product checking periodically for new firmware, and you can make these S/N range dependent, etc. And it sidesteps the authentication issue, because your box needs to contain only the one certificate.

author: PlainName
author_rank: Super Contributor
timestamp: June 07, 2022, 01:56:43 pm
content: QuoteIndeed. Part of the reason for the IoT home-phoning is because it's dead simple for the end user to set up. I suspect that any data-sucking and brand lock-in came as a side effect of that rather than being part of the design spec.But I wasn't aware we were talking commercial systems. At least, we weren't at the start and if we are now I missed the transition.

author: free_electron
author_rank: Super Contributor
timestamp: June 07, 2022, 03:24:59 pm
content: Quote from: peter-h on June 07, 2022, 12:28:58 pmyou have not read the premise :- no INTERNET connectivity ! ( that's why i don't want wifi in the first place ! i can see too much stuff in the air already as it is)- exists on a closed off LAN that is visible ONLY inside my house , wired and through a dedicated VPN (so i can get to it from anywhere in the world. i use ubiquity teleport)- devices need no external server or translators. have IP , will telnet or point browser.- they can talk to each other by send UDP- not required to have a centralized command and control server. Any device can run standalone. i can connect to it from a laptop , my tv , or anything else that has a browser. if i want a "master" i can make one, but it is not required. For example : a lightswitch. if i want to set it to turn on at 7PM and off at 9PM that is stored IN the switch. it does not need a server to do that. a remote button stores the target device and the command to be executed. if i press that button the message goes directly to the endpoint. There is no 'central' server. The devices basically are input , or output. If an input generates an "event" it sends to the targets. in the future devices can interrogate other devices. Each devices has a scripting engine onboard so i can do whatever the heck i want. if i want to make a nice UI i can do that on one device that passes the commands to the targets. but it is NOT mandatory.i had a central server from some company years ago (wink) that had all kinds of radios (wifi, zigbee,z-wave, lutron , 458Mhz 422Mhz , bluetooth). a botched firmware updated and i had to send it in to be replaced. two years later they decided the device would no longer be supported and you had to upgrade to the new hardware. i did not upgrade and all of a sudden nothing worked anymore. Now there is that insteon case. I had a Vera , a logitech device, a Smartthings (samsung) , a wink , a nest ... they are all bricks now... There is always something that doesn't work , is not implemented, security leaks that aren't plugged, or it gets discontinued.i'm done with all that crap. Cloud ? that's just someone else's hardware and their business model is to grab your money.Like the stereotypical old codgers say : Get Off of my LA(w)N !that's it. no more, no less.my first target is a sprinkler controller. a node has 8 outputs and the "sprinkler program" is stored on the node. the program is nothing but a simple table with start day-of-week mask , starttime ,channel(s) and runtime. i have several clusters of valves on the property so these devices are sprinkled throughout. i use a phantom 24v feed ( sprinkler valves run on 24AC) and use simple CAT5e cable. one TX pair, one RX pair and the two other pairs are phase1 and phase 2 of the 24vAC. I have direct burial ethernet cable.before you start suggesting other commmunication methods : there are many many reasons- that again requires a centralized translator from telnet/browser to whatever protocol.. that translator goes down : game over. and whenever there is a new device that translator needs work to support new functionality. NO COMMAND SERVERS ! every nod needs to be able to stand on its own and communicate on its own.- ethernet is inherently galvanically isolated- cheap switches, plugs , cables and other hardware available.- point browser and run- can coexist with your existing network infrastructure. have a free RJ45 ? plug it in and go. need additional ports somewhere ? add a 15$ switch...- it is a distributed network. ethernet can run headless. a cross cable ( even that is not needed anymore : everything is auto MDX these days) and you are up.- it's 2022. ethernet should be easy by now , just like we have easy usb with the FTDI and other chips.

author: peter-h
author_rank: Super Contributor
timestamp: June 07, 2022, 04:09:48 pm
content: QuoteIt doesn't actually matter; the mere fact that there is a response on some IP (and with TCP/IP there always is, which is how sniffing works) means itwillbe attacked.So you need to be happy with your VPN router's lack of vulnerabilities, for your application.I also think IOT will get itself a really dirty name eventually, as the servers go dead over time.QuoteI must be missing something, but the only way you can achieve remote control without the internet is some kind of dial-in. That needs a modem if you want to send data. In the 1980s I designed a box which plugged into a phone socket, on an incoming call it went off-hook, and listened for DTMF tones (the caller had to use a tone keypad) and it operated a bank of relays based on the tones. No CPU - look up an MT8870. For data, you will need a GSM modem (something like the old Siemens/Cinterion TC35; I have a fair few for sale here) with a SIM card. Or an analog modem on a dedicated phone line. That is how remote control of heating systems, PABXs, etc, was done ever since the 1970s.

author: rstofer
author_rank: Super Contributor
timestamp: June 07, 2022, 04:53:30 pm
content: Quote from: free_electron on June 07, 2022, 03:24:59 pmI always planned to do something like this although global connectivity isn't required. Consider:https://www.orbitonline.com/products/b-hyve-smart-indoor-outdoor-irrigation-controllerI have the 12 zone version for most of my timer needs and plan to add another smaller unit for the far back yard where I have another 4 zones on a conventional timer.I like the automatic rain delay and freeze delay options. Apparently, the unit checks in with the weather service!I like getting notifications on my cell phone and I especially like being able to wander the yard while controlling the zones from my iPad. This is a really nice product. Yes, it connects to the web and the factory can find it by MAC number so that helps with customer service. The unit has both Bluetooth and WiFi for local connectivity.As to the original question, I like the NXP LPC1768 mbed module. All I had to do was add a MagJack. The online tool setup includes lwIP so Berkeley Sockets is trivial.

author: CJay
author_rank: Super Contributor
timestamp: June 07, 2022, 05:35:18 pm
content: Ahh, now I understand.You're looking for something like a Siemens LOGO PLC.https://uk.rs-online.com/web/p/plcs-programmable-logic-controllers/2097105There are hundreds of similar products, they're easy to program, will run stand alone if diconnected from your LAN, generally run from 24VDC with a reasonable input tolerance, they meet all your requirements (not 100% it's UDP but they can talk to each other).Only problem?Not cheap but you do get a lot of bang for your buck.

author: peter-h
author_rank: Super Contributor
timestamp: June 07, 2022, 06:50:22 pm
content: One can also do quite a lot with SMS.Again you need a GSM modem but the software is very simple because those modems implement it all with AT commands. The ones I mentioned can even send/receive emails.But anything with a SIM card needs either a contract SIM, or a PAYG SIM with a regular chargeable event generated to stop it expiring. I have been selling a product for years which does that. And there are many remote control products which use SMS.

author: free_electron
author_rank: Super Contributor
timestamp: June 07, 2022, 07:20:01 pm
content: Quote from: peter-h on June 07, 2022, 04:09:48 pmI Never said remote control, network is not internet . I Want these devices on my LAN but not on the WAN. I can see them by pointing a browser or telnet from wherever i have access to that LAN. if i want to control it from somewhere remote i connect to the VPN and can see them safely. They don't need security. The security is the VPN Security is an endless cat and mouse game for these kind of things. It's a waste of effort. Every new vulnerability requires you to update and patch devices. I Simply don't bother with it. I have virtual LANs handled at the switch level. Certain ports are assigned to create a sub LAN. That LAN is connected to one VPN. So all these devices only see each other. They do not see "internet" traffic on their LAN, nor can they reach it. If i need access i can open a VPN tunnel to that LAN. Traffic there is restricted to specific ports. So the security is handled on the routers and in the VPN. They are the firewall.These devices only talk to each other they do not send anything elsewhere. if you need a status you need to poll them. i could envision a control application running on a tablet that can visualize or control , but that needs to be on the same LAN . there is no WAN access.Data shall not leave my house. Get off of my LAwN

author: rf-fil
author_rank: Regular Contributor
timestamp: June 09, 2022, 07:29:22 am
content: Any time you need Ethernet (which implies IP and then UDP or TCP), you cannot use an MCU, except for hobby projects. Why? Security and network stack maturity. The use of IP and above requires a fully patched up-to-date secure stack. The only such thing is Linux, so you need an SBC or SoC that can run up-to-date Linux.With an MCU, you have to use some crapola like lwip, which is full of security holes and lacks many required features.The next problem is, it's never just IP and UDP. It's always another protocol or a security requirement as well. None of which exist on an MCU. Basically, if you can't run an up to date TLS on your platform, you can't have network connectivity.Products that ignore the above hard earned lessons are the reason for the "internet of shit" label.I've learned this some years ago when my then boss insisted on writing a STM32F4 based internet-connected device. My boss's company lost a lot of money on that idea, and almost ended up being sued. An example: we had to write nsupdate from scratch because there was no STM32 implementation. That's the case with many things that come out of the box with Linux.

author: PlainName
author_rank: Super Contributor
timestamp: June 09, 2022, 09:43:11 am
content: QuoteSurely if it has the features required then it doesn't matter if it lacks extra ones.For instance:QuoteI am wondering why a STM32-sized thing would need to use nsupdate.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 09, 2022, 09:50:10 am
content: Quote from: rf-fil on June 09, 2022, 07:29:22 amWiznet might have something to say about that.

author: voltsandjolts
author_rank: Unknown
timestamp: June 09, 2022, 12:26:36 pm
content: Quote from: rf-fil on June 09, 2022, 07:29:22 amTIFIFY

author: free_electron
author_rank: Super Contributor
timestamp: June 09, 2022, 02:17:12 pm
content: Quote from: rf-fil on June 09, 2022, 07:29:22 amno you don't . not if you are running on a closed network that has no access to the outside world.As for linux , that is also an endless patch cycle. good luck updating your devices. they all use different distro's, the binaries are tied to the hardware used which is secret sauce, so you won't be able to compile from source, the source isn't even available, and you are endlessly stuck waiting for the device manufacturer to release updates... if the manufacturer still exists or supports your one year old device. no thanks. i learned my lesson with my last blu ray player. there are no more updates and it refuses to read the newer disks. i chucked everything in the bin , discs and all. i'll stream from now on.Quotei agree. the internet is full of shit products.That's why i keep my stuff OFF the internet. it only exists on a closed off lan with no visibility beyond the router. if i need remote access it is done through a VPN tunnel. the router is the firewall.

author: free_electron
author_rank: Super Contributor
timestamp: June 09, 2022, 02:22:36 pm
content: Quote from: CJay on June 07, 2022, 05:35:18 pmno i'm not. i am looking for a device that is cheap , can be soldered down , easy to program, has built-in , hardwired ethernet and handles the entire network stack ready done so i don't have to mess with sourcecode, protocols and the stack. it has to be SIMPLE to use without having to delve in millions of lines of code and fixing someone elses crap. it must be as simple as using a usb<>serial chip. it's all done. you have a simple pipe , bot h sides are handled.in my case : telnet or a browser on one side , 5 or 6 ready made routines on the other side. it would be perfect if there was something that did telnet to uart. that way i can use whatever client i wanted , and connect it to whatever platform on the other side.

author: free_electron
author_rank: Super Contributor
timestamp: June 09, 2022, 02:30:36 pm
content: Quote from: rstofer on June 07, 2022, 04:53:30 pmi have the Xr machines.the problem is you cannot actuate more than one valve at a time !i want to be able to do this- open valve 1 for 1 minutes- open valve 1 AND 2 for 5 minutes- close valve 2 and keep 1 open for 1 minute.i have fertilizer injectors. once a week , or every other week , certain circuits get fertilized. there are different fertilizers ( grass, fruit , vegetables etc ).so the thing is i need to flush the main line (there is 1 water line going around the property. the fertilizers are stored in a central location) before switching.start with the lawn :flush line by spraying the lawn with wateradd lawn fertilizerflush line while keeping lawn watered.once the line is flushed switch to fruitstart watering fruit treesinject fertilizerflush linemove to next.why do i want this ? cause its a cool idea and fun to make. why do i want lan ? already explained before. in 2022 network should be as simple as usb to serialit doesn't stop there. i can add soil moisture sensors, rain sensors, pluviometers , simply plug anything on the lan.a closed off network (so no security risks) where you can plug anything you want.

author: peter-h
author_rank: Super Contributor
timestamp: June 09, 2022, 03:50:05 pm
content: QuoteThat's partly what I wrote above. Plus a means of updating the firmware with network patches etc which is generally not possible with embedded products. And if you did implement some auto-patching scheme (e.g. the box accessing some server periodically and downloading new firmware) then you could get wiped out if there is an issue and the 10k boxes you sold get bricked.That's why "IOT" products will never work reliably enough (as a product category) if on a public IP. It used to work OK enough e.g. the AXIS ethernet webcams have had an HTTP server for many years and if you opened up port 80 in your router then you could watch your webcam remotely. It was ok because the main vulnerability is that if the pwd is bypassed, somebody can watch you undressing(and there was a huge crowd, probably millions, specialising in webcam hacking, for this reason, since there was a way to find these webcams with google). But as soon as there is potential for real inconvenience e.g. turning off your heating, or setting an irrigation system to empty itself in an hour, this won't work anymore.The above does not mean it cannot work, but as a manufacturer you have to limit the possible damage from hacking, today and for ever, so "IOT" stuff has to be "hidden". No publicly facing servers. It has to act as aclientand call up aprivateserver, and only that server (running unix, so zero bugs) is publicly accessible.QuoteNo such thing; it will only be as secure as your VPN router.

author: free_electron
author_rank: Super Contributor
timestamp: June 09, 2022, 04:06:37 pm
content: Quote from: peter-h on June 09, 2022, 03:50:05 pmunix...lol. by the time we figure out what distro, color scheme , what desktop and if we are going to use vi or emacs i'll be dead. no thanks. no operating systems.The Xerox Alto did ethernet purely made with 74xx series TTL. it didn't even have a CPU ! (ok, it was at 2.5Mbits/s but it was ethernet )now we have multicore billion transistor devices with megabytes of ... what exactly ? security holes and problems.QuoteNo such thing; it will only be as secure as your VPN router.Well since that is already the guard to my house... if that gets breached it is over anyway. I'd trust a big networking kit maker more than some small company that makes a wifi light switch that , for every action, sends a ton of data to some server china, and then that server turns on the light.. talk about opening your network to others.old codger voice : GET OFF OF MY LAN !

author: PlainName
author_rank: Super Contributor
timestamp: June 09, 2022, 04:26:52 pm
content: QuoteI must be missing something. If you have the latest and greatest SELinux installed on your box, having the password guessed will lead to just as much aggro as on your simple Axis camera, wouldn't it? No amount of bloaty OS is going to protect a password.But, actually, I think the real problem with that camera is HTTP - pick any 2048-character password and it can be read off the wires in plain text, so switching to HTTPS would fix that one. And you don't need full-fat Linux to have HTTPS.What helps make stuff secure is designing it with security in mind. Don't read a 200K input into your 50-byte line buffer without checking if it's about to burst, for instance. Allow better passwords than a 4-digit PIN, etc. I think many of the issues with easily hacked IoT stuff is down to programmers using some library off github without understanding what it does, or how. After all, if one did know then one probably wouldn't have to use someone elses un-audited code to save a bit of time. And arguably that kind of thing will be for the Arduino-style stuff, which may be where small things get a bad reputation. But just watch for Pi's becoming the norm and suffering the same sort of thing, despite the underlying OS.One thing worth bearing in mind: roll your own features and that's all there is. Run a mainstream distro and a dodgy password gives the hacker a treasure-trove of utilities (like nsupdate, perhaps).

author: CJay
author_rank: Super Contributor
timestamp: June 09, 2022, 05:25:31 pm
content: Quote from: free_electron on June 09, 2022, 02:22:36 pmTelnet to serial in an easily integrated, solder down module is a product I've been working with and supporting in (now legacy) products for nearly 2 decades and we weren't early adopters.I suggest you define your requirements properly (because they seem to keep changing)and then hit up Google because I found at least 5 products well under $10 that do telnet to serial over wired ethernet and I didn't bother to look further than the first page of results.

author: free_electron
author_rank: Super Contributor
timestamp: June 09, 2022, 07:01:43 pm
content: Quote from: CJay on June 09, 2022, 05:25:31 pmno modules. bare chip. either ready flashed or buy chip and flash binary yourself.requirements are simple enough:- browser to uart (preferred) or telnet to uart (backup)- ability for device to other device communication (after configuration of course) to run on parallel with browser or telnet. basically the browser or telnet port needs to replicate what it sees on the uart. it is ok to have a 'protocol' on top of the uart (like an AT command set) as long as it is human readable.browser mode : open an internet browser and point to an IP address. i get a simple webpage with a text entry box where i can type some text and click 'send' Sent text arrive on uart TX pin. Another textbox shows me whatever the uart gets on its RX pinTelnet mode : same as above but not a webpage of course. standard telnet app.direct mode : runs parallel with above modes. This uses a 'command' mode. for example the string !@!192.168.104.01 would set the target device to the given IP address. any subsequent activity on the uart RX pin is sent to that IP address to exit on the TX pin there . the same data should also appear on the browser or telnet session if running. data from the browser or telnet session only to the attached devicethat is really all i need.

author: peter-h
author_rank: Super Contributor
timestamp: June 09, 2022, 08:50:39 pm
content: QuoteThis is now getting well off topic but... nobody but a serious adversary is going to be "reading stuff off the wires".Also any "simple HTTPS", as a server, has the long term problem that, being embedded, it will have a self signed certificate (not a proper signed one, because you can't keep updating the root certificate store on it) and eventually browsers will block access to such servers. Chrome already make it difficult to access HTTP, or HTTPS with a bad certificate.The product I am working on has a TLS server, and it works, but it cannot be used for anything due to immediate customer non-acceptance (browser warnings of your imminent death). Also MbedTLS needs about 50k of RAM for each instance so to do both client and server needs 100k which is too much. And on top of that it would need 200k to manage the ~130 root certificates IF we were somehow storing (and updating) them!This is yet another reason why IOT calls up a private server. You maintain a fresh certificate on that server, only.

author: PlainName
author_rank: Super Contributor
timestamp: June 09, 2022, 10:38:40 pm
content: QuoteYou're waiting at the airport bored to tears and just want to check you didn't leave the back door open. There's your password gone - not a serious adversary, just a script kiddie playing MitM with the airport WiFi.Of course,youwouldn't get caught out by that (and neither would I, now, although I might've been a while back), but if we're talking edge cases then pretty much none of this discussion is applicable.QuoteYes, indeed. But you don't need a Linux PC to do that.

author: peter-h
author_rank: Super Contributor
timestamp: June 10, 2022, 06:36:47 am
content: For remote, I use HTTPS or a VPN. For a start you cannot have Remote Desktop on an open port, and this was an obvious weakness even when PC/Anywhere was the popular choice.Most web servers are unix. Most virtual server packages give you e.g. LAMP (Linux, Apache, MySQL, PHP). I "run" a number of websites, all on such servers, and from the lack of apparent hacking, even some which have not been updated for 10+ years, I think the weaknesses these days are not in the OS or the web server but in the applications running e.g. XSS on a website. So it depends on the functionality you have there. If say you have a forum then your biggest hassle will be chinese and russians spamming it with fake passport advertsIf you run an online shop then it will be bots filling it up with bogus shopping trolleys. If you run an IOT server then what functionality will you have there? Perhaps some simple UI for controlling the irrigation system, but you will need a login to get in, and that may be HTACCESS which is evidently secure.

author: free_electron
author_rank: Super Contributor
timestamp: June 10, 2022, 01:11:53 pm
content: NO SERVERS !.like i said. each device runs standalone. point a browser or telnet to it and you get the equivalent of a "command prompt": you send text strings into the device and the device answers with other text strings.it does not have any other user interface. you need to know its command set.

author: PlainName
author_rank: Super Contributor
timestamp: June 10, 2022, 02:04:01 pm
content: QuoteYou keep saying this, and I keep wondering what it gets you over a box that does the networky stuff and acts as a hub using something simple and appropriate like RS485 to the devices. The only thing I can think of is WiFi ability, but you've explicitly ruled that out.You have to run network cables and power to these things, so proper comms and power isn't any different. You're complicating the devices by adding Ethernet and TCP/IP to them. OK, so they are standalone, but they have to connect back to some hub (unless, WiFi) so that Ethernet switch isn't any different to a protocol converter hub.That hub would be easy to implement whatever front end you want on it. Telnet in, type 'sprinkler1' and there you are at the sprinkler1 command line to do what you want. But, if you wanted, you could have a web GUI and point to the sprinkler1 graphic that shows it, ah, sprinkling and click 'stop'. Or pop up a command prompt to type whatever weird command you've implemented on it.It makes sense to me to keep the devices simple. Tiny MCU, relay, interface chip, bosh. I am failing to see what adding complexity and bloat (and cost and failures) gives you apart from having to either keep updating DNS or have a cheat sheet of IP addresses.

author: free_electron
author_rank: Super Contributor
timestamp: June 10, 2022, 05:13:22 pm
content: Quote from: dunkemhigh on June 10, 2022, 02:04:01 pmbecause its 2022 and i expect ethernet to be as simple as usb to uart is . that is the real answer.the secondary answer is that my entire property is ethernet wired , all the way to the back shed. so plugging devices is easy. even managed ethernet switches are cheap these days (mikrotik) .it goes beyond that sprinkler controller. that is just step one. it can be all kinds of devices. if i want a camera somewhere : i have ethernet ready.ethernet is distributed , galvanically isolated, bus . i only need one bus in the entire home. i can plug anything. no need for translators. if i want to add some wireless devices they can go on the wifi. it is all one network of things.if i want remote access i run a VPN. (i have two properties and they share one network through a VPN link. so it doesn't matter where i am : i can see everything. for example i have a NAS in both locations. one replicates itself to the other. )It is more of an experiment than anything else but one with a purpose. It would be great to be able to release a firmware that does exactly this on a cheap device. it exists for wifi on esp32 and esp8266. those are cheapBut it does not exist for wired, in the sense there is stuff out there but it requires handling the networking on your target device. It really needs to be ethernet to uart. The target is unaware where the data comes from. It comes from the uart. Just like when you are using a usb to uart. it's a pipe.This is what i am working on (in flux. evolves...)the device is a network bridge. the application is your processor dangling off the uart.- Ethernet auto mdx to a magjack with ACT and LINK leds 10/100TX- Two wire uart (TX RX) programmable baudrate but always 8n1.- TXEMPTY output: BRIDGE can accept uart data, uart buffer is empty- HOLD input : application you can tell the BRIDGE not to send data on the uart. the application is not ready to take uart data.- DAV output: bridge has data- INTERRUPT output : if something BRIDGE has received something that is for us . programmable OR logic-- Pulse per packet: every time there is a packet with our ip on it.-- goes high on reception, but only goes back low if incoming (from network) buffer is empty-- loss of network-- acquisition of network-- buffer overrun from uart : application is blabbering too fast.-- buffer overrun from network : application is stalling (via HOLD)- Net_ready output : goes high when bridge have a working network( IP obtained and ready to roll )- RESET input : resets bridge and flushes uart buffer. falling edge sensitive. deadlock cannot block reset- FLUSH input : flushes uart buffer (both). rising edge sensitive. so a deadlock cannot block the buffers.- i2c port. Here you must wire an 2402 eeprom holding mac address , static ip if set , uart settings and other options. it also supports a 2x16 lcd display. if display installed : top line shows your ip address , bottom line uart speed and some status indicators. no guessing. If i can get on-board eeprom working this will be optional. But the advantage is that, if the eeprom is missing (or corrupted : you remove it) it defaults the uart. Hook up the display and you see what is going on. I may go for a DEFAULT input pin . If you pull that one the device shuts down network and goes into CMD mode with 9600 baud. Have not made up my mind yet. it needs to be fool proof both for recovery , initialisation and usage- cmd/data input. To configure from uart : pull line low and execute commands (configuration). If this input is high it is a data pipe. Data passes through. There is no configuration from network side or in data mode. If eeprom is blank this defaults the uart to 9600,n,8,1. If eeprom has settings then it stays in those settings. I do not want to encumber the user with things like AT commands or using special characters(or sequences). in DATA mode it is a pipe. just like uart to usb is. CMD mode is for initial configuration during build.- watchdog output (programmable functionality) this is a logical OR from several functions that can be enabled/disabled. should be tied to application reset pin-- no data from uart for X seconds (application locked up)-- no packet for us for x seconds (network locked up)-- replication of NET_READY pin (this can hold application in reset until network is ready)-- receive buffer full (application has locked HOLD pin and bridge has buffer overflow... so application may be in deadlock-- watchdog is disabled in CMD mode-- activate on 'magic packet' reception. this allows a remote entity to reset the application. i'll probably use a specific port for that. ideally there should be no need for this. the other watchdog functions can handle this. you can just send a very long packet to overload the uart buffer.something along those lines. right now im attempting this with esp32 + wiz5500 but i would like to see this as a simple to use single chip. PIC18F97J60 is a possibility.

author: PlainName
author_rank: Super Contributor
timestamp: June 10, 2022, 05:34:27 pm
content: QuoteWell it's an inappropriate one. It's essentially reinventing the wheel because nowadays you can have blue rubber instead of black (but it's softer so needs netting to keep it in one piece, etc).QuoteBut that is a much better reason and should be the primary one

author: free_electron
author_rank: Super Contributor
timestamp: June 10, 2022, 06:20:54 pm
content: Quote from: dunkemhigh on June 10, 2022, 05:34:27 pmlet me rephrase that : it's 2022 and we SHOULD have ethernet to uart, just like we have usb to uart.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: June 10, 2022, 09:28:46 pm
content: Quote from: dunkemhigh on June 10, 2022, 02:04:01 pmBecause you are over thinking it. Forget TCP, just use UDP and a simple point-to-point messaging protocol (effectively emulating RS485). You don't need TCP, you don't need web servers, it just adds overhead and security problems. The solution really is trivial.

author: coppice
author_rank: Super Contributor
timestamp: June 10, 2022, 09:46:42 pm
content: Quote from: free_electron on June 10, 2022, 06:20:54 pmThe production volumes for ethernet to UART products are impressively high.

author: free_electron
author_rank: Super Contributor
timestamp: June 10, 2022, 10:13:30 pm
content: Quote from: DrGeoff on June 10, 2022, 09:28:46 pmNo udp. Telnet and or browser (preferred) interface. it needs to be accessible with readily available tools. Anything these days has a web browser. even my TV and car have one. Have ip address, will browse, or telnet.dont want to invent yap (yet another protocol)

author: free_electron
author_rank: Super Contributor
timestamp: June 10, 2022, 10:15:27 pm
content: Quote from: coppice on June 10, 2022, 09:46:42 pmthat's what they said for USB too. oh it's so easy ... given the success of these usb to uart devices.. someone is lying about the ease of use...same is true for ethernet/wifi. it is NOT easy. tons of code, bugyy , difficult libraries. same misery as usb was/is.we have bluetooth/uart and usb/uart.anyway all these points are moot.

author: coppice
author_rank: Super Contributor
timestamp: June 10, 2022, 11:12:19 pm
content: Quote from: free_electron on June 10, 2022, 10:15:27 pmI didn't say they were easy to make. The software to do it well, and follow standards, is fairly complex. However, people have worked that out for a few MCUs. I've no idea how to get access to suitable software in the west, but interface makers in China mostly seem to be using similar software, so I guess there is one key source.

author: tellurium
author_rank: Frequent Contributor
timestamp: June 19, 2022, 06:57:25 pm
content: Quote from: free_electron on June 10, 2022, 10:15:27 pmNot sure that will help at all, but just FYI - we've added a uart/wifi bridge reference app for ESP32,https://github.com/cesanta/mongoose/tree/master/examples/esp32/uart-bridge