Connect to database?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello all,

we will in the near future start developing an embedded application
which will connect to the rest of the world using IP. In addition to
several other things, the application will be able to sense various
external asynchronous events like keypresses etc.

We would like to log these events in a database which is running in an
"ordinary" computer somewhere else in the IP network, and that's what I
would like some input on.

I have tried to google for information on this subject but all I came up
with was about embedded servers. What I would like to know is how
complex it will be to connect directly to a (say MySQL) database from
the embedded application and do the database inserts. If any of you have
done something similar I would like to get some info on what code size
to expect.

As of now it looks like we will be using a controller with ARM9 core, so
I assume we have the needed horsepower and memory address space(!)


--
Torbjørn Heltne
AM Elektronikk AS
We've slightly trimmed the long signature. Click to see the full one.
Re: Connect to database?
Quoted text here. Click to load it

The UNIX (including Linux) computers usually have a logging daemon
running and listening to an UDP port. Would it do the job?

On the controller side, UDP is much easier to implement than
full-blown TCP.

Been there - done that (last time with an ARM7TDMI)

Tauno Voipio
tauno voipio (at) iki fi



Re: Connect to database?

Quoted text here. Click to load it

Some sort of a daemon was the other option I was thinking about. If
there is such a beast already I will certainly check if it can be used.
Which daemon is it you're thinking about?

Quoted text here. Click to load it

That's my understanding, yes.

Quoted text here. Click to load it

Did you use an OS w/IP-stack?

--
Torbjørn Heltne
AM Elektronikk AS
We've slightly trimmed the long signature. Click to see the full one.
Re: Connect to database?
Quoted text here. Click to load it

The UNIX computer end runs the syslog daemon at UDP port 514.

For details, you could start at:

<http://arstechnica.com/columns/linux/linux-20040122.ars/2 .


Quoted text here. Click to load it

Kind of - just my own quick thread switcher. All of the
code on the controller (including Ethernet and TCP/IP)
was written from scratch.

Tauno Voipio
tauno voipio (at) iki fi


Re: Connect to database?
Quoted text here. Click to load it
<snip>

For a great deal of flexibility and easy compatibility, use a syslog
protocol.  It is supported by many freeware programs on most operating
systems.  Basically your embedded application sends messages to port 514 on
the remote computer.  The specs are in RFC3164 and RFC3195 on the ietc.org
website.  A good freeware utility is available on
http://www.kiwisyslog.com /.

scott



Site Timeline