0

For a start my intention is to make a simple webpage with a couple of virtual buttons to control PWM signal. My board is STM32F429I-DISCOVERY with STM32F429ZIT6 microcontroller and 320x240 color touchscreen LCD. Currently I'm running on MBED platform.

First what I tried is to find any ready-to-use solution like "mbed web browser" or "stm32 web browser", as I thought that it is the right thing to display a web page. However - nothing useful found. Why am I stuck to web-page as a human-machine interface? I think that web-page is scalable so despite the fact that my project can be solved with a couple of drawn rectangles I'd like to try something beter and flexible.

Questions:

  1. Is it ever possible to display a web-page on a such weak device as my board is?
  2. How about Javascript? I think that it would be the only way to interface between the web-page and the hardware. Or there is another way?
  3. What can you recomend to search or use for my case?

Thank you in advance!

Roman Matveev
  • 2,942
  • 7
  • 32
  • 75
  • 1
    You haven't linked to the datasheet for that STM device. The first requirement for displaying a web page is to have a web browser. Does it have one? What OS is it running? – Transistor Sep 29 '18 at 17:45
  • @Transistor So what I need to know is how to make this platform ready to display a web-page. Regarding your comments: I made some edit to the original post. Please check. – Roman Matveev Sep 29 '18 at 17:56
  • I know nothing about that product but from a quick scan of the product brief I can't see any Ethernet port so I don't see how you'll connect to a web server. I think you need to edit your post again to outline your plan. – Transistor Sep 29 '18 at 18:26
  • I don't think it's feasible to do this, and even if it is, it's overcomplicating things massively. You shouldn't write an entire javascript engine just to interface to your hardware. – Hearth Sep 29 '18 at 18:52
  • @Felthry I would nether make such job as "write an entire javascript engine". I tried to find any ready-to-use solution as it is available for more powerful platforms. – Roman Matveev Sep 29 '18 at 18:56
  • @Sparky256 who said anything about Javascript? The asker *controls* the documents to be rendered, they can choose what to support. – Chris Stratton Sep 29 '18 at 21:44

3 Answers3

4

I am not aware of any webbrowser that could run on such a bare-metal system. A webbrowser is a BIG application, I doubt it would fit if anyone would try it.

My advise is to drop this line of tought. If you want a webinterface, serve the webpage (for instance to a mobile phone). If you want an interface, check for a graphics library. But it will be a LOT more work than you imagined.

Wouter van Ooijen
  • 48,407
  • 1
  • 63
  • 136
  • This processor has 256K of RAM so knowing that on the PC one instant of Chrome usually takes tens of MEGAbytes or at least hundreds of kilobytes I have to agree with you. Thank you for the answer! – Roman Matveev Sep 29 '18 at 18:53
  • It actually is *possible* for basic meanings of "a web browser" - but it's also extremely unwise as a way to solve any practical problem. – Chris Stratton Sep 29 '18 at 21:34
2

The usual approach with this sort of hardware is to use whatever graphics library that is available for the mbed (and the display) to build a small custom GUI that runs locally. This software would then communicate with the server using TCP/IP.

You can even use HTTP to communicate with a webserver using GET and POST commands. HTTPS would be a serious challenge, however.

But a full-blown, completely generic web browser would be an enormous project.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • Actually I wasn't intent to use HTTP or something. Web page was only for interfacing. Thank you for your answer! – Roman Matveev Sep 29 '18 at 18:49
  • Your comment makes me wonder whether you have any understanding at all of how web browsers and web servers interact. – Dave Tweed Sep 29 '18 at 18:52
  • I will comment on Transistor's post on this. – Roman Matveev Sep 29 '18 at 18:57
  • 1
    I'm starting to get the impression that you don't want Internet access at all; you just want a local GUI to make things happen on the local hardware. In that case, using the word "web" completely threw us off. Just write a GUI using whatever graphics library is available for your display and have it manipulate the hardware ports as needed. Not all GUIs are "web pages". – Dave Tweed Sep 29 '18 at 19:06
  • I had to use word "web browser" to describe the thing I need. However I should have been more specific describing what I needed to accomplish. – Roman Matveev Sep 29 '18 at 19:11
  • No, you didn't have to. You asked for a "web browser", which is a very specific piece of software. If you just want a Graphical User Interface for your embedded application, that's what you should have said. – Dave Tweed Sep 29 '18 at 20:39
  • Web GUI has many advantages such as scalability, huge community, enormous amount of docs and tips. As you implemented web based GUI on your device you can implement any interface very easy and can port you interface wherether you want just in minutes. All that can not be applied to GUI made with graphics library. – Roman Matveev Sep 29 '18 at 20:58
  • 1
    You're over-generalizing. Many GUI libraries offer easy scalability and portability. Have you ever worked with [Tk](https://en.wikipedia.org/wiki/Tk_(software)), for example? The graphics libraries used on embedded systems frequently implement many of the features of generic toolkits like these. After all, the whole point is to make it easy for the embedded developer to create a high-quality GUI for his application. – Dave Tweed Sep 29 '18 at 21:23
-1

From the comments:

So what I need to know is how to make this platform ready to display a web-page.

Actually I wasn't intent to use HTTP or something. Web page was only for interfacing.

enter image description here

Figure 1. Image source: StartLearningHTML.

What was the web page going to interface with? Web pages are designed to interface with web servers. With no Ethernet interface this is going to be extremely difficult. In any case there is no OS (operating system) on the device capable of running a web browser.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • Web page can interface with a user (like pushing virtual buttons, move sliders and so on) **AND** with a hardware (turn LEDs, chande PWM waveform and so on). – Roman Matveev Sep 29 '18 at 18:58
  • 2
    "Web pages are designed to interface with web servers" - usually they are. However they are often used to design graphics interfaces. All needed HTML, JS and CSS can be in the controllers memory and can live without any extarnal server. – Roman Matveev Sep 29 '18 at 19:01
  • Sure, but you want yours to interact with something. I write simple industrial intranet applications using HTML, JS and CSS but they require a server to do anything useful. – Transistor Sep 29 '18 at 19:52
  • 1
    The *something* I want to interact with is a device's hardware. So all: webpage files, display, GPIOs and other will be on the same board. – Roman Matveev Sep 29 '18 at 20:07
  • 1
    While impractical in intent, the asker does have something of a point here. A web page can be a static piece of local data. A *dynamic* page of this sort would typically interface with a server running on the same computer, however it could also interface with a series of file-like objects. Neither of those are the stumbling block for a compact embedded implementation. For that matter, even HTTP over some kind of simple pipe mechanism is fairly simple. Trival RESTful APIs are done in small embedded systems all the time. It's the GUI part where versatility gets expensive. – Chris Stratton Sep 29 '18 at 21:39
  • Understood, but that relies on the operating system allowing the browser to manipulate file objects and most browsers don't do this because of the security risk. It might be possible to write to cookies on the browser and have the OS monitor the cookie folder and react to changes in the cookies. I doubt the chosen system can do this. Can it? – Transistor Sep 29 '18 at 21:53