Resource Manager with Ethnet card .

Hi~~I don’t have any experience to write QNX program.

Could someone give me some suggestion. :smiley:

Now I wanna use “Resource Manager” to write a program of Ethernet card.

I use the example from the document “Writing a Resource Manager” .

Here are some codes.

id = resmgr_attach(dpp, &resmgr_attr, “/dev/sample”, _FTYPE_ANY, 0,
&connect_funcs, &io_funcs, &attr);

Then I replace “/dev/sample” by “/dev/io-ent/en0”.

After compiling the code, I execute the file.

Then I used the command "#echo hi > /dev/io-net/en0 ",Nothing Happend. :cry:

According to the document,It would show “Receieve 2 bytes = ‘hi’”.

How should I do ? :question:

Any reply would be appreciated.
:smiley:
Thanks for tolerating my poor English.
:blush:

Writing a device driver for an ethernet card is usually done using the net DDK. Although it would still be a resource manager, a lot more work is already done for you that way.

Try changing your example back to /dev/sample, does it work? If so, slay io-net (the network driver) and see if your original example works now.