Windows IoT Core

is it possible to install “Windows IoT Core” on Jetson?

Hi Andrey1984,

We don’t support it.

@kayccc Thank you for following up! Maybe you could you suggest a method for passing GPS messages from Jertson to Microsoft Azure IoT hub?

Hi @_av, I haven’t personally used it before, but I think you would need to install one of their Azure IoT SDK’s on your Jetson:

@dusty_nv Thank you for your following up!
Maybe you had some experience with non-Microsoft methods for passing GPS with message broker like MQQT?

I don’t, but I just found that DeepStream has integration with Azure IoT framework (and it supports MQQT also):

@dusty_nv , yes it has integration, but are there any insights on how to integrate GPS data with it?

Perhaps using metadata buffers? You may want to ask the question on the DeepStream forum to see how to best get the data into DeepStream.

It is not exactly very clear how to use the metadata buffers, given I just want to forward like /dev/pts/26 output with it, right?

terminal 1:

nvidia@nx_xavier:~$  socat -d -d pty,raw,echo=0 pty,raw,echo=0
2021/05/06 13:13:55 socat[23720] N PTY is /dev/pts/25
2021/05/06 13:13:55 socat[23720] N PTY is /dev/pts/26
2021/05/06 13:13:55 socat[23720] N starting data transfer loop with FDs [5,5] and [7,7]

terminal 2:

sudo apt install csh -y
nvidia@nx_xavier:~$ tclsh8.6 gpsfeed+.tcl 

From this point there will be opened GUI of the gpsfeed. - two
GUI windows;
e.g. in serial section goes insteead of default COM1 → /dev/pts/25; baudrate to ->9600
Then in second GUI window = pressing play [ in the top left - a circle icon with a dot in the center;]
Now from the third terminal the GPS feed is available

:~$ cat /dev/pts/26

So figuring out how to pass it through Deepstream might be overcomplicated, given the gps feed gonna be transmitted maybe?
I tried asking Message broker to send GPS - #7 by amycao
Maybe if to omit the DeepStream it would be less complicated to transfer the stream? Otherwise I will try to add more details to the DeepSteram post maybe someone will figure out how to do it

If you want to bypass DeepStream then it looks like the options are installing the Azure IoT SDK and using that, or using a message broker like MQTT directly. It looks like there is a Python package paho-mqtt for that.

yes, but I am missing the exact steps how to load the output of /dev/pst/26 to e.g. paho mqqt or any other equivalent e.g. mosquito;

The Dockerfile is simple:

FROM alpine
RUN apk update
RUN apk add mosquitto

CMD /usr/sbin/mosquitto                      

This image uses Alpine as a base then adds the mosquitto. Finally, it starts the broker with the CMD value.

To build it, run the command:

docker build -t mosquitto -f Dockerfile.mosquitto .

And to run on the default network:

docker run -it --rm --name mosquitto -p 1883:1883 mosquitto

What I am trying to find out is how exactly to subscribe the paho-mqtt to /dev/pts/26 - that is what I am trying to figure out there should be a simple command doing it probably. there should be a command like

import paho-mqtt

subscribe /dev/pts/26
instead of the latter it needs to be acttaul working line that I am trying to determine

My guess is that you will need to open the /dev/tty file in Python (or use pyserial module if needed), and extract the data programmatically in order to construct the messages for the broker. Or maybe there is some mosquitto command-line tool that relays messages from other files, I’m not sure.

with just python I could kind of read

import sys                                           

with open("/dev/pts/26", "wb+", buffering=0) as term:
        while True:
        	print(, end='')

based on


but at this point it seems missing integration with message broker

Yea, you will need to look up the docs and integrate it. They have some examples here:

yep, found some example

will try with something like the example

docker run -it --rm --name mosquitto -p 1883:1883 mosquitto

then trying to run modified code so it would conenct/ publish to the mosquitto

import os
from gps import *
from time import *
import time
import threading
import json
import paho.mqtt.client as mqtt
MQTT_BROKER = os.getenv('MQTT')

gpsd = None 

class GpsPoller(threading.Thread):
  def __init__(self):
    global gpsd #bring it in scope
    gpsd = gps(mode=WATCH_ENABLE) #starting the stream of info
    self.current_value = None
    self.running = True #setting the thread running to true

  def run(self):
    global gpsd
    while gpsp.running: #this will continue to loop and grab EACH set of gpsd info to clear the buffer

if __name__ == '__main__':
  gpsp = GpsPoller() # create the thread
    gpsp.start() # start it up
    while True:
      if gpsd.fix.latitude > 0:
        row = [ { 'latitude': str(gpsd.fix.latitude),
         'longitude': str(gpsd.fix.longitude),
         'utc': str(gpsd.utc),
         'time':   str(gpsd.fix.time),
         'altitude': str(gpsd.fix.altitude),
         'eps': str(gpsd.fix.eps),
         'epx': str(gpsd.fix.epx),
         'epv': str(gpsd.fix.epv),
         'ept': str(gpsd.fix.ept),
         'speed': str(gpsd.fix.speed),
         'climb': str(gpsd.fix.climb),
         'track': str(gpsd.fix.track),
         'mode': str(gpsd.fix.mode)} ]
json_string = json.dumps(row)
        client = mqtt.Client("P1")
        client.publish("gps", payload=json_string, qos=0, retain=True)


  except (KeyboardInterrupt, SystemExit): #when you press ctrl+c
    gpsp.running = False
    gpsp.join() # wait for the thread to finish what it's doing


we resumed to look how to incorporate any serial output e.g. as from /dev/tty into deepstream here Message broker to send GPS - #21 by Andrey1984
so any examples on adding serial input are welcome