Skip navigation.
Home
The QNX Community Portal

View topic - The devn-crys8900.so driver

The devn-crys8900.so driver

Read-only archive of qnx.ddk (Writing device drivers for scanners, video card, optical mouse, etc) at inn.qnx.com

The devn-crys8900.so driver

Postby jacus » Fri Jun 29, 2007 7:09 am

Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek
jacus
Senior Member
 
Posts: 239
Joined: Tue Apr 22, 2003 8:36 am

Re: The devn-crys8900.so driver

Postby Robert Craig » Fri Jun 29, 2007 5:04 pm

Support for reading the MAC address from the system page (and thereby
overriding the EEPROM MAC address) is indeed built into the code. It
looks like this was added before the release of 6.3.0, so it should be
in the shipping version of the driver.

R.


Jacek Rudnicki wrote:
Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek

Robert Craig
 

Re: The devn-crys8900.so driver

Postby jacus » Mon Jul 02, 2007 8:10 am

One more question.
Is it possible to write MAC address to the system page
while procnto is running ?

Unfortunately, this time we can't do that in startup code.

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w wiadomosci
news:f63df1$l1e$1@inn.qnx.com...
Support for reading the MAC address from the system page (and thereby
overriding the EEPROM MAC address) is indeed built into the code. It
looks like this was added before the release of 6.3.0, so it should be in
the shipping version of the driver.

R.


Jacek Rudnicki wrote:
Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek
jacus
Senior Member
 
Posts: 239
Joined: Tue Apr 22, 2003 8:36 am

Re: The devn-crys8900.so driver

Postby Robert Craig » Tue Jul 03, 2007 4:28 pm

Hi:

As far as I know, writing to the system page after the kernel is up
and running isn't supported (it might be possible, but it isn't
supported). If you don't know the MAC address at boot time, then my
recommendation would be to start the driver (or mount it) using the
"mac=" option on the command line (or by using the "system" function
from a program if the MAC address can't be easily read via a shell script).

Robert

Jacek Rudnicki wrote:
One more question.
Is it possible to write MAC address to the system page
while procnto is running ?

Unfortunately, this time we can't do that in startup code.

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w wiadomosci
news:f63df1$l1e$1@inn.qnx.com...
Support for reading the MAC address from the system page (and thereby
overriding the EEPROM MAC address) is indeed built into the code. It
looks like this was added before the release of 6.3.0, so it should be in
the shipping version of the driver.

R.


Jacek Rudnicki wrote:
Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek

Robert Craig
 

Re: The devn-crys8900.so driver

Postby jacus » Wed Jul 04, 2007 7:41 am

Hi Robert,

At present I'm using "mac=" option for the driver and it works fine.

Probably the last question:
Can you tell me if it is possible to create/set "global" environment
variable from C code ?

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w wiadomosci
news:f6dsrm$peg$1@inn.qnx.com...
Hi:

As far as I know, writing to the system page after the kernel is up and
running isn't supported (it might be possible, but it isn't supported).
If you don't know the MAC address at boot time, then my recommendation
would be to start the driver (or mount it) using the "mac=" option on the
command line (or by using the "system" function from a program if the MAC
address can't be easily read via a shell script).

Robert

Jacek Rudnicki wrote:
One more question.
Is it possible to write MAC address to the system page
while procnto is running ?

Unfortunately, this time we can't do that in startup code.

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w
wiadomosci news:f63df1$l1e$1@inn.qnx.com...
Support for reading the MAC address from the system page (and thereby
overriding the EEPROM MAC address) is indeed built into the code. It
looks like this was added before the release of 6.3.0, so it should be
in the shipping version of the driver.

R.


Jacek Rudnicki wrote:
Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek
jacus
Senior Member
 
Posts: 239
Joined: Tue Apr 22, 2003 8:36 am

Re: The devn-crys8900.so driver

Postby Ryan J. Allen » Wed Jul 04, 2007 1:14 pm

A process can only manipulate the environment for itself and its children.

If you're doing this in startup you could write a program to get the MAC
and print it to stdout and do something like this in an sh startup script:

HWADDR=`getmac`
io-net -dcrys9800 mac=$HWADDR

--
Ryan J. Allen
QNX Software Systems


On 04/07/2007 3:41 AM, Jacek Rudnicki wrote:
Hi Robert,

At present I'm using "mac=" option for the driver and it works fine.

Probably the last question:
Can you tell me if it is possible to create/set "global" environment
variable from C code ?

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w wiadomosci
news:f6dsrm$peg$1@inn.qnx.com...
Hi:

As far as I know, writing to the system page after the kernel is up and
running isn't supported (it might be possible, but it isn't supported).
If you don't know the MAC address at boot time, then my recommendation
would be to start the driver (or mount it) using the "mac=" option on the
command line (or by using the "system" function from a program if the MAC
address can't be easily read via a shell script).

Robert

Jacek Rudnicki wrote:
One more question.
Is it possible to write MAC address to the system page
while procnto is running ?

Unfortunately, this time we can't do that in startup code.

Jacek

Uzytkownik "Robert Craig" <rcraig_at_qnx@nowhere.com> napisal w
wiadomosci news:f63df1$l1e$1@inn.qnx.com...
Support for reading the MAC address from the system page (and thereby
overriding the EEPROM MAC address) is indeed built into the code. It
looks like this was added before the release of 6.3.0, so it should be
in the shipping version of the driver.

R.


Jacek Rudnicki wrote:
Hello,

Is the latest release of devn-crys8900 able
to read MAC address from the system page ?

Regards,
Jacek
Ryan J. Allen
 

Re: The devn-crys8900.so driver

Postby Q » Tue Aug 21, 2007 10:12 am

Can you tell me if it is possible to create/set "global" environment
variable from C code ?

#include <stdlib.h>

int putenv( const char *env_name ); //Add, change or delete an environment
variable

see also:
getenv(), unsetenv()
Q
 

Re: The devn-crys8900.so driver

Postby David Gibbs » Tue Aug 21, 2007 5:12 pm

Q <no@spam.pl> wrote:
Can you tell me if it is possible to create/set "global" environment
variable from C code ?

#include <stdlib.h

int putenv( const char *env_name ); //Add, change or delete an environment
variable

see also:
getenv(), unsetenv()

Yes...but those aren't "global". They change the environment for the
calling process, and (depending on the type of spawn/exec done) will be
inherited by children -- but are not in any way global -- that is, changes
won't be seen by other already running processes, or by processes that
are started by another process.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
David Gibbs
 


Return to qnx.ddk

Who is online

Users browsing this forum: No registered users and 2 guests

cron