Read/write jw24f14 hid

This is the English forum for all topics related to JoyWarrior. Please post in English only

Moderator: Guido Körber

Post Reply
Posts: 4
Joined: Tue Jul 31, 2012 6:16 am
Location: TAU

Read/write jw24f14 hid

Post by novitsky »

I'm trying to write a python/c code to read the JW24f14 data and control the range/band options.
I try to use the usblib to communicate with the hid interface as describe in chapter 5.5 in the datasheet: ... eet_01.pdf
I couldn't understand the report structure - what should be entered in the write report and what in the read report when using pyusb or usblib functions.
I'm using Fedora 17 Linux system. I use libusb_control_transfer function based on this code: (attached)
should I send 2, 4 or 8 bytes?
the write report 0x80 return zeros.
the write report 0x82 return a read report of 0x02 and zeros but then the connection is lost and I have to re-plug the device in order to use it.
any advice?

C code for communicating with the JW24F14 using libusb
(2.42 KiB) Downloaded 593 times
Posts: 4
Joined: Tue Jul 31, 2012 6:16 am
Location: TAU

Re: Read/write jw24f14 hid

Post by novitsky »

I managed to write a c code for Linux that communicates with JoyWarrior24F14 via HID.
Feel free to use on your own risk.
It is in a working process so not all functionality is done.
in order to use it you must run as root or adjust udev rules.
instruction inside.
(7.53 KiB) Downloaded 557 times
aut disce aut discede
User avatar
Christoph Jung
Posts: 632
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin

Re: Read/write jw24f14 hid

Post by Christoph Jung »

Thanks for that.
I have also do some test with the libusb but I could not compile a working application.
So I have used hidapi to connect the JoyWarrior24F14 with Linux.
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
Posts: 1
Joined: Fri Jan 04, 2013 3:41 pm

Re: Read/write jw24f14 hid

Post by jimjack »

Hi Novitsky,

thanks for your excellent work.

I live in Germany and have also a JoyWarrior 24F24. I use your sowftare with a few changes.
This "new" software works like a seismometer daemon.
Unfortunately, there are almost nothing to detect here in my region in Germany ;-).

There are new routines for creating init values for comparison with the actual values. You can set a pause time
between reading values, a trigger value for writing seismometer data to a log file and also set the write time
for such a trigger event.
The data are written to a file like <seis_log_20130205.txt>. With this file you can generate a diagram with

For this new functions you must use the new parameter -t.

It is not a real daemon. You must start the pogramm with nohup like this

nohup joytest2 -t 50 500 0.008 >/dev/null &

It compiles and runs without any problems under Debian 6 Linux. You get a hugh amount of data.
The files have round about 120...150Mbyte on my machine.

Attached the my source code. It's not perfect und must be expanded but I hope this will help you
and others.

With best regards,
(10.3 KiB) Downloaded 498 times
Post Reply