Web control for BBB based device

Hi,

I’m working on some embedded device which uses BBB with Debian as main control processor.
Device should be controlled via Web interface. Control includes simple configuration
(few tens parameters), collection of logs, statuses, alarms and simple statistics.

I’ll be glad to receive recommendation which web framework to use. I see in Internet
many full-blown and heavy web frameworks which are not used for Web control application.
I need something light and easy to learn and use.

Your help will be very much appreciated.

ivbsd1

Hi!

You don’t need any web framework. Write a simple GTK application and use the Broadway backend to run the GUI in any HTML-5 browser window.

BR

Check out the cookbook recipes @

The cookbook is available @

" Chapter 6: Internet of Things" addresses your questions.

Chad

Hi TJF,

Thanks a lot for suggestions. But, if possible, can you make it more clear ?
If possible, can you give me a reference to project of such type ?

Best regards

Hi Chad,

Thanks a lot for input.

I read carefully this book and I don’t find answer to my questions.
It talks about very basic things. My question was about tools for professional application.

Best regards

Hi TJF,

Thanks a lot for suggestions. But, if possible, can you make it more clear ?
If possible, can you give me a reference to project of such type ?

Best regards

Hi TJK,

Maybe I did not clarify that but I’m talking about embedded device with Linux,
which does not contain gnome or any other windows manager.
Regards,

http://ionicframework.com

This uses Nodejs and Angularjs. I would recommend using Angularjs V2 which is much easier to learn

Regards,
John

Hi TJF,

Thanks a lot for suggestions. But, if possible, can you make it more clear ?
If possible, can you give me a reference to project of such type ?

Broadway is a GDK (= sub-layer of GTK) backend, which directs the input/output via net sockets to a browser window. Just search the net for “GTK Broadway” for details.

There’re no special references, since each and every GTK application compiling against GTK-3.2 or later can run in a Browser window.

Maybe I did not clarify that but I’m talking about embedded device with Linux,
which does not contain gnome or any other windows manager

AFAIR it needs an X11 server, but no windows manager nor GNOME.

BR

The downside to this solution is that it doesn’t scale very well. Using Nodejs and Angularjs, you can support 100s of simultaneous sessions on the BBB.

Regards,
John

Guys, thank for inputs.

john3909, I don’t need 100 sessions .
Application is device control. One session is enough :slight_smile:

TJF, sounds promising. I have to check if GDK and Broadway already exists for BeagleBone.
Does it behave “natural” ? Not “biased” by browser ?

“100s of simultaneous sessions” are not required here (yet). The downside of your proposal is that you’re limited to JavaScript (slow and unsave due to the risc of script injection).

The GTK solution is open for any polyglot development, and powerful tools support the process. Testing is much faster since you need the brower only for the final fine tuning.

BR

It needs GDK version >3.2, AFAIR. It should be default on Debian 8.

There’re limitations regarding some keyboard shortcuts, which are catched by the browser and therefor cannot be used in the application. And the right mouse button isn’t supported on touch screen devices.

BR

Still, I do not fully understand. And sorry for stupid questions :frowning:

Can I develop on Windows or Linux host, or it must be on BBB? But BBB does not have graphical device…

Guys, thank for inputs.

john3909, I don’t need 100 sessions .
Application is device control. One session is enough :slight_smile:

You say that now, but always remember, you invest time learning tools, but those tools may not serve you very well in the future. Your future may include not just browser, but mobile apps for both IOS and Android. To become proficient with a tool can sometime take months so I always try to think about future projects before making a decision about which tool to select. Take a look at the following link:

http://www.rswebsols.com/tutorials/software-tutorials/10-best-frameworks-creating-hybrid-mobile-apps.

Also, there is Nativescript which translates Javascript into native library calls for almost all mobile platforms.

I just prefer Angularjs with Typescript which is an enhanced version of Javascript. If you go to Pluralsight or Lynda sites, they have very good video training material to get you up and running quickly.

Regards,
John

It sounds as though the OP has a lot more than frameworks to understand . . . But additional to what’s already been mentioned. There are libraries for every language known to man( think reasonable . . .) that can be used to do this. Nodejs(javascript ) Python, C, C++, golang . . . the list goes on.

Additionally you may wish to start reading about, and understanding what a “web appliance” is.

ivbsd1,

You need to go read, and read, and read. This subject is vast, and the only real way you’re going to understand is by reading and doing. Also, do not get locked into one way of doing this, as what you’re talking about here may not work for you. The good news is that there are probably 100’s of ways to do this using C/C++.

The most minimalist way of doing this would be to learn how to use libmongoose, and using that. But libmongoose is not well documented, and requires a good bit of understanding of all technologies to be used.

Additionally you may wish to start reading about, and understanding what a “web appliance” is.

Didn’t you read the initial post? This isn’t the issue here. The Question is

Device should be controlled via Web interface. Control includes simple configuration
(few tens parameters), collection of logs, statuses, alarms and simple statistics.

@ivbsd1

Can I develop on Windows or Linux host, or it must be on BBB? But BBB does not have graphical device…

You develop a normal GTK application, on any host/OS. In order to run it as a web interface, compile on BBB, start the broadwayd and set environ variable GDK_BACKEND=broadway before starting the application. The application then doesn’t use the (nor need a) local screen/keyboard. Instead it waits for a web connection to port 8080. Once you open a browser window on that port, this window is used as remote screen/keyboard for the GTK application.

BR

appliance *is*, and how they work through the different software stacks.
This question then answers it's self.

As to how one should work on such a project. Windows, Linux, cross compile,
etc ,etc. This is a matter of taste that will come with experience. One of
my favorite ways to develop something of this nature however is to create a
complete Linux virtual machine mock-up system. Then once I get the mock-up
working how I want, I migrate the code to the target platform, and compile
natively there. This way there is a very minimal chance of ABI conflicts.
But one does need to be wary of potential ABI conflicts. e.g. just do not
use anything that requires a specific hardware platform to work :wink:

TJF, thanks a lot.

I’ll try to take this approach.
And I really appreciate your help :slight_smile: