Control development boards from web interface - networking

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.

Related

how to read RFID card from Angular

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.

Communication b/w two WiFi modules using Arduino Ide

Firstly, I'll just give you a brief introduction about our project... its "Speech controlled Home Automation System" where we are controlling the Home appliances by the voice or speech commands. We're successfully done with the voice recognition module. But our problem is with achieving the communication between the transmitter {where the user gives the voice command} and receiver {where the home appliances are present} through WiFi i.e. we have got 2 ESP8266 12E modules interfaced with Arduino both at the transmitter and receiver side and these two WiFi modules need to be communicated(To interchange some data sent by Arduinos).So please let us know which Arduino code need to be used at transmitter side wifi module and at Receiver side wifi module and also about the header files or additional softwares(if any)to be used.
you can achieve this by starting one of wifi modules in Access Point Mode and the other one has to be set to Station Mode in order to connect to the first one.
In case you want to add a router, just set both ESP8266 modules to Station Mode and connect them to the router.
And then transfer any data you want through AT commands of ESP8266.
Here is the refrence to them.
https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/
If you are newbie to Esp8266 and Arduino , this will help you.
http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-arduino-uno/
Good Luck !
I worked on a similar system a year ago. I was developing a remote controlled toy. My main difference was I used the ESP8266 without an Arduino attached.
One ESP worked as a a WiFi hotspot and the other connected to it, sending messages through UDP.
For some reason, I could not get the two ESP modules to connect (I think it was a problem with the board I had), but I sent messages from my computer, and it worked out fine. I will not burden you with all of the code, but here is the GitHub link.
All that needs to happen is they will be on the same WiFi network, and then you can use the ESP8266 WiFi library to send messages between the two. Like I said above, I used UDP, which is good for high speed, with no error checking. But there is also TCP (higher up, has error checking code), or you can use the server/client part of the library to set up a full web server and read/write data to it. Without knowing what type of data, I cannot comment on what would be the best method.
As for headers, you will need WiFi.h, and if you are using UDP you will need WiFiUdp.h
You should not need any external software besides the Arduino IDE.
I taught myself from scratch for this product, using two main resources: the Arduino library reference, and the docs on the ESP8266 Arduino GitHub page

web service communication over nRF24L01

I have two peaces of nRFO24L01, one of them is connected to arduino and second one is connected to RPi. For communication between them I used this library https://github.com/tmrh20/RF24 and this communication working very good. Now I want to have web services on RPi which have to be able to communicate with arduino through the nRF24L01. The best option should be some java web services on tomcat server but I can't manage to find some kind of wrapper which will provide me easily connection between c++ code from mentioned library and web services. Is there any solution for this?
For communication between arduino and RPi I used getting started example from mentioned library from github.
See the RF24Ethernet lib from the same guy:
http://tmrh20.github.io/RF24Ethernet/

API to access GSM signal on computer

Hope this is the right place to ask - assuming so as it is related to programming.
I am looking for some hardware (say a dongle) that would open up an API for my computer to a SIM card. Does that exist anywhere?
The idea would be that I can then use my existing SIM card on its existing network/contract and with a bit of code, send/receive calls and texts. I figured that if a phone can be programmed to do it why can't a computer? I just need the hardware.
Any suggestions if this kind of thing is possible? Even by maybe integrating a phone?
You can use AT commands with any modem or phone, whose driver exposes a modem port when you connect it to a computer. Plug in the phone or modem, and go to Windows Device Manager, and look under "Modems" and see what you've got. From "properties" of the Modem, you can see which COM port it is on.
AT commands are an older method of communicating with a modem. There is a standard set of commands for GSM/GPRS/3G/4G devices available from 3GPP.org, here. Manufacturers add their own proprietary commands for more obscure functions. Many but not all of these are in the public domain.
Some newer plug-in modems may appear as a network adapter (you can see this in Windows), due to their drivers. In this case, you can use the following interfaces:
on Vista: NDIS, proprietary interfaces
on Windows 7 and 8.x Desktop apps: Windows Mobile Broadband API
on Windows 8.x, in the Metro/app area: Windows.Networking and MobileBroadband APIs.
on Windows 10, UWP, there are UWP APIs here. But they do not give as much functionality as the Desktop APIs.
On Windows 8.1 and Windows 10, if the appropriate drives are present it is possible to use the new MBIM interface via the desktop Mobile Broadband DeviceServices API. Mobile Broadband Interface Model spec available here.
On Linux, use AT commands via the serial port.
I'm a bit puzzled by your requirement to make (voice?) calls via a phone connected to a computer. Do you mean Skype? In this case, of course, you wouldn't need any interface for making calls, you would just open an IP connection over a data session - which can be done via any of the above interfaces.
(added this comment as an answer, as there was more information)
I use this GSM device: http://www.mikroe.com/click/gsm2/ connected to a basic UART like: https://www.sparkfun.com/products/718?gclid=CIj1xOzbur4CFUVbfgodCpQASQ
Then use AT COMMANDS.
I also use a piece of software called QNavigator to inspect the modem/gsm: http://www.soselectronic.com/?str=1329

PIC32 bluetooth

I want to implement bluetooth communication on my final bachelor project, but I'm having a lot of doubts.
One of the requisites of this project is to have a Java application that can talk to the micro via Bluetooth. After a lot of research, I've found one that I think it's very good with a SPP profile, but I still have a lot of questions about it:
All the bluetooth on a PC implements the SPP profile stack?
If you need to develop a Java application that runs on every PC that implements the SPP stack, how would you do it?
We started by trying to use BlueCove and JavaBluetooth.org API, the first one runs great but I don't know if it's just on my PC and the second one sends an error (Stack not initialized). Which one would you use, and why?
We decided to buy this bluetooth module, from Sparkfun, any comments for those of you who already use it?
Thanks
I used a similar product for my senior design project from Sparkfun (RN-41): http://www.sparkfun.com/products/10559
It worked right out of the box as a simple UART. This allowed my team and I to develop a simple C# application that used the .NET SerialPort class (System.IO.Ports) to communicate between an MSP430 and the PC application we were developing. If streaming data is all you care about, these Bluetooth modules work great. Java implements a similar SerialPort class for RS-232 communications. Don't forget that Bluetooth was developed to replace a serial cable.
I hope this answer helps! Good luck.
I personnally achieved to use the Sparkfun's bluesmirf devices to communicate with my own Java application (an Eclipse plug-in). I tested it successfully under Windows, MacOS & Linux based systems.
I used the RXTX Java library to connect to the corresponding serial port once the Bluetooth devices were paired. Under Linux I even achieved to configure rfcomm to automatically pair the Bluetooth devices on demand.
From my experiment I encountered some stability issues... Sometimes it simply fails to connect to the given port even if it exists or refuse to reconnect on it. Sometimes it hangs the whole system...
I never found any good solution to fix those issues that seems to be completely system dependent. I would be interested if any one achieved to use it properly...

Resources