nanoserver | Micropython embedded LoRaWAN server

 by   gradoj Python Version: Current License: No License

kandi X-RAY | nanoserver Summary

kandi X-RAY | nanoserver Summary

nanoserver is a Python library typically used in Internet of Things (IoT) applications. nanoserver has no bugs, it has no vulnerabilities and it has low support. However nanoserver build file is not available. You can download it from GitHub.

A lightweight micropython implementation of an embedded LoRaWAN server. Combining the gateway forwarder from Pycom and a heavily modified floranet on a Lopy4 allows for a self-contained gateway. The Lopy4 is designed as a LoRaWAN endpoint but can run as a non-LoRaWAN-compliant single-channel gateway. May not want to use this in a production environment but nice for testing or battery operated gateway. This is very early test code in no way ready for actual use. Using a python implementation of aes-cmac from secworks slightly modified for micropython. Need to do: -fix hardcoded values for join requests, nonces, etc -handle packet1, packet2 delays better -test abp -put keys in config or somewhere safer -add mqtt or decrypted packets to a file -add support for LoRaWAN v1.1 -clean up code -put MAC code in its own file -lots more. Roughly working: -OTAA join -confirmed packets. To run add main.py, cmac.py, nanogateway.py, nanoserver.py, device.py, config.py onto Lopy4 running Pycom micropython(tested on ver 1.20.0.rc12 [v1.9.4-81167ed]). Appkey is in device.py for now. Need to add it somewhere safe. Looking for help testing and improving.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nanoserver has a low active ecosystem.
              It has 4 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              nanoserver has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of nanoserver is current.

            kandi-Quality Quality

              nanoserver has no bugs reported.

            kandi-Security Security

              nanoserver has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              nanoserver does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              nanoserver releases are not available. You will need to build from source code and install.
              nanoserver has no build file. You will be need to create the build yourself to build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed nanoserver and discovered the below as its top functions. This is intended to give you an instant insight into nanoserver implemented functionality, and help decide if they suit your requirements.
            • This function is called when a packet is received
            • Decode a message
            • Decode a rxp response
            • Decode a Stat object
            • Test the CMAC - AES mode
            • Test for cmac
            • Test the CMAC subkey generation
            • Check block of expected result
            • This function is called when a datagram is received
            • Called when a packet is received
            • Decode a MAC message
            • Decrypt the given key
            • Encrypt the MAC payload
            • Calculate the MIC of the message
            • Check the MIC of the message
            Get all kandi verified functions for this library.

            nanoserver Key Features

            No Key Features are available at this moment for nanoserver.

            nanoserver Examples and Code Snippets

            No Code Snippets are available at this moment for nanoserver.

            Community Discussions

            QUESTION

            EPERM error building Windows node.js Docker image on Azure Pipeline
            Asked 2021-Jun-08 at 14:56

            I'm trying to run a node.js app in a Docker container on Windows Server. I have limited control over the server. Most notably, the server doesn't have Hyper-V available, so (I believe) I need a Windows-based Docker image. I have a Dockerfile that I can successfully build locally, but I'm getting an error when I try to build everything in an Azure Pipeline:

            ...

            ANSWER

            Answered 2021-Jun-08 at 14:56

            It turns out that the default user in mcr.microsoft.com/windows/nanoserver:1809 is ContainerUser, a non-administrator account. I'm not sure the exact permissions Docker's COPY command uses on Windows containers. On Linux it creates files owned by root though, so something similar in Windows. Switching to the ContainerAdministrator user (USER ContainerAdministrator) for the npm install process fixed my permissions problems.

            Source https://stackoverflow.com/questions/67841558

            QUESTION

            In Docker Desktop for windows 10 with WSL2, where does docker containers live & how Linux containers can run a java app, but not windows nanoserver?
            Asked 2021-May-12 at 04:04

            I have Windows 10 Enterprise Version and I have installed Docker Desktop, enabled WSL2 backend, and downloaded and installed the Linux kernel update package.

            I am learning Docker and I have some doubts about how Docker works behind the scenes.

            • I have drawn a basic architecture diagram of Docker on windows with WSL2, is this correct?
            • Whenever we create a new Linux container it gets created in the same lightweight utility VM provided by WSL2?
            • And if we create a windows container it gets created on windows os?
            • Can these containers access windows and Linux kernels both when required? Like when running a java app in a Linux container it requires windows kernel, right?

            1. So, by default docker runs Linux containers, when do we need windows containers? I can containerize a java application by using openjdk:8, but I am not able to pull windows nanoserver image when I run Linux containers, it works only when I switch to Windows Containers. What is going on here? Does this mean the openjdk:8 image is a Linux image(i do not know how to say it), and windows nanoserver a windows image?
            2. How Linux Containers can run my java application? It must need the windows kernel, right?
            3. If the docker containers reside within the lightweight utility VM created by WSL2, can it access both the Linux kernel that it ships with and the Windows Kernel?

            I have the default Linux container mode and I tried these two commands.

            • docker run --platform=linux -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done"
            • docker pull mcr.microsoft.com/windows/nanoserver:1903

            The first one worked for the second one I got the following error.

            1903: Pulling from windows/nanoserver no matching manifest for Linux/amd64 in the manifest list entries

            But when I switch to windows containers it works.

            1. So what is the difference between my java app on openjdk:8 image and windows nanoserver?
            2. Do these not require windows kernel to run?
            3. How is the java thing running on Linux containers then?

            Edits :- Need more clarification on this- Copying the question from comment section.

            • And one more thing, the containers do not access windows and Linux kernels simultaneously in WSL2 right? After all they are just isolated spaces in an OS, so either they can be in windows or Linux? Please correct me if I am wrong. The Linux images are built in such a way that it has everything to run my java and as java is a cross platform language so it can run on Linux kernel, is this the concept?

            • About the architecture diagram that I have made here- the containers(isolated processes in an operating system with app files) , in case of Linux containers all of them(multiple containers) runs on the same WSL2 VM, right?

            ...

            ANSWER

            Answered 2021-May-10 at 21:26

            Firstly, good question.

            I hope I can answer it as best as possible.

            So, by default docker runs Linux containers, when do we need windows containers?

            you don't need windows containers. You should always consider what your application needs. For instance, if you are working on a java app, you would pull a java image and not an entire host OS. The only time I ever pulled a windows image was when I dockerized an ASP.NET application that can only be run on windows.

            How Linux Containers can run my java application? It must need the windows kernel, right?

            In the context of docker:

            Docker for Windows allows you to simulate running Linux containers on Windows, but under the hood a Linux VM is created, so still Linux containers are running on Linux, and Windows containers are running on Windows.

            if the docker containers reside within the lightweight utility VM created by WSL2, can it access both the Linux kernel that it ships with and the Windows Kernel?

            Containers are using the underlying Operating System resources and drivers, so Windows containers can run on Windows only, and Linux containers can run on Linux only. Docker for Windows allows you to simulate running Linux containers on Windows, but under the hood a Linux VM is created, so still Linux containers are running on Linux, and Windows containers are running on Windows.

            So what is the difference between my java app on openjdk:8 image and windows nanoserver?

            The openJdk image and windows nano server core difference is the very base image that they use. openJdk is probably using some very bare unix os as the base where as the nanoserver is an entire os which is windows.

            Do these not require windows kernel to run? The openjdk image does not require windows to run as it is built from linux. Docker for windows will use the WsL to run. The nanoserver will only run on windows (as windows images can only run on windows).

            How is the java thing running on Linux containers then? I understand this question to be "How does the openjdk image run on linux and windows?"

            if so, because it uses a linux os as its base image, it can run by default on linux. But because the WsL2 exists, a VM is created and simulates a linux OS in windows. That is why we can run windows images and linux images on Docker for windows.

            I hope this helped, here are some extra tips from the questions for you to consider.

            1. The images will always perform best when the image is the same type as the OS. This is because docker will utilise resources of the host and performance is better when the host and container are of the same os.
            2. Use images that are best fit for purpose. Don't use an entire os image just to run a java app. Rather use the java image. This applies to a wide range of frameworks and languages.

            Read this This is the crediting article if you want to read more.

            Source https://stackoverflow.com/questions/67477293

            QUESTION

            Kube-Proxy-Windows CrashLoopBackOff
            Asked 2021-May-07 at 12:21
            Installation Process

            I am all new to Kubernetes and currently setting up a Kubernetes Cluster inside of Azure VMs. I want to deploy Windows containers, but in order to achieve this I need to add Windows worker nodes. I already deployed a Kubeadm cluster with 3 master nodes and one Linux worker node and those nodes work perfectly.

            Once I add the Windows node all things go downward. Firstly I use Flannel as my CNI plugin and prepare the deamonset and control plane according to the Kubernetes documentation: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/

            Then after the installation of the Flannel deamonset, I installed the proxy and Docker EE accordingly.

            Used Software Master Nodes

            OS: Ubuntu 18.04 LTS
            Container Runtime: Docker 20.10.5
            Kubernetes version: 1.21.0
            Flannel-image version: 0.14.0
            Kube-proxy version: 1.21.0

            Windows Worker Node

            OS: Windows Server 2019 Datacenter Core
            Container Runtime: Docker 20.10.4
            Kubernetes version: 1.21.0
            Flannel-image version: 0.13.0-nanoserver
            Kube-proxy version: 1.21.0-nanoserver

            Wanted Results:

            I wanted to see a full cluster ready to use and with all the needed in the Running state.

            Current Results:

            After the installation I checked if the installation was successful:

            ...

            ANSWER

            Answered 2021-May-07 at 12:21

            Are you still having this error? I managed to fix this by downgrading windows kube-proxy to at least 1.20.0. There must be some missing config or bug for 1.21.0.

            Source https://stackoverflow.com/questions/67369225

            QUESTION

            Install Docker Windows Server 2019: the term 'docker' is not recognized as the name of a cmdlet, function, script file, or operable program
            Asked 2021-Apr-19 at 10:46

            Trying to install Docker in process isolation on Windows Server 2019 and following these steps. (I can't use Hyper-V on this server) when running PowerShell in admin mode.

            I however get the error

            Get-PackageProvider : A parameter cannot be found that matches parameter name 'ListAvailableget-packagesource'

            I also tried Install-Package -Name docker -ProviderName DockerMsftProvider I then get:

            ...

            ANSWER

            Answered 2021-Apr-19 at 10:46

            I use a script that installs the containers feature and uninstalls Windows Defender (n.b. this may or may not be safe for your environment):

            Source https://stackoverflow.com/questions/67009080

            QUESTION

            Create Docker Image of .NET Core 3.1 app on Windows 10 Pro and pull it to Windows Server 2016
            Asked 2021-Apr-12 at 13:50

            I have successfully created Docker images that contain .NET Core 3.1 projects and am running them in Windows Containers on my local Windows 10 Pro machine. I am using Windows Containers, not Linux.

            I want to be able to pull them to a Windows 2016 Server machine (not a VM). I have Docker EE installed on the Windows 2016 Server and it is running. docker version reports Version 20.10.0.

            According to the following, there are not any supported .NET Core images available for Windows Server 2016. no matching manifest for windows/amd64 Server 2016

            If that is true, am I trying to do something that is impossible? Or simply not supported?

            I am new at this, but from what I understand .NET Core apps require nanoserver 1809 or higher to be installed in the host. If that is incorrect, let me know...

            NOTE: I have successfully pulled this to the Windows 2016 Server:

            ...

            ANSWER

            Answered 2021-Apr-12 at 13:50

            There's a difference between what is supported and what is available. Running .NET Core in a container on Windows Server 2016 is supported but there is not an available image for it. You're left to define your own.

            Your options for what Windows container versions can run on a Windows Server 2016 host are limited to only Windows Server 2016 containers. This means you cannot run a nanoserver:1809 container on a Server 2016 host, for example. This is illustrated in the Windows container version compatibility matrix:

            Note that nanoserver:sac2016 has long been out of support so it would not be a recommended base image. There is not any currently supported tag for Nano Server on 2016. Instead, it'd be recommended to use Windows Server Core. The servercore:ltsc2016 is your best option for a supported tag.

            Here's an example of how you would install .NET Core on a Server Core image:

            Source https://stackoverflow.com/questions/66989134

            QUESTION

            Running Windows container's command prompt in admin mode
            Asked 2021-Mar-17 at 09:34

            I am running Windows Nanoserver in a container.The nanoserver contains only the command prompt and lacks powershell.

            I want to execute certain commands inside the container in the command prompt which require elevated privileges. I am currently using the following to launch the command prompt of the container.

            docker exec -it cmd

            Is there any other way using which we can run the command prompt in admin mode?

            ...

            ANSWER

            Answered 2021-Mar-17 at 09:34

            As per the Windows documentation, the Windows Server Core has ContainerAdministrator as the default user whereas Windows NanoServer has ContainerUser as the default user.

            I was able to connect to my container as admin using the following command-

            docker exec --user ContainerAdministrator -it cmd

            Source https://stackoverflow.com/questions/66666035

            QUESTION

            VS React-Redux container connecting to api-sqlserver containers
            Asked 2021-Feb-19 at 20:01

            Got a problem with VS React-Redux template deployed as a docker container connecting to api docker container. Below are the given facts:

            Fact 1. I've got 3 Docker Windows containers in docker hub (https://hub.docker.com/repository/docker/solomiosisante/test):

            1. solomiosisante/test:sqlserver
            2. solomiosisante/test:api
            3. solomiosisante/test:react

            Fact 2. I managed to make the api connect to sqlserver and make them communicate by creating a docker nat network. API container can get and display data from the sqlserver container.

            Fact 3. I also run the react container using the same nat network.

            Fact 4. I can successfully docker run the react container.

            Fact 5. They are all running Net 5.0 (VS projects), but not sure with sqlserver because I just got it from microsoft/mssql-server-windows-developer image.

            Fact 6. I can run the react project from visual studio and load the pages in the browser with no problem. (and it connects to api container)

            Problem: I could not make the react container browse to any of my pages. Browser says it can't be reached connection timed out.

            React project Dockerfile:

            ...

            ANSWER

            Answered 2021-Feb-19 at 20:01

            I finally solved this problem by using isolation=process. I thought I've got so much trouble with Hyper-V and can do without it. I followed the article Docker on Windows without Hyper-V by Chris and updated my docker hub test repo. I also put the instructions there on how to make it work. Please check this out. I now have docker images I can use as a base image for my future Docker-React-Redux docker deployment using Windows Containers. I hope this helps those who have encountered the same problems like me.

            Source https://stackoverflow.com/questions/66168883

            QUESTION

            How to set the path of appsetting.json file to DockerFile in IoT Edge Runtime Project
            Asked 2020-Nov-26 at 12:24

            I created one IOT edge runtime custom module project on windows container. While running the solution I am facing System cannot Find the file specified. I am passing the values from appsetting.json file and while running the module the path is not getting specified.

            Is it some way i can give some command to copy appsetting.json file in to container while building the image.

            This is the Dockerfile i am using:

            ...

            ANSWER

            Answered 2020-Nov-26 at 11:52

            try specifying the folder in the Windows container where the appsettings.json file should be copied

            Source https://stackoverflow.com/questions/65021165

            QUESTION

            App opens console window when being build with Docker
            Asked 2020-Nov-14 at 15:45

            I'm facing the issue that a .Net Core WPF application automatically opens a console window when started. This only happens when build inside a Docker container. When I build it directly on my PC, only the actual application window opens.

            My best guess is that this is an issue with the operating system the .Net Core image is based on. The .Net Core SDK Docker Hub Repo knows the following tags: 3.1-nanoserver-1809, 3.1-nanoserver-1903, 3.1-nanoserver-1909, 3.1-nanoserver-2004, 3.1-nanoserver-2009. I was able to confirm the issue with the first three tags, but the 2004 and 2009 tags do not run on my machine, so I need someone to try this out and either confirm my theory (which would mean that it should not happen on at least on of these images) or to come up with a better explanation of why this is happening.

            This is reproducible with the default .Net Core WPF app Visual Studio creates for you. Here is a Dockerfile to test it out:

            ...

            ANSWER

            Answered 2020-Nov-14 at 15:45

            I was able to reproduce this problem on both 3.1-nanoserver-2009 and 3.1-nanoserver-2004 for you.

            I think the problem is related to the warning printed out during build:

            warning NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows (excluding Nano Server).

            If that's the case, then it seems that it is a limitation of the nanoserver base image, and unfortunately it looks like this problem still has not been resolved, because it's still present when building in mcr.microsoft.com/dotnet/nightly/sdk:5.0.

            Here's a related pull request that might shed some light on the subject.

            Having said that, I think the only option for now is to use windows image other than nanoserver (alternatives can be found here). I didn't find any image that would come with .NET Core SDK preinstalled (I didn't put much effort into finding it though), but it should be fairly simple to set it up. In the following example I used servercore image since it is much more lightweight than windows image.

            Source https://stackoverflow.com/questions/64588598

            QUESTION

            Develop IoT Edge modules for Windows devices Tutorial Build Error
            Asked 2020-Nov-13 at 12:19

            I have followed all the steps in the tutorial Tutorial: Develop IoT Edge modules for Windows devices

            I have signed into docker desktop.

            However when I try and build and publish I get the following error in the output window

            ...

            ANSWER

            Answered 2020-Nov-13 at 12:19

            Kgalic is correct, I Docker was running using Linux by Default. I switched to Windows by using the context menu on the docker icon in the system try.

            Source https://stackoverflow.com/questions/64808815

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nanoserver

            You can download it from GitHub.
            You can use nanoserver like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/gradoj/nanoserver.git

          • CLI

            gh repo clone gradoj/nanoserver

          • sshUrl

            git@github.com:gradoj/nanoserver.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link