HP Wi-Fi Direct Mouse on Linux

In my last post I took apart an HP Wi-Fi Direct mouse based on the OZMO2000 controller from Ozmo Devices.

OZMO based devices are officially supported on Windows 7 platform only, rendering them completely useless as nobody uses Windows anymore… right? Well, it turns out most of the code to use them in Linux is already in place, just waiting to be enabled!


https://fabiobaltieri.com/wp-content/uploads/2013/02/hp-wifi-mouse-linux.jpg

Wi-Fi direct support in Linux is quite young and still considered as experimental, so read on if you dare to try!

OZMO Devices: Theory of Operation

OZMO controller uses Wi-Fi Direct (a.k.a. Wi-Fi P2P) for communication with the host system, so a Wi-Fi Direct Linux supported card is the only hardware requirement.

Wi-Fi Direct itself is a relatively recent extension of the 802.11 standards to allow Wi-Fi devices to associate and communicate between themselves (point-to-point) without requiring a dedicated common AP but also without the need to disable the existing traditional Wi-Fi connection. This is implemented using an additional “virtual interface” that acts as a software access point (P2P-GO) with WPS push-button client support.

Once the P2P-GO interface is up and running, the mouse can be connected using the WPS push-button scheme: press the soft-button on the host and the “connect” button on the mouse that will automatically associate with the first available AP.

As the device is connected, the real fun begins: as the mouse starts transmitting data to the host using a specific Ozmo’s in-house developed USB over Ethernet protocol, registered to ethertype 0x892e.

Quoting IEEE’s eth.txt:

892E         Ozmo Devices

A protocol to enable USB type data and USB type commands to be sent
between two devices connected by an IEEE802 link, typically an
IEEE802.11 link. The protocol allows encoding of all information
that would normally be present in a wired USB request, such as
request_id and rcode along with payload data. Defined header
structures allow correct delivery of the required fields. The
informaion provided through the protocol enables USB like behaviour
to be implemented between wirelessly connected
devices. www.ozmodevices.com

Sounds complicated? This is actually quite ingenious, as it allows a gadget designer to implement an USB Class protocol, so that once the device is associated and the “virtual USB hub” is installed the actual device-specific protocol can be handled by the already existing USB device-class driver.

Thus, the only OZMO specific code to be installed by the user is the actual virtual USB hub – backed on the Wi-Fi Direct interface. The good news is that the Linux driver is already here, silently laying in the staging/ozwpan directory of modern kernels… Ozmo itself made it, well done Ozmo!

So, how do we use it?

Kernel

First thing we need is to make sure that our Wi-Fi device supports Wi-Fi Direct, which you can tell by running the iw list command and searching for P2P entries between supported interface modes, as in:

# iw list
Wiphy phy0
[...]
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * P2P-client
                 * P2P-GO
[...]

In this case I’m using an Intel’s Advanced-N 6205 mini-PCIe card. If you are using an iwlwifi based card, make sure your kernel has the CONFIG_IWLWIFI_P2P option turned on, as that enables the experimental P2P support for the driver.

Check with:

# zcat /proc/config.gz |grep P2P
CONFIG_IWLWIFI_P2P=y

The other thing you need from the kernel side is the ozwpan driver, built as a module. Just verify that the module exists, but don’t load it yet, as you need to bring up the Wi-Fi direct interface before:

# modinfo  ozwpan
filename:       /lib/modules/[...]/ozwpan/ozwpan.ko
license:        GPL
version:        1.0.13
description:    Ozmo Devices USB over WiFi hcd driver
author:         Chris Kelly
parm:           g_net_dev:charp

Userspace

Once your kernel is good to go, you need a version of wpa_supplicant with P2P and WPS support. Again, this is quite recent so check if it’s already there with:

$ wpa_cli help p2p
Selected interface 'wlan0'
commands:
  p2p_find [timeout] [type=*] = find P2P Devices for up-to timeout seconds
  p2p_stop_find = stop P2P Devices search
  p2p_connect <addr> <"pbc"|PIN> [ht40] = connect to a P2P Device
  p2p_listen [timeout] = listen for P2P Devices for up-to timeout seconds
[...]

If wpa_cli does not list any supported commands, you want to get a new wpa_supplicant version, so just grab the latest one from git://w1.fi/srv/git/hostap.git and build it using defconfig as a base. Make sure to turn on these options beforehand:

CONFIG_WPS=y
CONFIG_WPS2=y
CONFIG_READLINE=y
CONFIG_AP=y
CONFIG_P2P=y

Once you are done, reconnect your main connection with the new wpa_supplicant using the nl80211 driver and cross your fingers. Still online? Go ahead then!

Pairing

To connect the Wi-Fi Direct device without disrupting the existing connection, we want to create a new interface in GO mode:

# wpa_cli -i wlan0

Interactive mode

> p2p_group_add
OK
<3>P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-3G" freq=2437
   passphrase="sDv0YD4F" go_dev_addr=8c:70:5a:xx:xx:xx
> quit
# iw dev
phy#0
        Interface p2p-wlan0-0
                ifindex 19
                type P2P-GO
                channel 6 (2437 MHz) NO HT
        Interface wlan0
                ifindex 4
                type managed
                channel 6 (2437 MHz) NO HT

Finally, start wpa_cli on the new interface, run the wps_pbc (for Push Button Client) command, and press the “connect” button on the Wi-Fi Mouse. It should eventually go like this:

# wpa_cli -i p2p-wlan0-0

Interactive mode

> wps_pbc
OK [press the button on the mouse for ~1s now]
<3>CTRL-EVENT-EAP-STARTED 38:0d:d4:xx:xx:xx
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-STARTED 38:0d:d4:xx:xx:xx
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-STARTED 38:0d:d4:xx:xx:xx
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>WPS-REG-SUCCESS 38:0d:d4:xx:xx:xx f53e5a2c-604c-483f-9256-380dd401eecb
<3>WPS-SUCCESS
<3>CTRL-EVENT-EAP-FAILURE 38:0d:d4:xx:xx:xx
<3>AP-STA-CONNECTED 38:0d:d4:xx:xx:xx
<3>AP-STA-DISCONNECTED 38:0d:d4:xx:xx:xx
<3>AP-STA-CONNECTED 38:0d:d4:xx:xx:xx
<3>AP-STA-DISCONNECTED 38:0d:d4:xx:xx:xx
<3>AP-STA-CONNECTED 38:0d:d4:xx:xx:xx
<3>AP-STA-DISCONNECTED 38:0d:d4:xx:xx:xx
[...]

The mouse is now continuously reconnecting to our host searching for its USB-over-Ethernet driver. To make it happy just load the ozwpan module, specifying the name of the new interface:

# modprobe ozwpan g_net_dev=p2p-wlan0-0
# dmesg
[...]
[23398.236275] ozwpan: module is from the staging directory, the quality is unknown, you have been warned.
[23398.237235] ozwpan ozwpan: Ozmo Devices WPAN
[23398.237494] ozwpan ozwpan: new USB bus registered, assigned bus number 5
[23398.237537] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[23398.237544] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[23398.237550] usb usb5: Product: Ozmo Devices WPAN
[23398.237556] usb usb5: Manufacturer: Linux 3.8.0-rc3-00668-g55706d3 Ozmo WPAN
[23398.237561] usb usb5: SerialNumber: ozwpan
[23398.237725] hub 5-0:1.0: USB hub found
[23398.237731] hub 5-0:1.0: 8 ports detected
[23398.569110] usb 5-1: new full-speed USB device number 2 using ozwpan
[23398.779642] usb 5-1: New USB device found, idVendor=03f0, idProduct=a907
[23398.779650] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[23398.779654] usb 5-1: Product: Wi-Fi
[23398.779657] usb 5-1: Manufacturer: HP
[23398.779660] usb 5-1: SerialNumber: 00001
[23398.881283] input: HP Wi-Fi  as /devices/platform/ozwpan/usb5/5-1/5-1:1.0/input/input18
[23398.881802] hid-generic 0003:03F0:A907.0006: input,hidraw0: USB HID v1.10 Mouse [HP Wi-Fi ] on usb-ozwpan-1/input0

That’s it! The mouse is connected and registered with the standard HID driver, just like a standard wired USB device. Congratulations, you’ve made it!

You can also check the existing connection with wpa_cli:

$ wpa_cli -i p2p-wlan0-0 all_sta
38:0d:d4:xx:xx:xx
dot11RSNAStatsSTAAddress=38:0d:d4:xx:xx:xx
dot11RSNAStatsVersion=1
dot11RSNAStatsSelectedPairwiseCipher=00-1e-ca-8
dot11RSNAStatsTKIPLocalMICFailures=0
dot11RSNAStatsTKIPRemoteMICFailures=0
hostapdWPAPTKState=11
hostapdWPAPTKGroupState=0
wpsPrimaryDeviceType=2-0050F204-0
wpsDeviceName=PANdev
wpsManufacturer=Ozmo
wpsModelName=HP Wi-Fi Mobile
wpsModelNumber=OZ2000
connected_time=551

That’s more or less how the basic thing works. The process is still complex for the casual user but all the pieces are in place.

If it’s working for you, feel free to post a comment!

44 Responses to HP Wi-Fi Direct Mouse on Linux

  1. Dmitry says:

    Hello.
    Your post is realy useful. I’m expecting to buy this mouse, and if you answer on a few my questions – it will be great.

    – how this mouse will work in a place with a lot of wifi hotspots around?
    – it is possible to use it through 5 ghz if my laptop support it instead of 2.4 ghz?

    Thanks.

    • Hi Dmitry,

      thanks! Anyway, keep in mind that the whole p2p-wifi thing in linux is still quite preliminary and experimental. Expect crashes! :-)

      As of your questions:
      – for the hotspot, I’m not sure how things like on-air collision avoidance are handled (if handled at all), but I suspect that as your mouse is going to stay just next to your laptop/PC, it may just go over any other interfering signal easily (it should be all about signal/noise ratio) – that’s just a suppositions, through, as I use the mouse home and there are not many APs here.
      – as for the frequency, I guess it should work just fine, if your main connection uses a 5GHz channel, the mouse is going to use the same frequency.

      Fabio

      • Dmitry says:

        Fabio.

        Thank for your reply.
        I don’t mensioned previously and would like to clarify that i’m using windows 8. Laptop is asus zenbook ux32vd.

        In my appartment i usualy find about 20 hotspots on 2,4 ghz (as connection in my wifi router) and i afraid that there will be an interference using this mouse.

        So if i make up my mind to buy it, for sure i’ll post a comment here.

      • Err… I’m quite sure that I’ve read somewhere that this mouse does not work in Windows 8 (yet…), so maybe you’d better ask in the HP forums for that.

        If you discover something for interference… drop a comment!

        Thanks,
        Fabio

  2. Marco says:

    Nice guide, compliments, I have just purchased an hp x7000 wi-fi mouse and I have a Pc witch ubuntu.
    The problem is that I am a newbie and so I can do a very few things, can you help me? If you want you can send me an e-mail.

    P.s. Tutto come sopra, sono italiano se vuoi parliamo in italiano, la mia mail la vedi giusto?
    Se riuscissi ad aiutarmi te ne sarei molto grato, anche perchè il mouse è costato un po e mi dispiacerebbe non usarlo.
    Grazie mille

  3. Marco says:

    hi, i’ve just purchased an wifi hp mouse, and i wish to configure it on ubuntu 13-04, but i am can’t do it, can you help me?
    The problem is already in the forst lines of the guide, i have this different output:

    $ iw list

    Supported interface modes:
    * IBSS
    * managed
    * AP
    * AP/VLAN
    * WDS
    * monitor
    * mesh point

    there isn’t the P2P option, what have I to do?
    Thanks for answer

    • Hi Marco,

      unfortunately it appears like your wi-fi interface does not support P2P operation, so there’s not much you can do apart from waiting P2P mode to be implemented for your specific card. Can you tell which wi-fi driver are you using? You can find it with lspci.

      Fabio

      • Marco says:

        Thanks for your answer, the output of the command Ispci is:

        00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
        00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06)
        00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
        00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
        00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 04)
        00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04)
        00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 04)
        00:1b.0 Audio device: Intel Corporation Lynx Point High Definition Audio Controller (rev 04)
        00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev d4)
        00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev d4)
        00:1c.3 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #4 (rev d4)
        00:1c.6 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #7 (rev d4)
        00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 04)
        00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 04)
        00:1f.2 SATA controller: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] (rev 04)
        00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 04)
        01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
        08:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe
        08:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
        09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5227 (rev 01)
        0f:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 0c)

        Thanks a lot, if you can help me i will be grate to you

      • Hi Marco,

        so that should be the Ralink RT3290, and it seems that there is no P2P support in the kernel right now. The good news is that the driver seems to be based on a generic Ralink library, so it’s not unlikely that P2P would be added in the future, but there’s not much you can do now.

        Fabio

  4. Marco says:

    thanks for answer, but i haven’t understood everything so well, it is an hardware or software problem?
    The PC it is an Hp Envy 17, was running win8 and the mouse worked, now i have installed ubuntu and how can be possible that the hardware doesn’t support the mouse anymore?
    here there is the whole output of iw list, in the last lines there is written P2P and P2P client.

    Wiphy phy0
    Band 1:
    Capabilities: 0x172
    HT20/HT40
    Static SM Power Save
    RX Greenfield
    RX HT20 SGI
    RX HT40 SGI
    RX STBC 1-stream
    Max AMSDU length: 3839 bytes
    No DSSS/CCK HT40
    Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
    Minimum RX AMPDU time spacing: 2 usec (0x04)
    HT RX MCS rate indexes supported: 0-7, 32
    TX unequal modulation not supported
    HT TX Max spatial streams: 1
    HT TX MCS rate indexes supported may differ
    Frequencies:
    * 2412 MHz [1] (20.0 dBm)
    * 2417 MHz [2] (20.0 dBm)
    * 2422 MHz [3] (20.0 dBm)
    * 2427 MHz [4] (20.0 dBm)
    * 2432 MHz [5] (20.0 dBm)
    * 2437 MHz [6] (20.0 dBm)
    * 2442 MHz [7] (20.0 dBm)
    * 2447 MHz [8] (20.0 dBm)
    * 2452 MHz [9] (20.0 dBm)
    * 2457 MHz [10] (20.0 dBm)
    * 2462 MHz [11] (20.0 dBm)
    * 2467 MHz [12] (20.0 dBm)
    * 2472 MHz [13] (20.0 dBm)
    * 2484 MHz [14] (disabled)
    Bitrates (non-HT):
    * 1.0 Mbps
    * 2.0 Mbps (short preamble supported)
    * 5.5 Mbps (short preamble supported)
    * 11.0 Mbps (short preamble supported)
    * 6.0 Mbps
    * 9.0 Mbps
    * 12.0 Mbps
    * 18.0 Mbps
    * 24.0 Mbps
    * 36.0 Mbps
    * 48.0 Mbps
    * 54.0 Mbps
    max # scan SSIDs: 4
    max scan IEs length: 2257 bytes
    Coverage class: 0 (up to 0m)
    Supported Ciphers:
    * WEP40 (00-0f-ac:1)
    * WEP104 (00-0f-ac:5)
    * TKIP (00-0f-ac:2)
    * CCMP (00-0f-ac:4)
    Available Antennas: TX 0 RX 0
    Supported interface modes:
    * IBSS
    * managed
    * AP
    * AP/VLAN
    * WDS
    * monitor
    * mesh point
    software interface modes (can always be added):
    * AP/VLAN
    * monitor
    valid interface combinations:
    * #{ AP } <= 8,
    total <= 8, #channels <= 1
    Supported commands:
    * new_interface
    * set_interface
    * new_key
    * new_beacon
    * new_station
    * new_mpath
    * set_mesh_params
    * set_bss
    * authenticate
    * associate
    * deauthenticate
    * disassociate
    * join_ibss
    * join_mesh
    * set_tx_bitrate_mask
    * action
    * frame_wait_cancel
    * set_wiphy_netns
    * set_channel
    * set_wds_peer
    * Unknown command (84)
    * Unknown command (87)
    * Unknown command (85)
    * Unknown command (89)
    * Unknown command (92)
    * testmode
    * connect
    * disconnect
    Supported TX frame types:
    * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    Supported RX frame types:
    * IBSS: 0x40 0xb0 0xc0 0xd0
    * managed: 0x40 0xd0
    * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * mesh point: 0xb0 0xc0 0xd0
    * P2P-client: 0x40 0xd0
    * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * Unknown mode (10): 0x40 0xd0
    Device supports RSN-IBSS.
    HT Capability overrides:
    * MCS: ff ff ff ff ff ff ff ff ff ff
    * maximum A-MSDU length
    * supported channel width
    * short GI for 40 MHz
    * max A-MPDU length exponent
    * min MPDU start spacing
    Device supports TX status socket option.
    Device supports HT-IBSS.

    • That’s a software limitation, it just means that the functionality has not been implemented (yet) in the Linux driver.

      • Marco says:

        Ok thanks, when do you think i will be able to use it?
        Thanks forma answer

      • Hard to say, but it looks like the driver is maintained by the community, so I would not exclude that, but it could easily take a year or so. Even iwlwifi P2P implementation is still considered experimental…

      • Marco says:

        I understand, it’s a pity, i have spent 50 euros, i just have to wait, switching to windows only for the mouse isn’t worth..or not?

  5. Mark says:

    Hi Fabio, nice and clearly written guide, however I have been stuck for hours at the ‘> p2p_group_add’ part. My wpa_cli responds with the error message ‘UNKNOWN COMMAND’, even though the command is listed when I use ‘# wpa_cli help p2p’, I confirmed that several times.

    lspci returns:

    04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 03)

    Do I need to change to the nl80211 driver and how do I do that?

    I am on Ubuntu 13.04 and also own the HP Wi-fi wireless mouse.

    Hope you can help me out.

    Bye,

    Mark

    • Hi Mark!

      The error seems to indicate that the version of wpa_supplicant you’re using is built without p2p support, you may have to build from source with a custom config. Beside that the PCI device you listed is a wired network card so you are looking at the wrong one! :-)

      Fabio

      • Mark says:

        Hi Fabio, thanks for the answer. I did build wpa_supplicant from the latest source. Maybe it went wrong because I did make && make install two times. The first time I forgot to manually edit the config file before building. The second time I used the custom config settings that are recommended in your guide. Maybe some things got mixed up? However, I have no idea how to completely remove the built from source wpa_supplicant, so I could start again with a clean install. And thanks for noticing that I looked at the wrong device ;-) I will check it again tonight.

      • Hi! Running make install twice is not a problem, it will just overwrite the files. Check what’s in /usr/local, your stuff built from source should be there, separated from the one you install with the package manager.

        Fabio

  6. Mark says:

    Ok, there are some wpa files in usr/local/sbin. I will leave them for now. I just realised I have my wifi on a usb dongle, so of course I had to run lsusb instead of lspci… ;-) I’m such a noob. It returns:

    Bus 001 Device 004: ID 0cf3:1002 Atheros Communications, Inc. TP-Link TL-WN821N v2 802.11n [Atheros AR9170]

    I’m pretty sure the Wifi Direct support is there. I’m guessing the problem lies with the driver, because every step in your guide goes smoothly except for the part where you write to change the main wireless connection to the nl80211 driver… I don’t know how to do that… Could it be that’s why the command p2p_group_add fails in the next step?

    I appreciate your help very much.

    Mark

    • I just realized I missed the part where you mentioned wpa_cli help in your original post! :-) So, my guess would be that you are running the correct version of wpa_cli against the default version wpa_supplicant, so you have the command listed in the client but it’s not understood by the supplicant, hence it returns UNKNOWN_COMMAND (referred to the actual wpa_cli -> wpa_supplicant control command). One other explanation is, as you suggested, that you are running with the wext driver, and that returns a “command not impelemented” error that may be confusingly mapped as UNKNOWN_COMMAND.

      In both cases, I don’t know how to tell NetworkManager (that’s what I guess you’re using on your ubuntu) to change the driver, but you may test the whole thing manually by:
      $ killall NetworkManager # or maybe: service network-manager stop
      $ cd /usr/local/sbin
      $ ./wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf # you need a manual static configuration here

      The above command runs wpa_supplicant manually, and -D sets the driver.

      At this point you can try to fire up wpa_cli and send the group add command again. To get back connectivity just kill wpa_supplicant and restart NetworkManager (or reboot).

      Good luck!

  7. Mark says:

    Well, I’m still totally lost. I have removed wpa_supplicant and re-installed again. But many things go wrong during building now. I have version 2.0, so that’s the right one isn’t it? Also I don’t know how I could update my wpa_cli, I can’t find any information about that online.

    Some lines I get back from make && make install:

    […

    /usr/include/netlink/socket.h:57:14: note: expected ‘struct nl_handle *’ but argument is of type ‘struct nl_sock *’

    […]

    ../src/drivers/driver_nl80211.c:8483:2: attention: passing argument 1 of ‘nl_socket_get_fd’ from incompatible pointer type [enabled by default]

    […]

    /usr/bin/ld: cannot find -lnl-3
    /usr/bin/ld: cannot find -lnl-genl-3
    …]

    Another evening gone ;-) I will report back if I make any progress. Thanks again!

    • Well, if it can help I remember wpa_supplicant to be quite hostile to build from source most of the time! :-)

      Anyway, I’ve always used some random git version, if it does not build you can either try to change the config or go back in time with the revisions… Good luck with it!

  8. Mark says:

    Hi Fabio, one more question. I built from source because I know how to do that, but not (yet) when things start to get more complicated ;-) I have been searching for a beginner’s guide to git on the web, but it looks scarily complex to me. I just want to get wpa_supplicant up and running, not learn everything about git because I’m not a developer myself (far from it). So how do I install wpa_supplicant from git without getting into too much detail? At this point I made a clone of the repository from git://w1.fi/srv/git/hostap.git and now I have no idea at all what to do with it or where it is on my hard drive…

    • Hi Mark, after you did the clone you should have a copy of the last sources in a directory where you ran the command, from there you build like the normal distributions. Just try the latest version, it may just works.

  9. Robson Pereira says:

    Olá Fabiobaitieri.
    Como instalar o HP Wi-fi em uma máquina com Debian?
    Obrigado pela atenção
    Robson

    • Hi Robson!

      I don’t really know if Debian has anything that helps, such as some repo with a fancy version of wpa_supplicant or something else… but the instructions on the post should be distribution agnostics, so just build from sources!

      Fabio

  10. Alisson says:

    Result command iw list:

    Wiphy phy0
    Band 1:
    Capabilities: 0x1072
    HT20/HT40
    Static SM Power Save
    RX Greenfield
    RX HT20 SGI
    RX HT40 SGI
    No RX STBC
    Max AMSDU length: 3839 bytes
    DSSS/CCK HT40
    Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
    Minimum RX AMPDU time spacing: 4 usec (0x05)
    HT TX/RX MCS rate indexes supported: 0-15, 32
    Frequencies:
    * 2412 MHz [1] (15.0 dBm)
    * 2417 MHz [2] (15.0 dBm)
    * 2422 MHz [3] (15.0 dBm)
    * 2427 MHz [4] (15.0 dBm)
    * 2432 MHz [5] (15.0 dBm)
    * 2437 MHz [6] (15.0 dBm)
    * 2442 MHz [7] (15.0 dBm)
    * 2447 MHz [8] (15.0 dBm)
    * 2452 MHz [9] (15.0 dBm)
    * 2457 MHz [10] (15.0 dBm)
    * 2462 MHz [11] (15.0 dBm)
    * 2467 MHz [12] (15.0 dBm) (passive scanning, no IBSS)
    * 2472 MHz [13] (15.0 dBm) (passive scanning, no IBSS)
    Bitrates (non-HT):
    * 1.0 Mbps
    * 2.0 Mbps (short preamble supported)
    * 5.5 Mbps (short preamble supported)
    * 11.0 Mbps (short preamble supported)
    * 6.0 Mbps
    * 9.0 Mbps
    * 12.0 Mbps
    * 18.0 Mbps
    * 24.0 Mbps
    * 36.0 Mbps
    * 48.0 Mbps
    * 54.0 Mbps
    Band 2:
    Capabilities: 0x1072
    HT20/HT40
    Static SM Power Save
    RX Greenfield
    RX HT20 SGI
    RX HT40 SGI
    No RX STBC
    Max AMSDU length: 3839 bytes
    DSSS/CCK HT40
    Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
    Minimum RX AMPDU time spacing: 4 usec (0x05)
    HT TX/RX MCS rate indexes supported: 0-15, 32
    Frequencies:
    * 5180 MHz [36] (15.0 dBm) (passive scanning, no IBSS)
    * 5200 MHz [40] (15.0 dBm) (passive scanning, no IBSS)
    * 5220 MHz [44] (15.0 dBm) (passive scanning, no IBSS)
    * 5240 MHz [48] (15.0 dBm) (passive scanning, no IBSS)
    * 5260 MHz [52] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5280 MHz [56] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5300 MHz [60] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5320 MHz [64] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5500 MHz [100] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5520 MHz [104] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5540 MHz [108] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5560 MHz [112] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5580 MHz [116] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5600 MHz [120] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5620 MHz [124] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5640 MHz [128] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5660 MHz [132] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5680 MHz [136] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5700 MHz [140] (15.0 dBm) (passive scanning, no IBSS, radar detection)
    * 5745 MHz [149] (15.0 dBm) (passive scanning, no IBSS)
    * 5765 MHz [153] (15.0 dBm) (passive scanning, no IBSS)
    * 5785 MHz [157] (15.0 dBm) (passive scanning, no IBSS)
    * 5805 MHz [161] (15.0 dBm) (passive scanning, no IBSS)
    * 5825 MHz [165] (15.0 dBm) (passive scanning, no IBSS)
    Bitrates (non-HT):
    * 6.0 Mbps
    * 9.0 Mbps
    * 12.0 Mbps
    * 18.0 Mbps
    * 24.0 Mbps
    * 36.0 Mbps
    * 48.0 Mbps
    * 54.0 Mbps
    max # scan SSIDs: 20
    max scan IEs length: 195 bytes
    Coverage class: 0 (up to 0m)
    Supported Ciphers:
    * WEP40 (00-0f-ac:1)
    * WEP104 (00-0f-ac:5)
    * TKIP (00-0f-ac:2)
    * CCMP (00-0f-ac:4)
    Available Antennas: TX 0 RX 0
    Supported interface modes:
    * IBSS
    * managed
    * AP
    * AP/VLAN
    * monitor
    software interface modes (can always be added):
    * AP/VLAN
    * monitor
    valid interface combinations:
    * #{ managed } <= 1, #{ AP } <= 1,
    total <= 2, #channels <= 1, STA/AP BI must match
    * #{ managed } <= 2,
    total <= 2, #channels <= 1
    Supported commands:
    * new_interface
    * set_interface
    * new_key
    * new_beacon
    * new_station
    * new_mpath
    * set_mesh_params
    * set_bss
    * authenticate
    * associate
    * deauthenticate
    * disassociate
    * join_ibss
    * join_mesh
    * remain_on_channel
    * set_tx_bitrate_mask
    * action
    * frame_wait_cancel
    * set_wiphy_netns
    * set_channel
    * set_wds_peer
    * Unknown command (84)
    * Unknown command (87)
    * Unknown command (85)
    * Unknown command (89)
    * Unknown command (92)
    * testmode
    * connect
    * disconnect
    Supported TX frame types:
    * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    * Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    Supported RX frame types:
    * IBSS: 0x40 0xb0 0xc0 0xd0
    * managed: 0x40 0xd0
    * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * mesh point: 0xb0 0xc0 0xd0
    * P2P-client: 0x40 0xd0
    * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
    * Unknown mode (10): 0x40 0xd0
    Device supports RSN-IBSS.
    WoWLAN support:
    * wake up on disconnect
    * wake up on magic packet
    * wake up on pattern match, up to 20 patterns of 16-128 bytes
    * can do GTK rekeying
    * wake up on GTK rekey failure
    * wake up on EAP identity request
    * wake up on rfkill release
    HT Capability overrides:
    * MCS: ff ff ff ff ff ff ff ff ff ff
    * maximum A-MSDU length
    * supported channel width
    * short GI for 40 MHz
    * max A-MPDU length exponent
    * min MPDU start spacing
    Device supports TX status socket option.
    Device supports HT-IBSS.

    You can install?

    • If your question is if it looks like it has P2P support, the answer is no, just compare the output with what I posted, P2P stuff should appear in “Supported interface modes”.

  11. ferpiko says:

    Hi, could you help me with making this same mouse work on windows 8 64b?
    Is there any chance of doing some modification on the driver for win 7 64b (wich is the only one you can download from the HP web) to make it work on win8? I would really apreciate it!

  12. alex says:

    How to add this to autostart on system boot?

    • Hi! That may be a bit tricky, wpa_cli command can be easily scripted (just run wpa_cli ), but I think you want to run those after the normal wifi connection is up, so you may need something more than just some line in rc.local or whatever your distro is using. Sad note: I’m not using this anymore since Intel dropped p2p support from iwlwifi on newer kernels. :-(

  13. sjalvete says:

    Uhm… everything seems to work, i see the device in wpa_cli all_sta, but i don’t see the new usb device in dmesg. mouse keeps blinking

    38:0d:d4:02:7e:f0
    flags=[AUTH][ASSOC][AUTHORIZED]
    aid=1
    capability=0x411
    listen_interval=100
    supported_rates=0c 12 18 24 30
    timeout_next=NULLFUNC POLL
    dot11RSNAStatsSTAAddress=38:0d:d4:02:7e:f0
    dot11RSNAStatsVersion=1
    dot11RSNAStatsSelectedPairwiseCipher=00-0f-ac-4
    dot11RSNAStatsTKIPLocalMICFailures=0
    dot11RSNAStatsTKIPRemoteMICFailures=0
    hostapdWPAPTKState=11
    hostapdWPAPTKGroupState=0
    wpsUuid=f53e5a2c-604c-483f-9256-380dd4027ef0
    wpsPrimaryDeviceType=2-0050F204-0
    wpsDeviceName=PANdev
    wpsManufacturer=Ozmo
    wpsModelName=HP Wi-Fi Mobile
    wpsModelNumber=OZ2000
    wpsSerialNumber=0B0B1A010A000148
    rx_packets=946
    tx_packets=465
    rx_bytes=19270
    tx_bytes=123939
    connected_time=115

    any ideas? ubuntu 14.04 lts

    thanks in advance

    • Well the wifi part seems to be fine… did you load the ozwpan driver (with the right parameter)? You could try unload and reload it just in case… you should at least see the virtual usb hub created by the driver.

      • sjalvete says:

        uhm. sorry, lol. i entered p2p_wlan0-0 in ozwpan. now everything works just fine (unlike windows, where it used to lose connection every 15 min or so). now do you by any chance have an Idea how to do it with a shell script?

      • sjalvete says:

        ok, sorry again, i read the comments and found out my question was a dupe. if i come up with something, i will post it here

  14. tug says:

    Dear fabio,

    I am trying to set up my mouse hp wifi

    Everything is fine till I enter the command p2p_group_add:

    P2P-GROUP-REMOVED p2p-wlan0-0 GO reason=REQUEST

    maybe the CONFIG_IWLWIFI_P2P is not enabled in my kernel but I don’t know how to check it and how to change it.
    I am running ubuntu 14.04.

    Thank for your help.

    Tug

    • Hey Tug, that’s awkward… sounds like a bug, you should try rebuilding wpa_supplicant from git. About the kernel option, don’t waste time looking for it: it has been dropped together with its code in recent kernels. :-( That part is not going to work anymore in iwlwifi… I think it’s going to be supported in newer Intel chipset only.

  15. Denis says:

    hi,
    im trying to install my hp wifi mouse in fedora 22 and im stuck at having the ozwpan drivers built as a module. im cloning the git repository that has the drivers which seems to be a clone into the kernel. is this the right way??

    • Hey Denis, the driver seems to be only distributed with the whole kernel so you probably want to grab the kernel source for your distro if you don’t want to replace the whole kernel just to have the module… I don’t really know how to do that for Fedora though. One alternative would be to repack the mainline module as an external module, which should only involve creating a new makefile for it.

      • Actually, do you still need all of this? I just tested the mouse (after years :-) on an Ubuntu Trusty LTS something and it worked without any custom kernel, the module was already installed as well, I just had to do the wpa_cli stuff… yay! :-)

  16. Manuel Fabri says:

    Hi Fabio,

    Nice post! A bit hard to follow for me that I’m quite new to Linux world… Do you, by chance, know if this might work on a Lubuntu 18.04 distro? I’m running it on a Samsung N150P for academic purposes and reviving this bloody mouse will be excellent.

    Thanks in advance,
    Manuel

    • Hey Manuel, the module has been pulled from mainline some time ago, there’s an external repo for it here: https://github.com/chunkeey/ozwpan, you may have to fix something to make it work on a modern kernel, but give it a try. Commercially I think that the design is dead, the company went through two acquisitions, would not expect anything new on that front… which is too bad, it was a great product. :-(

Leave a reply to fabiobaltieri Cancel reply