Coder Social home page Coder Social logo

mcdiarmid / telemetry-via-digimesh Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 6.0 183 KB

Send and receive MAVLink telemetry data of UAVs using XBee radios with DigiMesh firmware

License: Mozilla Public License 2.0

Python 100.00%
xbee-radio uavs mesh-networking

telemetry-via-digimesh's Introduction

Gidday ๐Ÿ‘‹

๐Ÿ’ผ Embedded Software Engineer, formerly a Radio Fequency Engineer

๐ŸŽ“ Master of Engineering and Bachelor of Engineering (Hons.), both in Electrical and Electronic Engineering

๐Ÿ‘ Keen to contribute and add value to the vast open source software ecosystem

Stuff I Use

Python VS Code NumPy Matplotlib Pydantic Kivy GNURadio Ubuntu Archlinux C C++ Rust Qt Docker


telemetry-via-digimesh's People

Contributors

mcdiarmid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

telemetry-via-digimesh's Issues

Error while running XBee_to_UDP

I tried to run your first commit since what you've done is kind of like what I am trying to do with xbee. But I am getting this error when running the UDP side of the code.

Discovering Devices...
Finished: [<digi.xbee.devices.RemoteDigiMeshDevice object at 0x7f7c39df5588>]

0013a200419b5ad8
Created UDP link for wireless connection with 0013a200419b5ad8
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
15.77s | 0013a200419b5ad8                                                                                                                                                                                          
IN[0]  | 00, 00, D2, 20, DC, 3C, 6C, D0, CC, 3C, 9F, 72, 0A, 3D, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, D4, 87                                                                                            


Exception in thread Thread-4:
Traceback (most recent call last):
  File "/home/abhish/anaconda3/envs/xbee/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/abhish/anaconda3/envs/xbee/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "udp.py", line 125, in udp_thread
    outdata, _ = sock.recvfrom(KiB)  # TODO blocking by default
ConnectionRefusedError: [Errno 111] Connection refused

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
15.77s | 0013a200419b5ad8                                                                                                                                                                                          
IN[0]  | FE, 1C, EC, 01, 01, 1E, 69, CD, 04, 00, D2, E8, 8B, 3D, 34, FE, 18, BC, 7E, 2D, 0D, C0, 9D, 4F, 17, BB, D7, E7, 99, B9, 05, 1A, 10, 39, 75, 98, FE, 1C, ED, 01, 01, 21, 69, CD, 04, 00, 00, 00, 00, 00    
IN[1]  | 00, 00, 00, 00, B6, 08, 00, 00, BE, 08, 00, 00, F2, FF, 06, 00, 1A, 00, 42, 5B                                                                                                                            


Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/abhish/anaconda3/envs/xbee/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/abhish/anaconda3/envs/xbee/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "udp.py", line 82, in primary_loop
    sent = self.sockets[key].send(queued_data)
ConnectionRefusedError: [Errno 111] Connection refused

The change that I did compared to code of yours is, my XBee device supports sending only 73 bytes at a time. So, I changed

                if 100 <= px4.in_waiting < 4095:
			data = px4.read(px4.in_waiting)
			while data:
				print('[PX4 -> XBee] {}'.format(data[:255]))
				pkt_sent = xb.send_data(GCS, data[:255])
				data = data[255:]
		elif px4.in_waiting == 4095:
			px4.reset_input_buffer()
		else:
			pass

to

                if 100 <= px4.in_waiting < 4095:
			data = px4.read(px4.in_waiting)
			while data:
				print('[PX4 -> XBee] {}'.format(data[:70]))
				pkt_sent = xb.send_data(GCS, data[:70])
				data = data[70:]
		elif px4.in_waiting == 4095:
			px4.reset_input_buffer()
		else:
			pass

Can you please help me with this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.