reading UART port on Raspberry Pi 3 using IoT-edge - raspberry-pi3

I'm using IoT-Edge on my Raspberry Pi 3. Since IoT-edge isn't compatible with Windows 10 IoT Core on Raspberry Pi 3, my Raspberry is on Raspbian.
I'm trying to read my UART ports to read XBee sensor data.
My edge's modules are written in C# thus far.
I'm using Raspbian so I can't use the class System.IO.Ports.SerialPort since System.IO.Ports is only compatible on Windows system. Is there another way to read my UART ports inside my module? (I'm ready to write a module in something other than C# if I can deploy it the same way.)
If not, is there at least a way to read/write data from a shared file between containers/raspberry without manually changing docker container file binding mode each time we deploy a module version (since the default binding mode for docker container is read-only, but my Raspberry will have to send data to sensor too)?

You are right about .NET Core not supporting serial on Linux. The latest version of the Python SDK is ready to write Edge modules. We are working on a sample and development guidance on using it, but that's not out yet. Once we have the sample/guidance out (hopefully soon), you should be able to write your module in python and read/write from the serial port. I've confirmed that it works in an Edge container.

You can use .Net Core to read UART ports. .NET Core is a cross-platform, it supports Raspbian,and applications can be written in C#.You can refer to this topic about how to use System.IO.Ports.SerialPort in .Net Core.

Related

Flashing ESP32's memory without installing the whole IDF?

Problem
I'm looking for a way to flash an ESP32 module's memory without installing the whole IDF software suite.
Why
Because I want to integrate ESP32 onto a custom board along with a low-performance ARM-powered CPU which runs a tiny Linux distro (based on Debian), and I want to flash ESP32 from this tiny Linux distro.
I know I could use the bootloader, but who will upload the initial bootloader? I don't want to do extra steps, so my idea is to embed the ESP32 module onto my custom board, and let the Linux to flash it from factory-state (when it's flash is empty, ie. no preloaded bootloader). Or is the serial bootloader always preinstalled on all ESP32 modules (like on ESP-WROOM-32)?
Why I don't want to use IDF? Because I don't want to build or debug anything, I just want to flash myprogram.bin onto ESP32. Also, as the board is low-performance, it would take ages to download everything for running IDF.
Current state
The ESP32 module is now visible via UART (RX,TX,GND), and if I held low the GPIO0, it runs the bootloader (my current module is embedded onto a NodeMCU - but there is no USB connected, this is raw UART!):
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Could I expect the same behavior (controlling GPIO0 for running the bootloader) for all ESP32 modules, or this works just because guys at NodeMCU preprogrammed already some bootloader onto it?
I'm looking for a way to flash this ESP32 preferrably without any python script.
The ESP32 has a first-stage bootloader in ROM capable of writing to Flash - that's what's printing your output. You can talk to it if you know the protocol - this is implemented by the Python scripts in ESP IDF. If you don't want to use the official implementation because it's too heavy, you'll have to write your own implementation of this protocol which scratches your specific itch. Fortunately it's more or less documented and you can likely reverse engineer any missing knowledge from official Python scripts.
Actually Espressif also provides a nice and small binary for flashing ESPs:
https://github.com/espressif/esp-serial-flasher
Serial flasher component provides portable library for flashing Espressif SoCs (ESP32, ESP32-S2, ESP8266) from other host microcontroller. Espressif SoCs are normally programmed via serial interface (UART). Port layer for given host microcontroller has to be implemented, if not available.
One more (but very important) addition:
You have to modify this repo to make it work correctly, and also you might have to upload not just your binary, but also bootloader and partition_table.

Does the FTDI D2XX driver work on Ras Pi 3 b+ running Windows 10 IoT v.10.0.17661?

I'm trying to get data back from a magstripe reader and an rfid reader that are plugged into the raspberry pi and communicate via serial. I can connect to the readers but when I try to read from them I don't get anything.
Was wondering if the driver even works on the newer iot OS versions.
So I used the code located from this link! in conjunction with the driver install steps from the tutorial Rita shared and I was able to get the Serial Device's, open them and and start reading data.

Does Android things Stable release 1.0.0 officially supports Internet using usb stick via GSM/3g/4g for Raspberry Pi 3?

I want to provide IOT solutions using android things in remote areas where ethernet or wifi is not available , hence, does android things stable release 1.0 supports internet via usb dongle using sim like 3g/4g in raspberry pi 3 model B
According to the Unsupported Features list android.hardware.telephony is not supported. But you can connect 3G/4G modules via UART and use Internet data exchange via it's AT-commands (e.g. like described in this manual for SIMCom modules).

DS18B20 with NodeJS on Windows

I'm trying to read temperatures into NodeJS (or command-line program) app on Windows with DS18B20 thermometers connected to serial port.
There are some apps, but I can't use them (Digitemp - no support for Windows, Logtemp - it doesn't communicate with NodeJS.
Is there any possible way to read temperatures directly in NodeJS from serial port or from command-line program?
There are lots of tutorials and libraries for Arduino, but nothing for this issue.
Thanks

Run official Kinect SDK on iMac

I would like to create my Kinect development environment and am contemplating using iMac as the box with Windows 7 installed as dual boot and/or parallels.
Has anyone tried this configuration earlier and does it work?
Running Bootcamp(dual boot) works with windows 7/8 Parallels does not.
I have a macpro 1,1 and a mac air both work with bootcamp(dual boot).
The only thing that could cause it not to work is the USB configuration. Kinect requires that it be connected to a USB host controller and not a hub. I believe all of the iMac's USB ports are host ports so I don't believe this to be an issue. If you use the Kinect Sensor Chooser control built into the WPFViewers sample app it will tell you if that particular problem arises (insufficient bandwidth).
Parallels will not work with the SDK at the time of this writing due to driver. Kinect is not an official USB device and the driver requires direct communication with the Kinect. I hoped that this would be resolved with the official Kinect for Windows hardware but alas it was not.
You might want to look at native OSX Kinect development using OpenKinect
http://openkinect.org/wiki/Getting_Started
If you don't want to have to write all the image processing code yourself, and are working in C#, you could start with the Accord library:
http://accord-net.origo.ethz.ch/

Resources