nrf | nordic semiconductor wireless chipsets related code

 by   texane C Version: Current License: No License

kandi X-RAY | nrf Summary

kandi X-RAY | nrf Summary

nrf is a C library typically used in Internet of Things (IoT), Arduino applications. nrf has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

NORDIC chipsets related repository. nrf24l01p and nrf905 are currently supported. There is an implem for nrf2401a, not tested. This repo contains: . microcontroller code to use the NRF chipsets (refer to src directory), . host library to communicate with the chipset from LINUX over serial (refer to snrf/src directory), . schematics for a serial bridge board (refer to snrf/hw directory).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

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

            kandi-Quality Quality

              nrf has 0 bugs and 0 code smells.

            kandi-Security Security

              nrf has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              nrf code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nrf 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

              nrf releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nrf
            Get all kandi verified functions for this library.

            nrf Key Features

            No Key Features are available at this moment for nrf.

            nrf Examples and Code Snippets

            No Code Snippets are available at this moment for nrf.

            Community Discussions

            QUESTION

            BLE device not showing up in Android Chrome
            Asked 2022-Mar-01 at 10:31

            I have a Bluetooth Low Energy (BLE) device and want to access it from a web page using the Web Bluetooth API.

            This works perfectly fine in Chrome on Windows (at least with current versions of Chrome and Windows) and even with the WebBLE App on iPadOS (since Safari won't support WebBluetooth).

            But I have multiple Android devices running the current versions of Android (12) and Chrome (97), where in the browser device chooser, the device won't show up. Some other unknown devices show up, but my device does not.

            What could be the reason just this one device does not show up and how could I gather more information about this situation? It happens in the native browser dialog so my usual debugging steps don't work.

            Update: I have already checked with chrome://bluetooth-internals, and the result is the same. The device shows up on Chrome/Windows but not on Chrome/Android.

            Now I also used chrome://device-log which on both Windows and Android shows only

            Bluetooth Internals Page initiating Bluetooth discovery session

            nRF Connect for Mobile shows the device instantly, and it also shows up in the Android Bluetooth settings. Only Chrome Web Bluetooth doesn't show it.

            Update2: The adb logcat reveals the following line during Chrome Bluetooth discovery:

            V/BtGatt.GattService(19403): Skipping data matching denylist

            What's that? Has Chrome its own denylist for bluetooth devices?

            Update3: Android has a denylist for BLE devices, which should not be applied if the App (Chrome) has ACCESS_FINE_LOCATION permissions. But Samsung seems to apply the denylist nonetheless, even if Chrome has all necessary permissions.

            ...

            ANSWER

            Answered 2022-Feb-15 at 18:41

            https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs/ lists tools and log viewing approaches thay may help, including:

            Try requestDevice with "acceptAllDevices":true as well if you haven't yet.

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

            QUESTION

            How to decode pulse oximeter output into readable
            Asked 2022-Feb-28 at 10:48

            Im trying to decode data from pulse oximeter device using the nrf Connect App.

            From the Pulse Oximeter(0X1822). PLX Spot-Check Measurement service I got the below response:

            SPOT MEASUREMENT:

            (0x) 17-61-00-60-00-E1-07-01-01-01-22-13-20-00-20-00-00

            CONTINOUS MEASUREMENT: (0x) 0c-62-00-4E-00-20-00-00-00-00

            PROFILE SAYS its SFLOAT value, But I'm stuck to converting this to readable value.

            Expected value: Spo2 and heart rate from the above response

            I also looked in the pulse oximeter profile in the Bluetooth page but it seems confusing

            Profile

            NRF CONNECT APP SCREENSHOT:

            pulse oximeter details:http://www.choicemmed.eu/product_center/253

            Please help me to get readable data

            ...

            ANSWER

            Answered 2022-Feb-28 at 10:48

            This page helps me lot: https://thejeshgn.com/2020/08/05/reverse-engineering-a-bluetooth-low-energy-oximeter/

            From this Spot check value :17-61-00-60-00-E1-07-01-01-01-22-13-20-00-20-00-00

            Byte[1] refers to spo2 rate

            Byte[3] refers to pulse rate

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

            QUESTION

            Unable to expose SCTP server running in a kubernetes pod using NodePort
            Asked 2022-Feb-14 at 08:58

            I have a single node kubernetes cluster running in a VM in azure. I have a service running SCTP server in port 38412. I need to expose that port externally. I have tried by changing the port type to NodePort. But no success. I am using flannel as a overlay network. using Kubernetes version 1.23.3.

            This is my service.yaml file

            ...

            ANSWER

            Answered 2022-Feb-13 at 14:03

            Neither AKS nor Flannel supports SCTP at this point of writing. Here's some details about it.

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

            QUESTION

            BLE : How to interpret nRF logs for BLE
            Asked 2022-Jan-13 at 20:35

            We have BLE(Bluetooth) device working well. Most of the time It works but sometimes we receive a bad response and collect its logs. These logs are collected from the nRF android app.

            Here are some questions:

            1. Can you interpret this logging behavior?
            2. What is the significance of "AT" "%S" "&W" in bad response command?
            3. If you know some good references; How to interpret these logs? Please share it.

            Success Response

            ...

            ANSWER

            Answered 2022-Jan-13 at 20:35

            The logs are about the connection, discovery of services and subscription to a characteristic all concepts of BLE.

            A device acting as Central after completing the connection with a peripheral device, discovers the services that the peripheral offers and subsequently subscribes to the characteristic discovered.

            Here a guide

            knowing this, it's easy interpreting the logs.

            Success Response

            Connection

            V 12:56:50.091 Connecting to DD:70:98:0A:EB:B1... D 12:56:50.092 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M) D 12:56:50.715 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED D
            12:56:50.722 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2) I 12:56:50.722 Connected to DD:70:98:0A:EB:B1

            Discovering services/characteristics and list them. Services and characteristics are identified by hex value and UUIDs.

            V 12:56:50.749 Discovering services... D 12:56:50.749 gatt.discoverServices() I 12:56:51.050 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms) D
            12:56:51.418 [Callback] Services discovered with status: 0 I
            12:56:51.418 Services discovered V 12:56:51.448 Generic Access (0x1800)

            • Device Name [R] (0x2A00)
            • Appearance [R] (0x2A01)
            • Peripheral Preferred Connection Parameters [R] (0x2A04)
            • Central Address Resolution [R] (0x2AA6) Generic Attribute (0x1801)
            • Service Changed [I] (0x2A05) Client Characteristic Configuration (0x2902) Unknown Service (569a1101-b87f-490c-92cb-11ba5ea5167c)
            • Unknown Characteristic [N] (569a2000-b87f-490c-92cb-11ba5ea5167c) Client Characteristic Configuration (0x2902)
            • Unknown Characteristic [W WNR] (569a2001-b87f-490c-92cb-11ba5ea5167c)
            • Unknown Characteristic [N] (569a2002-b87f-490c-92cb-11ba5ea5167c) Client Characteristic Configuration (0x2902)
            • Unknown Characteristic [W WNR] (569a2003-b87f-490c-92cb-11ba5ea5167c)

            Subscription to a characteristic

            12:56:51.448 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb,true) D 12:56:51.450 gatt.setCharacteristicNotification(569a2000-b87f-490c-92cb-11ba5ea5167c, true) D 12:56:51.452 gatt.setCharacteristicNotification(569a2002-b87f-490c-92cb-11ba5ea5167c, true) I 12:56:51.484 Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms) V 12:57:12.847 Enabling notifications for 569a2000-b87f-490c-92cb-11ba5ea5167c

            Values coming from the subscribed characteristic. The values are in hex format.

            I 12:58:13.986 Notification received from 569a2000-b87f-490c-92cb-11ba5ea5167c, value: (0x) 07-23 A
            12:58:13.986 "(0x) 07-23" received

            The strange values you see in the Bad Response ("AT", "%S" "&W") are the hex to ASCII translation of data received. The app tries to translate the bytes received from the characteristic into ASCII characters. Example

            I 14:50:20.914 Notification received from 569a2000-b87f-490c92cb-11ba5ea5167c, value: (0x) 41-54, "AT" A
            14:50:20.914 "(0x) 41-54, "AT"" received

            Hex value Ascii 0x41 A 0x54 T

            So 0x 41 54 -->AT

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

            QUESTION

            How do I write an xpath expression to exctract a string from a node with attribute in it?
            Asked 2021-Nov-07 at 16:51
            
            
                
                    1
                    
                        1
                    
                
            
            
            ...

            ANSWER

            Answered 2021-Nov-04 at 21:46

            To access the node you can use

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

            QUESTION

            Getting namespace error when creating XSD for XML which has custom xsi:type element
            Asked 2021-Oct-04 at 02:23

            I'm trying to create XSD for small XML which has default namespace as in the root element. Under the root element there's namespace as well with custom xsi:type. Following are the XML and XSDs.

            test.xml ...

            ANSWER

            Answered 2021-Oct-04 at 02:23

            I found the reason for above error.

            In the object.xsd I have added elementFormDefault="qualified" attribute as this and changed the element object type as well.

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

            QUESTION

            ReadFile code using Win32 API to read from serial port very slow
            Asked 2021-Aug-02 at 22:09

            I'm trying to read 2048 samples from an nRF52832 chip via COM port on my PC. I have connected the UART pins from the nRF-chip to the computer using a UART-to-USB cable. I have been able to printf and NRF_LOG_INFO from it previously at a baud rate of 921600. Now that I want to do something with the data, in real time, I need to read it myself. But when I run the attached code (see below), it takes over 15 seconds to read these samples, that should have been read in about 1 second.

            Any ideas on how to make this code run faster?

            (the real-time aspect will be added later, for now my goal is to get the program to read fast enough)

            ...

            ANSWER

            Answered 2021-Aug-02 at 22:09

            The code only reads a single byte on each iteration. This is very slow.

            You're using an extra intermediate buffer (e.g. single_val_buf). Better/easier to read directly into the m_buf target buffer (i.e. no need to copy the bytes).

            The code also polls the keyboard on every iteration. The important part is to keep up with the data and excessive keyboard polling can slow things down. Better to poll the keyboard periodically (e.g. every so many iterations).

            Side note: goto is ugly/bad style and is easily refactored.

            Here's some refactored code. It is annotated

            I've used cpp conditionals to denote old vs new code:

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

            QUESTION

            Android BLE stack caching services?
            Asked 2021-Jul-25 at 07:49

            I am developing a first app with Bluetooth low energy. I'm in control of both ends - the server is running on an Arduino Nano 33 BLE - which has an nRF chipset.

            The server is a bit odd - it actually runs one of two sets of code depending on how it is started (largely because I've only got one Nano BLE). So it can be one of two servers (same MAC address), but server A supports one service and its set of characteristics, server B another service with its characteristics. Both services obviously have unique UUIDs.

            The problem is, when the app has been connected to - say - A, and the server is turned off and back on again in guise B, on connection and discovering services, the app still 'discovers' the A service UUID, and not B.

            Repeatedly power cycling the server makes no difference, nor does disabling and re-enabling Bluetooth on the Android device, or restarting the app. The only thing that works is a complete reboot of the Android device.

            Seems to me the BLE stack is caching what it thinks the capabilities of a specific server MAC address are.

            Cannot find a way round this (don't think I can change the Nano BLE MAC address), BUT when I run the nRF diagnostic Android app, it does find the right service, so it must be possible. What that does though is always go through a BLE scan process first so maybe that flushes any cache.

            However, I really do not want to enforce a scan, and therefore would be grateful for any comments, or details on how to clear any cache.

            ...

            ANSWER

            Answered 2021-Jul-25 at 07:49

            STOP PRESS:

            Found an answer to this: 'Android Bluetooth not discovering the characteristic after changing UUID'

            It appears that the BLE stack does cache services etc for an indeterminate time, in order to speed up future service discovery. Bit of a problem if the services for a MAC address do change (like mine), but I suppose that is not really expected behaviour (though not forbidden as far as I know). Don't know how long it is cached for, but I noticed that overnight it sorted itself out - then got it wrong on the next change, of course.

            There is an internal BluetoothGatt.refresh() method that clears the cache - but it is not published. The link shows how to get at it with reflection, and it does appear to work. On an old Nexus 7 2013 running 6.0.1, that is. Not sure about later OSs as reflection seems to be frowned on by Google these days. About to try it on a Pixel 2 running Android 11.

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

            QUESTION

            What does the BLE ScanRecord's getServiceData contain?
            Asked 2021-Jun-29 at 21:33

            I have an application which connects to Bluetooth Low Energy devices. The service UUID gives a good indication, but it is not enough: I'd need to see which exact characteristics the device offers within a specific service. I see that there's a so called "service data" within the ScanRecord which is a series of bytes:

            https://developer.android.com/reference/android/bluetooth/le/ScanRecord#getServiceData()

            However I cannot find any detail about that anywhere: what is the information in that service data? In nRF connect it seems that it's a byte (or a few bytes), so maybe it's some kind of a bit flag. I'm hoping that service data might save me from discovering the device because that would require connecting to it, which I want to really avoid.

            To have a more concrete example: I support FTMS Fitness Machines (0x1826), but only Indoor Bike (0x2ad2 characteristic), Treadmill (0x2acd), or Rower (0x2ad1), but not cross trainer, step machine, or stair climber.

            ...

            ANSWER

            Answered 2021-Jun-23 at 22:22

            The advertisement does not contain data about what characteristics the device has.

            There are advertisement types for service uuids, but not for characteristics specified by the standard.

            Usually if you know what services are supported, you should be able to assume the characteristics too since each service's specification document should contain that info.

            The "service data" just contains arbitrary bytes. What these bytes contain is defined by the service's specification.

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

            QUESTION

            Difficult To Connect Thermal Printer via Web Bluetooth
            Asked 2021-Jun-14 at 10:38

            Right now I am developing web which has ability to connect thermal printer. I am using angular framework, and I successfully connect the thermal printer with USB using library ng-thermal-printer. But I want to my web also being able to connect thermal printer via web bluetooth which is BLE (Bluetooth Low Energy). As far as I know, BLE has specification in term of GATT and has services and characteristics in it.

            The progress I did so far, I can connect and send a value to the thermal printer device in a Service and a Characteristic, let's say Service with UUID AS and Characteristics with UUID AC, using my android phone with the help of application named nRF Connect. Targeting Service AS and send hexadecimal value at charateristic AC make me successfully print something on the thermal paper.

            But there is a problem. After knowing the right service and characteristic. I implemented it in my project. But, my chrome browser console showed error:

            1. Origin is not allowed to access any service... and it told me to add optionalServices when requestiDevice()
            2. After I added Service AS in property optionalServices, the console showed error DOMException: Connection failed for unknown reason. The errors showed both in chrome PC and chrome android.

            NB:

            • I have enabled Experimental Web Platform features on chrome
            • I have enabled Use the new permissions backend for Web Bluetooth on chrome
            • I have enabled Allow invalid certificates for resources loaded from localhost. on chrome
            • I have enabled Enable new USB backend on chrome
            • I have used https.

            Additional question. is bluetooth connection that application nRF Connect used different from BLE? if so, why it displays services and characteristics?

            ...

            ANSWER

            Answered 2021-Jun-14 at 07:34

            I'd recommend you try sending those hex values directly from the about:bluetooth-internals page and see if you can reproduce the connection error from there as well. See https://web.dev/bluetooth/#tips

            If so, check out https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs to learn how to properly file a chromium bug so that the team can fix the underlying issue.

            If not, could you share your JS code so that we can help you diagnose what could be going wrong in your code?

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install nrf

            You can download it from GitHub.

            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/texane/nrf.git

          • CLI

            gh repo clone texane/nrf

          • sshUrl

            git@github.com:texane/nrf.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