Skip to content

Conversation

@Tuburni
Copy link

@Tuburni Tuburni commented Apr 17, 2023

Exception has occurred: AttributeError
'socket' object has no attribute 'write'
File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 125, in send_duml
s.write(packet)
^^^^^^^
File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 189, in
send_duml(s, 0x0a, 0x06, 0x40, 0x06, 0x24, bytearray.fromhex('01'))
AttributeError: 'socket' object has no attribute 'write'

@Matsemann
Copy link
Owner

Hi, sounds like it's a different project you're using, as there is no python code in my repo. Looks like you're using the code from here: https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL


Cool project, @IvanYaky , I added a link to it from my readme :)

@Tuburni
Copy link
Author

Tuburni commented Apr 19, 2023

Ok, maybe your project will work with remote from DJI Mavik 3?

@Matsemann
Copy link
Owner

This project only works for the old DJI (like, 10 years old). For other version see here: https://github.com/Matsemann/mDjiController#mdjicontroller

@ivnny
Copy link

ivnny commented Apr 20, 2023

@Matsemann Hi, thanks

@Tuburni https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL works great with Mavic 3 rc-n1(rc23 ) on Windows 11 but it's easy could be modified for Linux

@Xmen-ua
Copy link

Xmen-ua commented May 25, 2023

@Tuburni https://github.com/IvanYaky/DJI_RC-N1_SIMULATOR_FLY_DCL отлично работает с Mavic 3 rc-n1(rc23) в Windows 11, но его легко модифицировать для Linux.

Hi, I have problem in run emulator.
Traceback (most recent call last): File "C:\dji\main.py", line 13, in <module> gamepad = vg.VX360Gamepad() File "C:\Users\Xmen\AppData\Local\Programs\Python\Python311\Lib\site-packages\vgamepad-0.0.8-py3.11.egg\vgamepad\win\virtual_gamepad.py", line 115, in init super().init() File "C:\Users\Xmen\AppData\Local\Programs\Python\Python311\Lib\site-packages\vgamepad-0.0.8-py3.11.egg\vgamepad\win\virtual_gamepad.py", line 60, in init assert vcli.vigem_target_is_attached(self._devicep), "The virtual device could not connect to ViGEmBus." AssertionError: The virtual device could not connect to ViGEmBus.

@IvanYaky
Copy link

@Xmen-ua Please try this:

  1. pip uninstall vgamepad, and install it again: pip install vgamepad (I tested on vgamepad 0.0.8)
  2. If no effect try to remove and reinstall package ViGEmBUs, https://github.com/ViGEm/ViGEmBus/releases

@IvanYaky
Copy link

Exception has occurred: AttributeError 'socket' object has no attribute 'write' File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 125, in send_duml s.write(packet) ^^^^^^^ File "C:\Users\User\Downloads\DJI_RC-N1_SIMULATOR_FLY_DCL-master\DJI_RC-N1_SIMULATOR_FLY_DCL-master\main.py", line 189, in send_duml(s, 0x0a, 0x06, 0x40, 0x06, 0x24, bytearray.fromhex('01')) AttributeError: 'socket' object has no attribute 'write'

I suggest installing pyserial pip3 install pyserial

@Xmen-ua
Copy link

Xmen-ua commented May 29, 2023

@IvanYaky reinstalled ViGEmBUs, only 1.16.116 work in my case. Thanks for the help!

@K0KA0
Copy link

K0KA0 commented Nov 24, 2023

Hi, when I run the file it closes immediately, I tried to start it via IDLE so it said:```

= RESTART: S:\miniDjiController-master\main.py
Traceback (most recent call last):
  File "S:\miniDjiController-master\main.py", line 6, in <module>
    import serial, pyvjoy, argparse
ModuleNotFoundError: No module named 'serial'

What should i try? P.s: Use Mavic Mini RC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants