Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


FlapYoJacks posted:

ChatGPT is amazing for things like this. :v:
sadly(?) it struck out on win ce 6.0 though - the other godawful sorta-custom OS thing i maintain :shepface:

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

Ciaphas posted:

sadly(?) it struck out on win ce 6.0 though - the other godawful sorta-custom OS thing i maintain :shepface:

This I’m not surprised on. way less documentation or community support and questions directed towards that topic.

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Ciaphas posted:

sadly(?) it struck out on win ce 6.0 though - the other godawful sorta-custom OS thing i maintain :shepface:

did you try bingGPT? it can search stuff to pull new info but it's kinda hit or miss about whether or not it can actually apply it to a request

sb hermit
Dec 13, 2016





I have put off trying to learn dbus for 20 years and I've decided to try to jump into it headfirst with a new embedded device I'm putting together for a friend's project.

For various reasons, I want to use Raspberry Pi OS. I may use buster or bullseye, not sure of either.

Would dbus work as a good system-wide event bus? As in, a server component emits events (usb inserted, smartcard detected, someone pressed a gpio-powered button) and client components receive those events and do something (play a sound, blink an LED, etc). Latency is not an issue. I assume that there will be security jank that I'll have to deal with.

Specifically, I want to know if dbus has a tendency to drop events, and if there are other integration hurdles I'm likely to hit that make it a terrible choice.

The alternative is, of course, the old standby. Packet-oriented messaging over domain sockets. Although I hear that another solution is to use sqlite as the event log and just have everyone monitor that, which seems like the sort of bulletproof reliability that I crave.

FlapYoJacks
Feb 12, 2009
DBus is specifically built to do what you want to do. One big hang up people have for DBus is it’s specifically designed to not care about receiving replies. If you want an acknowledgment from the receiving program, use gRPC.

Edit:
To answer your question, I have NEVER had a dbus event drop unless something is seriously wrong with the program or system.

hobbesmaster
Jan 28, 2008

with raspbian on a rpi4 dbus is already used for a ton (including the default handlers for some of those events) so why wouldn’t you use it?

sb hermit
Dec 13, 2016





thanks, bernies, for your advice

thbernies

repugnant
Jun 29, 2005

You can only think of me.

I don't know what language you're developing with, but Qt brings pretty good dbus support to C++ apps. There's some goofiness in the tools, but they provide a program that takes in a dbus xml file and turns it into a Qt C++ class. Also, qdbusviewer is a nice utility to see what the entire dbus is doing.

I used it in two places for my project:

1) Listening for system-wide "USB thumb drive inserted" dbus events so I could write logged data to it.
2) Communicating between my touch UI and the "server" process that was actually doing all the logging. In retrospect I might choose something simpler.

If you're going down the Qt path, there's also QtRemoteObjects which I haven't used but seems like a Qt-specific but cross platform dbus-lite

sb hermit
Dec 13, 2016





repugnant posted:

I don't know what language you're developing with, but Qt brings pretty good dbus support to C++ apps. There's some goofiness in the tools, but they provide a program that takes in a dbus xml file and turns it into a Qt C++ class. Also, qdbusviewer is a nice utility to see what the entire dbus is doing.

I used it in two places for my project:

1) Listening for system-wide "USB thumb drive inserted" dbus events so I could write logged data to it.
2) Communicating between my touch UI and the "server" process that was actually doing all the logging. In retrospect I might choose something simpler.

If you're going down the Qt path, there's also QtRemoteObjects which I haven't used but seems like a Qt-specific but cross platform dbus-lite

either C or python or a mix of both, along with a hint of javascript

C++ may be in the mix but it's unlikely that I'll use Qt. It's a great framework but (for reasons I don't want to get into) it doesn't fit my requirements.

I used Qt for a project way back in 2002 or so and qmake was probably the easiest build system I ever used.

Tankakern
Jul 25, 2007

do not ask what the project is

FlapYoJacks
Feb 12, 2009

Tankakern posted:

do not ask what the project is

What's the project?

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

FlapYoJacks posted:

What's the project?

gently caress, you just HAD to ask

you've done it now

hobbesmaster
Jan 28, 2008

PSA: if anyone is looking for the equivalent of one of those German sim games of their day job do not be fooled by this blatantly mislabeled game

https://www.youtube.com/watch?v=8s4GEcHKXT4

yippee cahier
Mar 28, 2005

Which USB network gadget driver should I use? Are ECM or EEM supported by older versions of windows? NCM works great but it looks like built in driver support only came in windows 11. RNDIS sometimes causes blue screens if the kernel running the gadget driver is interrupted so I want to avoid that.

Also, can I freely use the Linux Foundation USB VID and PIDs for unmodified, standard gadget functions in a commercial product? We are GPL compliant.

hobbesmaster
Jan 28, 2008

RNDIS was what MS included until very recently. I think cdc-ecm was never built in.

you’d want to use ncm if you can

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
The last time I did a product with gadget ethernet, I settled on a composite device with RNDIS _and_ NCS. The reason was that RNDIS was the only one that worked on Windows 10, but it didn't work at all on MacOS.

This was maybe like 4 years ago though, so support might have gotten better.

Poopernickel fucked around with this message at 12:43 on Jun 30, 2023

FlapYoJacks
Feb 12, 2009
My last RNDIS project was 13 years ago on Linux 2.6.17 :corsair:

FlapYoJacks fucked around with this message at 06:44 on Jun 30, 2023

FlapYoJacks
Feb 12, 2009
In my spare time, I was given a project to port flutter over to Buildroot. Seems like a good alternative to QT if you want to avoid licensing costs.

FlapYoJacks
Feb 12, 2009

FlapYoJacks posted:

In my spare time, I was given a project to port flutter over to Buildroot. Seems like a good alternative to QT if you want to avoid licensing costs.

Jesus Christ Google. gently caress you and your lovely source trees.

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

FlapYoJacks posted:

In my spare time, I was given a project to port flutter over to Buildroot. Seems like a good alternative to QT if you want to avoid licensing costs.

can you do a Flutter without writing any Dart?

if not:
have you done a dart and/or is dart any good?

FlapYoJacks
Feb 12, 2009

Poopernickel posted:

can you do a Flutter without writing any Dart?

if not:
have you done a dart and/or is dart any good?

You can't. It's a Dart framework. I have no idea if Dart is any good.

hobbesmaster
Jan 28, 2008

Poopernickel posted:

can you do a Flutter without writing any Dart?

if not:
have you done a dart and/or is dart any good?

statements dreamed up by the utterly deranged

this is REAL development done by REAL developers

they have taken us for fools

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
I will be god damned before I learn a whole new language and toolchain just to avoid QT.

I don't even really write GUIs but I would 100% rather learn QT and use it with a language I already know.

otoh we are all already damned in this line of work, so :shrug:

Kazinsal
Dec 13, 2011



hobbesmaster posted:

statements dreamed up by the utterly deranged

this is REAL development done by REAL developers

they have taken us for fools

abandon js frameworks, return to lovingly hand-crafted assembler

FlapYoJacks
Feb 12, 2009
Gonna keep saying this: What the gently caress Google.

FlapYoJacks
Feb 12, 2009
15M Jul 18 16:43 libflutter_engine.so

gently caress you Google I win.

outhole surfer
Mar 18, 2003

FlapYoJacks posted:

15M Jul 18 16:43 libflutter_engine.so

gently caress you Google I win.

you ported their bullshit to a new platform for free.... seems like google still won

FlapYoJacks
Feb 12, 2009

nudgenudgetilt posted:

you ported their bullshit to a new platform for free.... seems like google still won

Woah woah woah, pal. I got paid to do the porting.

hobbesmaster
Jan 28, 2008

but did google pay for it

FlapYoJacks
Feb 12, 2009

hobbesmaster posted:

but did Google pay for it

Nah. My company did. I did ask Google to pretty-please make a tarball for embedded Linux distributions. :unsmith:

FlapYoJacks
Feb 12, 2009
v2 flutter-engine patches submitted. Flutter-engine includes its own patched clang that you have to use to properly compile and link. :psyduck:

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
Holy gently caress

What is that clang doing that a normal clang won't do?

sb hermit
Dec 13, 2016





what is that bespoke clang doing to those machine language binaries???

hobbesmaster
Jan 28, 2008

sb hermit posted:

what is that bespoke clang doing to those machine language binaries???

sb hermit
Dec 13, 2016





but really, I think buildroot doesn’t support clang right now and flutter requires it

sb hermit
Dec 13, 2016





sb hermit posted:

but really, I think buildroot doesn’t support clang right now and flutter requires it

I’m wrong, clang has been in buildroot since 2018! I should get back into building with it.

FlapYoJacks
Feb 12, 2009

sb hermit posted:

I’m wrong, clang has been in buildroot since 2018! I should get back into building with it.

It was just updated to 15!

FlapYoJacks
Feb 12, 2009

Poopernickel posted:

Holy gently caress

What is that clang doing that a normal clang won't do?

~ Things ~. They have a few custom arguments and if you don’t use it you get a bunch of linking errors. It’s bizarre.

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
clang sempai, w-w-what are you doing to my binaries???

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009
lol the Buildroot maintainers reaction to Flutter having its own vendored clang is “Yeah, it’s horrifying, but it’s also Google, we aren’t surprised.”

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply