IrDa print server - howto?

Discussion in 'Wireless Networking' started by Automatix, Jun 20, 2005.

  1. Automatix

    Automatix Guest

    Hi all,

    i'd like to implement an IrDa print server,
    receiving printing requests from mobile phones or
    notebooks via IR and redirecting them to a local
    port or file on the PC / PDA, with Winsock-API
    (WIN32 and/or WinCE).
    My problem is that i cannot find a way to set the
    device info (resp. printer hint bit) via setsockopt(),
    so that IR-connected devices will accept my server as a
    printer device.
    Is there e.g. an undocumented OptionName for
    WSHSetSocketInformation() to set the hint bits for the
    local device? Or is it a general limitation of
    current irda.sys / wshirda.dll that device hint bits
    are always hard coded, so the only way is a complete
    replacement of the irda protocol stack?

    Thanks for replies,
    Gilbert
    Automatix, Jun 20, 2005
    #1
    1. Advertising

  2. Problem Description:
    ===============
    I'd like to implement an IRDA print server, receiving printing requests from
    mobile phones or notebooks via IRDA and redirecting them to a localport or
    file on the PC / PDA, with Winsock-API (WIN32 and/or WinCE).
    My problem is that I cannot find a way to set the device info (esp. printer
    hint bit) via setsockopt, so that IR-connected devices will accept my server
    as aprinter device.

    Is there e.g. an undocumented OptionName for WSHSetSocketInformation() to
    set the hint bits for the local device? Or is it a general limitation of
    current irda.sys / wshirda.dll that device hint bits are always hard coded,
    so the only way is a complete replacement of the IRDA protocol stack?

    Answers:
    =======
    If the OS is some flavor of Win CE then the following answer will not apply.

    If you are using Win 2000 and later OS then here is the answer:

    Windows Desktop OS does not have an API to change the hint bits. Hints bits
    are just that, hints, and don't really tell you if a service is available so
    our recommended procedure is to query the IAS database for the service.

    We do have an undocumented and unsupported way of setting the hint bits via
    the registry.

    HKLM\System\CurrentControlSet\Services\irda\pamameters\HINTCHARSET=x

    where x is a DWORD with the low order byte equal to character set (0x00),
    next byte is last hint byte.

    This is the default:

    #define IRLAP_DEFAULT_HINTCHARSET 0x842500 // computer, IrCOMM, Obex,
    and telephony

    So you will want to add HINTCHARSET=0x8C2500 for the printer.


    Byte 1 Byte 2

    Bit Function Bit Function

    0 PnP Compatible 8 Telephony

    1 PDA/Palmtop 9 File Server

    2 Computer 10 rsvd

    3 Printer 11 rsvd

    4 Modem 12 rsvd

    5 Fax 13 rsvd

    6 LAN Access 14 rsvd

    7 Extension 15 Extension


    Please keep in mind that this registry key and the values are not supported
    and may change from one OS to another or from one service pack to another.


    thanks,
    Mazahir Poonawala
    Microsoft Developers Support

    "Automatix" wrote:

    > Hi all,
    >
    > i'd like to implement an IrDa print server,
    > receiving printing requests from mobile phones or
    > notebooks via IR and redirecting them to a local
    > port or file on the PC / PDA, with Winsock-API
    > (WIN32 and/or WinCE).
    > My problem is that i cannot find a way to set the
    > device info (resp. printer hint bit) via setsockopt(),
    > so that IR-connected devices will accept my server as a
    > printer device.
    > Is there e.g. an undocumented OptionName for
    > WSHSetSocketInformation() to set the hint bits for the
    > local device? Or is it a general limitation of
    > current irda.sys / wshirda.dll that device hint bits
    > are always hard coded, so the only way is a complete
    > replacement of the irda protocol stack?
    >
    > Thanks for replies,
    > Gilbert
    >
    =?Utf-8?B?TWF6YWhpciBQb29uYXdhbGEgW01TRlRd?=, Jun 29, 2005
    #2
    1. Advertising

  3. Automatix

    eslavko

    Joined:
    Dec 14, 2010
    Messages:
    1
    Quite old thread.
    But I wan't to do same thing. I had device with capability to print direct to IrDA capable printer, and I wan't to intercept that data. Does someone complete that task?
    eslavko, Dec 14, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Silverstrand

    USB to IRDA Dongle @ ThinkComputers.org

    Silverstrand, Sep 5, 2005, in forum: Front Page News
    Replies:
    3
    Views:
    791
    unholy
    Sep 6, 2005
  2. =?Utf-8?B?YWxwaGFMb2JzdGVy?=

    irda/rc5...wtf?

    =?Utf-8?B?YWxwaGFMb2JzdGVy?=, Aug 1, 2004, in forum: Wireless Networking
    Replies:
    0
    Views:
    1,537
    =?Utf-8?B?YWxwaGFMb2JzdGVy?=
    Aug 1, 2004
  3. Bun Mui
    Replies:
    3
    Views:
    824
    Phantom
    Sep 13, 2004
  4. mikeyb
    Replies:
    0
    Views:
    923
    mikeyb
    Aug 7, 2006
  5. D.K. [CCA]
    Replies:
    2
    Views:
    1,255
    Tilman Schmidt
    Sep 7, 2007
Loading...

Share This Page