Web control for BBB based device

137 views
Skip to first unread message

ivbsd1

unread,
Jul 25, 2016, 4:00:41 PM7/25/16
to BeagleBoard
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


TJF

unread,
Jul 26, 2016, 10:59:58 AM7/26/16
to BeagleBoard
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

Chad Baker

unread,
Jul 26, 2016, 12:17:55 PM7/26/16
to beagl...@googlegroups.com

Check out the cookbook recipes @ http://beagleboard.org/cookbook

The cookbook is available @ http://shop.oreilly.com/product/0636920033899.do

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

Chad
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/397618ed-c593-4a82-bddb-fa81fca74169%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ivbsd1

unread,
Jul 26, 2016, 1:02:44 PM7/26/16
to BeagleBoard
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

ivbsd1

unread,
Jul 26, 2016, 1:04:52 PM7/26/16
to BeagleBoard
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

ivbsd1

unread,
Jul 26, 2016, 1:05:53 PM7/26/16
to BeagleBoard
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

ivbsd1

unread,
Jul 26, 2016, 1:21:08 PM7/26/16
to BeagleBoard
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,

John Syne

unread,
Jul 26, 2016, 3:18:49 PM7/26/16
to beagl...@googlegroups.com
http://ionicframework.com

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

Regards,
John




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

TJF

unread,
Jul 26, 2016, 3:49:52 PM7/26/16
to BeagleBoard


Am Dienstag, 26. Juli 2016 19:05:53 UTC+2 schrieb ivbsd1:
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

John Syne

unread,
Jul 26, 2016, 3:58:59 PM7/26/16
to beagl...@googlegroups.com
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




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

ivbsd1

unread,
Jul 26, 2016, 4:05:35 PM7/26/16
to BeagleBoard
Guys, thank for inputs.

john3909, I don't need 100 sessions .
Application is device control. One session is enough :-)

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

TJF

unread,
Jul 26, 2016, 4:11:00 PM7/26/16
to BeagleBoard


Am Dienstag, 26. Juli 2016 21:58:59 UTC+2 schrieb john3909:
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.

 "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

TJF

unread,
Jul 26, 2016, 4:20:29 PM7/26/16
to BeagleBoard


Am Dienstag, 26. Juli 2016 22:05:35 UTC+2 schrieb ivbsd1:
TJF, sounds promising. I have to check if GDK and Broadway already exists for BeagleBone. 
Does it behave "natural" ? Not "biased" by browser ?

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

ivbsd1

unread,
Jul 26, 2016, 4:29:32 PM7/26/16
to BeagleBoard
Still, I do not fully understand. And sorry for stupid questions :-(

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

John Syne

unread,
Jul 26, 2016, 4:59:10 PM7/26/16
to beagl...@googlegroups.com
On Jul 26, 2016, at 1:05 PM, ivbsd1 <ivb...@gmail.com> wrote:

Guys, thank for inputs.

john3909, I don't need 100 sessions .
Application is device control. One session is enough :-)
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:


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

William Hermans

unread,
Jul 27, 2016, 1:11:24 AM7/27/16
to beagl...@googlegroups.com
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*.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Jul 27, 2016, 1:41:12 AM7/27/16
to beagl...@googlegroups.com
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.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

TJF

unread,
Jul 27, 2016, 1:47:04 AM7/27/16
to BeagleBoard


Am Mittwoch, 27. Juli 2016 07:11:24 UTC+2 schrieb William Hermans:
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

William Hermans

unread,
Jul 27, 2016, 1:56:59 AM7/27/16
to beagl...@googlegroups.com
On Tue, Jul 26, 2016 at 10:47 PM, TJF <jeli.f...@gmail.com> wrote:


Am Mittwoch, 27. Juli 2016 07:11:24 UTC+2 schrieb William Hermans:
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.

I beg to differ. This is the "issue" here. If it is understood what a web 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 ;)

ivbsd1

unread,
Jul 27, 2016, 2:10:17 AM7/27/16
to BeagleBoard
TJF, thanks a lot.

I'll try to take this approach.
And I really appreciate your help :-)

ivbsd1

unread,
Jul 27, 2016, 2:20:53 AM7/27/16
to BeagleBoard
BTW - do you know if something similar to Broadway exists for QT ?

William Hermans

unread,
Jul 27, 2016, 2:37:20 AM7/27/16
to beagl...@googlegroups.com

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

ivbsd1

unread,
Jul 27, 2016, 2:43:17 AM7/27/16
to BeagleBoard
Thanks for the help - but this is not what I asked :-(.

William Hermans

unread,
Jul 27, 2016, 2:48:31 AM7/27/16
to beagl...@googlegroups.com
The point is this: There is no "broadway" for Qt, but there are plenty of comparable options. However, if you took the time to search the web, you'd know this already. Don't be afraid to help yourself with these easily answered by google questions.

Igor D

unread,
Jul 27, 2016, 3:03:43 AM7/27/16
to beagl...@googlegroups.com
Thanks again for the help.
I never send questions to the forum before I did extensive research via Internet.
And I did not find something like Broadway for QT. I found nothing comparable and mature enough..
If I wrong - please send me a reference.

William, one more comment. This is technical forum and I expect technical answers. 
I don't expect generic answers like "Took the time to search the web" and "Don't be afraid to help yourself with these easily answered 
by Google questions". Let's have respect to each other.


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/wufrB8capTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORo%3DBMqDaOhE%3Dpqf%2BDKQNxWLJPhWgU0qv%2BVJPQRx3b%3DqjQ%40mail.gmail.com.

William Hermans

unread,
Jul 27, 2016, 3:38:13 AM7/27/16
to beagl...@googlegroups.com
Thanks again for the help.
I never send questions to the forum before I did extensive research via Internet.
And I did not find something like Broadway for QT. I found nothing comparable and mature enough..
If I wrong - please send me a reference.

What you're asking for does not exist. So, like I said . . . you need to search the web, for something that is close enough to meet your criteria, and adapt it. Either that, or use a bloated framework, or write your own from scratch.

So, let me give you some advice. Don't confuse someone who is being short, and to the point ( concise ) as being rude, or disrespectful. I'm not even sure how one could perceive this over the internet . . . Also someone who has gone through the same process you're going through now. Only I researched this 2 + years ago.

You need a web, and websocket server. *IF* you want real time instrumentation. If you do not need real time instrumentation, then you could look into using / writing a web API( CRUD ).

The only "framework" I know of that fits your criteria most closely is libmongoose. It is tiny, and does a lot. It also does what it does very quickly. However, the code spans two files and weights in at around 20k lines of code. Where most of it is very terse reading, and the documentation for this library is terrible. This library is also cross platform, so much of the code is redundant, but for different OSes.

Also, most, or all of the control you're going to need can be handled by the front end via html, and javascript.

Anyway, there is a lot more out there. Which again . . . you're going to have to search for, and determine for yourself if it is better for you, or not.

Igor D

unread,
Jul 27, 2016, 3:42:56 AM7/27/16
to beagl...@googlegroups.com
Thanks a lot again.
Now, can you please read my original question ?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/wufrB8capTU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Jul 27, 2016, 3:47:23 AM7/27/16
to beagl...@googlegroups.com
No, search the web.

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CA%2BfsX4ARJMVwVSwZcJBEO_bGOtG8FO0K%3DChF%3Dbbe6_J8b4j%3DVg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages