so im doing a side project, and i want to use Angular with asp.net REST api connecting to a mssql server.
the project is basically a site that could be placed in a company/school canteen, with a touch screen, and an rfid scanner for employee cards.
i've got no issues with the angular / api part. but how would i go about reading events from a rfid scanner from angular? is this even possible?
the usecase is that i want to scan the employee card, then in the angular client app, prompt if the user is correct "Welcome, are you "firstname" "Lastname"? (confirmbutton)"
then use the gathered employee informations later in this process when the employee checksout from the canteen.
Scenario 1: Server and RFID reader are on the same device
Example:
You have a Raspberry Pi 4 with Raspberry Pi OS and .NET 5 on it. You buy a RFID reader like this one, and you either find a library for it (like this one) or you start reading the datasheet and write your own library with .NET I2C or SPI APIs. Then your ASP.NET Core website on the Pi will listen for RFID events (maybe with a background worker or maybe another .NET app will notify it with gRPC or API) and notifies the client (Angular in you case) with WebSocket or polling or some other method.
Scenario 2: One server with many web clients on other locations
Example:
You have an ASP.NET Core API that doesn't know anything about RFID and just works with normal data like any Web API. You then tell your clients to buy a USB RFID (like this one) and you use Web USB API inside your Angular app to communicate with the RFID device (I don't know how) and then call necessary APIs on the ASP.NET server. (BBC micro:bit uses this method, they connect to their devices via Web USB)
Example 2 (this is probably the easiest way):
Write an Android app with Ionic that uses the NFC plugin to communicate with NFC tags and call any API you want. You can then run it under kiosk mode. All your clients need then is a cheap android device.
Note: You can combine these scenarios, for example in scenario 1 you can still call a centralized API.
Related
I have a BLE temperature sensor, which should send measurements to an ESP32 via a BLE connection and my plan was that the ESP32 could send the measurements via WiFi to my database (Firebase Realtime Database). However, I have seen from a few tutorials that a mqtt server would be neccesary (see the screenshot below - link to the video: https://www.youtube.com/watch?v=PBYCG-ypvRY). Could someone please explain to me why the mqtt component is neccesary? Currently I am measuring temperatures using my ESP32 (without the BLE temperautre sensors) and sending them directly to the database, so I am confused as to why with BLE I would need a mqtt server.
Thanks for your help in advance!
You don't need MQTT. It's just one of the IoT-friendly protocol alternatives (like HTTPS, AMQP, CoAP, homebrew, etc) available to you for device-to-server communication. There are pros and cons to each one. It's up to you to choose whatever solution is relevant to your system.
If you've already implemented the Firebase HTTPS interface and it does the job, you're done.
If you are having problems, note that the Google IoT Core also prescribes MQTT (or, alternatively HTTPS) as an underlying messaging protocol - used together with the Device SDK for Embedded C. But this is for people who want to have a large-scale authentication and management solution for their devices. By all means, stick to your existing solution if it works.
I have traied meny examples to connect Zebra IMZ320 Blutooth using Iphone on Xamarin Cross-Platform
I followed CoreBluetooth Namespace
enter link description here
and also using Plugin.BLE
but I couldnt connect my device eny one has success experience in connect Bluetooth printer using Xamarin cross platform ios
CoreBluetooth.framework is for Bluetooth Low-Energy:
Communicate with Bluetooth 4.0 low-energy devices.
The Core Bluetooth framework provides the classes needed for your apps
to communicate with devices that are equipped with Bluetooth low
energy wireless technology.
According to the specifications of the Zebra IMZ320, the communication mode are:
Secure Bluetooth 2.0, 802.11a/b/g/n (optional) or USB (client)
connectivity; Wi-FiĀ®-certified connectivity
That is not Bluetooth Low-Energy (which has been introduced in Bluetooth 4.0). You won't be able to find the printer with a Bluetooth Low-Energy scan, because the behavior, logic and implementation (protocols, norms, GATT, Peripheral/Service/Characteristic) are totally different.
Also, the description page of the Zebra IMZ320 gives a link (FAQ - Creating & Registering An IOS App) to how develop apps for it.
You need to use ExternalAccessory.framework for it.
If your app communicates with a Zebra product via Bluetooth using the
External Accessory Framework, and you plan to distribute the app via
the App Store or Volume Purchase Program Store, then you must register
the app with Zebra.
This page is general (and not specific to that printer). But according to the specs, it's not Bluetooth Low-Energy compliant (while others products might be, that's why there is a paragraph talking about CoreBluetooth in it).
That's normal behavior (using ExternalAccessory vs CoreBluetooth framework), because each one of them has a specific meaning and use.
Conclusion:
Use ExternalAccessory.framework, it is also available on Xamarin.
Im running Qt on ubuntu. I want to write a simple program that recieves a line from android device(this device already has a program to connect and send info) over Bluetooth. How do i start a bluetooth server in QT? I tried to find examples, but all of them act like a client that looks for connection. My program should wait for connection and once it gets a connection, it waits for incoming messages and reads them.
The Bluetooth API provides connectivity between Bluetooth enabled devices.
You can find Bluetooth examples in Qt website here, also see some Bluetooth examples in Qt Creator examples.
Bluetooth chat example and Bluetooth file transfer example is works for you.
The Bluetooth chat example may be used with various Bluetooth terminal applications. For example you could compile the Qt BT chat example on your computer and connect to it from your cell phone running a Bluetooth Terminal application.
In order to do that all that is needed is to change the UUID values as described here and here. That is, in the chatserver.cpp file of the example one needs to change:
static const QLatin1String serviceUuid("e8e10f95-1a70-4b27-9ccf-02010264e9c8");
Becomes:
static const QLatin1String serviceUuid("00001101-0000-1000-8000-00805F9B34FB");
You may also want to do the same thing in the chat.cpp if you are planning on using the client mode as well (in this case make sure to change the reversed UUID also, as described in this bug).
As i know host application for Sony products are responsable for communication between phone and accessory.
But, in bluetooth data transfer from phone to watch what is specially transferred?
For examle, My Extension data as a object array and layout which will be displayed passed to watch? Or all rendered 176x220px UI block is send from phone to watch.
In this transfer is there any security issues to be considered?
Thanks.
Everything is passed to the watch from the host application, so it would be the complete 176x220 bitmap.
As far as security, Bluetooth data is encrypted in BT v2.1+ plus the user still has to pair the device and confirm a pairing code as with all BT devices. So it's not any less secure than any other Bluetooth device on the market in that respect.
I have multiple Raspberry Pi/ Beagle Board/ Panda boards connects to my web server (clouding). Then I want to my clients control the board's GPIO from web interface. I have read many examples on the Internet but in those example the web server is inside every boards.
So, Could anyone help me to use just 1 web server(clouding) outside all of boards to control board's GPIO? Thanks!
You could use NexusDataLink to get your boards connected. This data communication framework allows one to link several devices or systems - the server process may run anywhere. Optionally a REST interface is generated per linked device based on an XML file.