Comments (8)
With Python, you can communicate with rasp_vusb_server running on PI device.
The communication is based on just SSL socket, referred to this receiver-side code at
- https://github.com/stjeong/rasp_vusb/blob/master/rasp_vusb_server/VUsbServer.cpp#L46
- https://github.com/stjeong/rasp_vusb/blob/master/rasp_vusb_server/MouseDevice.cpp
or, sender-side code at
- https://github.com/stjeong/rasp_vusb/blob/master/InputController/MouseDevice.cs
- https://github.com/stjeong/rasp_vusb/blob/master/InputController/UsbController.cs
I'm poor at python, so can't include source codes at this repo, but, I think you can do it. :) I'm looking forward to your PR.
from rasp_vusb.
Stupid question but to use ssl I require the private.key and the certchain.pem where in your code do you generate them or keep them
from rasp_vusb.
another question is it at all possible to tell me the format of the request to the server in the rasberry pi
from rasp_vusb.
Stupid question but to use ssl I require the private.key and the certchain.pem where in your code do you generate them or keep them
You can find those files at https://github.com/stjeong/rasp_vusb/tree/master/script
- key.pem
- test.pem
These files are copied into /share by deploy_with_pscp.bat, and load by VUsbServer::init_openssl function (https://github.com/stjeong/rasp_vusb/blob/master/rasp_vusb_server/VUsbServer.cpp#L192)
from rasp_vusb.
another question is it at all possible to tell me the format of the request to the server in the rasberry pi
Well... the packet format is explained in C# code. :)
You just need to convert "ConvertToMouseCommand" method into Python Language. (https://github.com/stjeong/rasp_vusb/blob/master/InputController/MouseDevice.cs#L11)
(Sorry for that I didn't documented.)
from rasp_vusb.
Hey guys, @The-Drobe have you been successful with your python implementation by any chance? Thank you!
from rasp_vusb.
@stjeong Or would it be easyer to do this in C++ on the Raspberry?
Is there a function i could call on the Raspberry to move the mouse of my connected Windows PC, maybe like SendRelative() in MouseDevice?
Thanks for your help, I'm sorry that as a beginner I don't really gain understanding of your code.
from rasp_vusb.
You can do that in C++ on the Raspberry PI directly. "MouseDevice" code within InputController is just for sending "mouse data" to rasp_vusb_server running on Raspberry PI.
So, you can use socket to send the "mouse data" from your program to rasp_vusb_sverver in C++ instead of C#.
If you run your program on Raspberry PI, you can just write "mouse data" to virtual device "/dev/hidg0" directly, no need to use socket, and no need to use rasp_vusb_server.
from rasp_vusb.
Related Issues (16)
- ABS mouse movements do not work HOT 4
- Mouse proxy HOT 1
- INCLUDE Directories HOT 1
- get bus error
- API docs/C++ DLL HOT 4
- Writing to the hid_tester input screen doesnt do anything HOT 1
- Job for usb_server.service failed because the control process exited with error code HOT 1
- Increase hold of left click HOT 2
- How to do a mouse click? HOT 1
- InputController.exe only searches for 192.168.178.255 HOT 1
- deploy script: ssh_init: Network error: Cannot assign requested address HOT 5
- Overall working flow HOT 1
- Mouse movement not working with Linux Systems HOT 4
- Fail in "Create Mouse/Keyboard USB gadgets" HOT 2
- Run by Pi HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasp_vusb.