Java-based development for the SpaceBall 5000
Moderator: Moderators
ask for help for the spaceball 5000?
I am a graduate student of the Virtual Reality Lab in Southwest Jiaotong University, China. I have been trying to write the Java-based driver program for SpaceBall5000 since this June. This work takes me a lot of time. Unfortunately, up to now I have not settled it down.
I downloaded one driver program for Spaceball 4000, and modified it to obtain the Spaceball 5000 driver. However, I always failed in running the program of Spaceball4000Test.java. Following are two main problems I met:
1. I am wondering if the self-defined parameters in the programs of SpaceballPacket.java and Spaceball4000Packet, such as BALL_DATA=0x44,BUTTON_DATA=0x4B, are related to the version of Spaceball? If so, how to find these inter parameters? I search for them through Internet but cannot find useful data. I found if BALL_DATA=0x64 and BUTTON_DATA=0x6B, then the data of the press keys and control ball can be read out, but the data of the control ball almost doesn’t change.
2.The character-string is defined in the method of program of Spaceball4000Test.java.
driver.emitPatternedBeep
(
new char[]{'a','A','m','M','d','D','z','Z'}
);
I am wondering if its function is only to control the length of sound, and it has nothing to do with other orders? I tried to replace the character-string 'm','M', leading to the failure in reading the control ball data.
I downloaded one driver program for Spaceball 4000, and modified it to obtain the Spaceball 5000 driver. However, I always failed in running the program of Spaceball4000Test.java. Following are two main problems I met:
1. I am wondering if the self-defined parameters in the programs of SpaceballPacket.java and Spaceball4000Packet, such as BALL_DATA=0x44,BUTTON_DATA=0x4B, are related to the version of Spaceball? If so, how to find these inter parameters? I search for them through Internet but cannot find useful data. I found if BALL_DATA=0x64 and BUTTON_DATA=0x6B, then the data of the press keys and control ball can be read out, but the data of the control ball almost doesn’t change.
2.The character-string is defined in the method of program of Spaceball4000Test.java.
driver.emitPatternedBeep
(
new char[]{'a','A','m','M','d','D','z','Z'}
);
I am wondering if its function is only to control the length of sound, and it has nothing to do with other orders? I tried to replace the character-string 'm','M', leading to the failure in reading the control ball data.
Hello Dan,
unfortunately we can not give you support for the Java driver for the Spacball 4000, because this is from someone else. For support please contact the person who created this package.
Please be aware that the protocol of the Spaceball 4000 and the SpaceBall 5000 are totally different.
We do have a SDK for Unix (http://www.3dconnexion.com/support/4h.php) that sends the data of the device via XClientMessages to an application. When you implement the interface from this SDK you can always use any of our supported devices and can have updates if new devices are released.
Uta Ludwig
3Dconnexion
unfortunately we can not give you support for the Java driver for the Spacball 4000, because this is from someone else. For support please contact the person who created this package.
Please be aware that the protocol of the Spaceball 4000 and the SpaceBall 5000 are totally different.
We do have a SDK for Unix (http://www.3dconnexion.com/support/4h.php) that sends the data of the device via XClientMessages to an application. When you implement the interface from this SDK you can always use any of our supported devices and can have updates if new devices are released.
Uta Ludwig
3Dconnexion
Hi Dan,
We moved this topic in here since you are developing on Windows and not on UNIX/Linus as we first assumed.
Our SDK on Windows uses the same interface for all devices. In the words, the codes that you get are not device specific in terms of how the data needs to be processed.
We suggest you to download the SDK from our web (if you have not already done so) and look in the HTML documentation. The meaning of the codes (bitfields) when processing button events is detailed in there.
We moved this topic in here since you are developing on Windows and not on UNIX/Linus as we first assumed.
Our SDK on Windows uses the same interface for all devices. In the words, the codes that you get are not device specific in terms of how the data needs to be processed.
We suggest you to download the SDK from our web (if you have not already done so) and look in the HTML documentation. The meaning of the codes (bitfields) when processing button events is detailed in there.
Nuno Gomes
Hi,Uta Ludwig
Thank you for your reply. How can I know the protocol of SpaceBall 5000?
I wonder if you have the list of the self-defined parameters which drives the events of Spaceball 5000, such as emitting sounds. Would you provide it to me for study? Thank you in advance.
Dan
Thank you for your reply. How can I know the protocol of SpaceBall 5000?
I wonder if you have the list of the self-defined parameters which drives the events of Spaceball 5000, such as emitting sounds. Would you provide it to me for study? Thank you in advance.
Dan
uludwig wrote:Hello Dan,
unfortunately we can not give you support for the Java driver for the Spacball 4000, because this is from someone else. For support please contact the person who created this package.
Please be aware that the protocol of the Spaceball 4000 and the SpaceBall 5000 are totally different.
We do have a SDK for Unix (http://www.3dconnexion.com/support/4h.php) that sends the data of the device via XClientMessages to an application. When you implement the interface from this SDK you can always use any of our supported devices and can have updates if new devices are released.
Uta Ludwig
3Dconnexion
Hello Dan,
unfortunately we don't send out the protocol of our devices.
To implement our devices into your application you can use our SDK. There is an interface for external applications to get the data that is sent by the device. A new version of our SDK is planned for the first quarter of next year. Please check our website from time to time to be informed about the newest updates.
Thanks for your interest and feedback!
Uta
3Dconnexion
unfortunately we don't send out the protocol of our devices.
To implement our devices into your application you can use our SDK. There is an interface for external applications to get the data that is sent by the device. A new version of our SDK is planned for the first quarter of next year. Please check our website from time to time to be informed about the newest updates.
Thanks for your interest and feedback!
Uta
3Dconnexion
Hi Uta,
Thanks for your help. I have read the SDK you mentioned. I found all the samples are Win32 or MFC programs, but what I need are console programs. If you have these kinds of programs, could you provide me one or several for reference? Thank you in advance.
Dan
Thanks for your help. I have read the SDK you mentioned. I found all the samples are Win32 or MFC programs, but what I need are console programs. If you have these kinds of programs, could you provide me one or several for reference? Thank you in advance.
Dan
uludwig wrote:Hello Dan,
unfortunately we don't send out the protocol of our devices.
To implement our devices into your application you can use our SDK. There is an interface for external applications to get the data that is sent by the device. A new version of our SDK is planned for the first quarter of next year. Please check our website from time to time to be informed about the newest updates.
Thanks for your interest and feedback!
Uta
3Dconnexion
Hi Dan,
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
Hi Jim,
Thank you very much. I have downloaded the packages you provided for me. The programs are just what I need. I will develop some samples for Spaceball 5000 in the coming several weeks and give you message when I finish that. Wish a merry Christmas!
Dan
Thank you very much. I have downloaded the packages you provided for me. The programs are just what I need. I will develop some samples for Spaceball 5000 in the coming several weeks and give you message when I finish that. Wish a merry Christmas!
Dan
jwick wrote:Hi Dan,
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
Hi Jim,
I have tested the program using Spaceball5000 in application program, but there is another problem that the spaceball cannot function in the applet of "HelloSpacemouse.java" embeded in web page. Have you ever face such a problem? How can I solve it? Thank you for your time.
Dan
I have tested the program using Spaceball5000 in application program, but there is another problem that the spaceball cannot function in the applet of "HelloSpacemouse.java" embeded in web page. Have you ever face such a problem? How can I solve it? Thank you for your time.
Dan
jwick wrote:Hi Dan,
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
Hi Dan,
What problem are you having that indicates that it won't work? Does it never get events? If so, it is probably because the driver can't find your applet insidet the web page. There is a function called SiGrabDevice that you can use to tell the driver to send all events to your app regardless of where keyboard focus is. This way you will always get events while your app is running.
Let me know if this fixes your issue.
Jim
3Dx Software Development
What problem are you having that indicates that it won't work? Does it never get events? If so, it is probably because the driver can't find your applet insidet the web page. There is a function called SiGrabDevice that you can use to tell the driver to send all events to your app regardless of where keyboard focus is. This way you will always get events while your app is running.
Let me know if this fixes your issue.
Jim
3Dx Software Development
Hi Jim,
Thank you very much. I have tried to call the function SiGrabDevice, but the applet still cannot work in the html page. Would you embed your program in the web page by yourself? You may find the problem I indicated.
Dan
Thank you very much. I have tried to call the function SiGrabDevice, but the applet still cannot work in the html page. Would you embed your program in the web page by yourself? You may find the problem I indicated.
Dan
jwick wrote:Hi Dan,
What problem are you having that indicates that it won't work? Does it never get events? If so, it is probably because the driver can't find your applet insidet the web page. There is a function called SiGrabDevice that you can use to tell the driver to send all events to your app regardless of where keyboard focus is. This way you will always get events while your app is running.
Let me know if this fixes your issue.
Jim
3Dx Software Development
Hi Jim,
Thank you for your help. I have tested other similar JNI programs related to win32 variables and found it was difficult to embed them in html page. I guess that the problem may has something to do with win32 variables in JNI program. I will try to write some Java programs by myself and test them in future. Thank you again.
Dan
Thank you for your help. I have tested other similar JNI programs related to win32 variables and found it was difficult to embed them in html page. I guess that the problem may has something to do with win32 variables in JNI program. I will try to write some Java programs by myself and test them in future. Thank you again.
Dan
Re:
The ftp link seems to be broken. Is there another place where JNIsiapp.zip can be downloaded? I'd like to try to add Spacemouse support to a Java application.jwick wrote:Hi Dan,
Do you mean console as in Windows console (no GUI, no Windows main loop), or console as in xbox 360/ps3/Wii?
If the former, there is some sample Java code that you may be able to use on:
ftp://ftp-us.3dconnexion.com/jni
login: jni
password: dev1221
JNIsiapp.zip contains a JNI version of the 3Dconnexion siapp static library that is used by the 3DxWare Windows SDK. It implements most of the functions from the Windows C++ SDK. I'll admit I've only tested the ones in the sample code (JNIsiappThread.java). Obviously the siapp static library became a DLL for Java (JNIsiapp.dll). There is a HelloUniverse program in the src directory that exercises the interface. The reading of the device is in JNIsiappThread.java. The assumption is that you will have a thread dedicated to handling the device. Your code will wait for input in a call to JNIsiapp.SiWaitForEvent, then get the data from JNIsiapp.SiGetEvent. Make sure to call SiClose and SiTerminate or kill your thread or your thread won't return from the wait.
In addition to this code, I think you also need to install the 3DxWare SDK and the driver from our website. All of these pieces are free from any licensing obligations.
HelloSpacemouse3DxWare.zip is a version of the Java3D HelloSpacemouse program from the net that uses the 3DxWare driver instead of going to the serial port. The changes are limited to the pollAndProcessInput method of the SpacemouseDevice class. If you use this method, you will be able to support any 3Dx device that the driver supports, but, of course, you are limited to Windows.
If you use this and make changes, or create examples, that might help others, please post your changes.
Have fun!
Jim
3Dx Software Development
Re: Java-based development for the SpaceBall 5000
This thread and that link is over 10yrs old.
Have you signed up to get the SDK? http://www.3dconnexion.com/service/soft ... loper.html
Have you signed up to get the SDK? http://www.3dconnexion.com/service/soft ... loper.html
Spacemice -- Input devices for a 3D world.