How would you add ethernet and WiFi connectivity to a embedded device? - Page 1
Forum section: electronics / projects

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 08, 2021, 08:38:04 pm
content: Which components and software tools would you suggestto provide cable/WiFi access with:* TCP/iP socket connectivity* A browser* Other methods?

author: IDEngineer
author_rank: Super Contributor
timestamp: April 09, 2021, 12:43:08 am
content: That's a very, very broad question. You need to be more detailed.If what you want is a one-off ability to interact with an existing CAN network, buy one of the many CAN-USB interfaces (~$200), connect it to a laptop (likely free if you use one already lying around), and use Remote Desktop (free) over Ethernet/Internet/whatever (existing). Bingo, you have remote CAN I/O from an arbitrary distance for about $200.If you're trying to do something else... please describe it.

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 09, 2021, 03:49:03 am
content: I want to add a GUI to my device.A smaller, less complicated and less expensive GUI than the current CAN connected PC I already use.My phone for instance.How do I add a WiFi and ethernet connected web interface to my device?So it can be accessed with a web browser?Ignore the CAN side of it.It’s the ethernet WiFi part I am unfamiliar with.I want something like the web interface of a modern mesh router, but more responsive.What is an efficient way to add a web interface to a embedded device?I think I need a ESP8266, a Lantronix XPORT AR or similar device.That is where I need help.How is this best done?Edit: More specific question

author: Berni
author_rank: Super Contributor
timestamp: April 09, 2021, 05:42:32 am
content: Yep just get a ESP32 WiFi module and hook up a CAN transceiver directly to that since it has a built in CAN controller.These ESP32 are not just a "WiFi adapter" but its a full micro controller with WiFi as a peripheral. So you can just write your code to run inside the ESP32. It also can handle the job of serving a website on this WiFi just fine too.As for Ethernet, this is typically done by simply picking a microcontroller that has a built in Ethernet controller, this typically needs external PHY chip that takes the RMMI MMI GMMI..etc interface to actually drive the Ethernet lines.But if you are not actually making a product and just need a quick one off solution then just get a Raspberry Pi and buy a CAN interface board for it, then develop your web application in pretty much anything since its linux.

author: kripton2035
author_rank: Super Contributor
timestamp: April 09, 2021, 06:19:57 am
content: you can use one of these esp32 modules with ethernetyou have to provide the esp32 controller with your own program to handle the CAN bus and wifibut there are a lot of examples on the net.https://www.seeedstudio.com/Ethernet-module-based-on-ESP32-series-WT32-ETH01-p-4736.html

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 26, 2021, 11:28:51 pm
content: Once the ESP32 module is connected to:* My device, via SPI, I2C or UART* To a browser, via WiFIWhere is the web page stored, the ”index.htm”?* My device?* The ESP32 module?* Elsewhere?What tools are needed to build the web page?Are there well designed and documented kits on the market, to get started?How is all this done in ”real” products, such as a router?

author: kripton2035
author_rank: Super Contributor
timestamp: April 27, 2021, 06:10:05 am
content: first google returned page with "esp32 index.html" search termhttps://randomnerdtutorials.com/esp32-web-server-spiffs-spi-flash-file-system/the index.html is stored in the esp32 module. you can program all this with the arduino IDE.

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 27, 2021, 03:43:06 pm
content: Are the ESP devices and the Arduino tools suited for serious long time industrial applications?Or are they mostly toys, for limited hobby applications?

author: kripton2035
author_rank: Super Contributor
timestamp: April 27, 2021, 04:12:58 pm
content: please define the boundary between hobby and industrial ?and don't forget that the majority of all 3d printers on the market have an arduino inside...you can alwaysd make a working prototype using the esp32 and arduino IDE, and then use the official expressif framework c++ thingto program it in an "industrial" way ?

author: Syntax Error
author_rank: Frequent Contributor
timestamp: April 27, 2021, 04:31:04 pm
content: If you are on a greenfield development, you could always use a SOC chip with the wifi, ethernet and USB built-in. Just add flash and DDR ram. An Atheros 9331 is a good starting point as it has open sourced drivers and good Linux support.

author: AndersJ
author_rank: Frequent Contributor
timestamp: April 27, 2021, 05:45:19 pm
content: Quote from: kripton2035 on April 27, 2021, 04:12:58 pmIndustrial products may need to be produced for 10-15 years, and then supported for another 10.They may also need to be 3:rd party certified for EMC and safety, FCC, CE, CSA, UL and more.Are Arduino software packages, TCP/IP stacks etc, certified?How long lived are ESP32 and similar devices?Are they single source?Do they work well enough to be used in safety critical applications?Etc, etc, the list can be long.

author: technix
author_rank: Super Contributor
timestamp: April 28, 2021, 03:14:07 am
content: What I have came to mind is to stick a Raspberry Pi Zero W to it if it is a one-off project. Use MCP2551 and MCP2515 to implement the CAN interface, then program the user interface using whatever Web programming tool you find comfortable and stick it to a lighttpd or nginx Web server. Then maybe install avahi-daemon so the phone can do dynamic host discovery. As of the phone, just use its Web browser.

author: Berni
author_rank: Super Contributor
timestamp: April 28, 2021, 05:21:51 am
content: Quote from: AndersJ on April 27, 2021, 05:45:19 pmYou can't just throw around things like certified and safety critical without a standard to go with it.Something that is certified to meet the CE standard (required to put things on the EU market) will most definitely not pass certification for use in an explosive atmosphere (required for use in something like a refinery) or certification for use in automotive (that may vary a lot depending on what the component is for and where it is mounted)The common certifications like FCC and CE mostly involve making sure your device doesn't emit interference and is resilient to outside interference. With good design practices they are usually not that hard to pass. If you use a WiFi module with a FCC number then you just use that to skip the more complex intentional transmitter tests. The normal tests are just a day of testing and a grand or two for the paperwork to go with it.As for safety critical... well i think we all agree given the reliability of WiFi, this thing should never ever EVER be used for anything safety critical where a dropped connection might result in 5 figure damage and/or a dead body. So you better have a sizable bribe ready to get anyone to certify that and a sizable amount of money for the lawyers afterwards.