I want to track the live location of a truck.
Is it possible to interface a tracking device with nodejs? if yes, what kind of tracking device is compatible with node?
And links to helpful blog post or any resource that would guide me accomplish this would be really appreciated.
I love using Johnny-Five to interface nodejs with hardware. Here is a link to their examples using some common gps modules. http://johnny-five.io/api/gps/
Related
I am quite new to bluetooth development, but having fun learning it!
So far I have worked on making a RPi4 into a central device, and have managed to implement discovery, connecting, monitoring, etc.
In the coming days I want to start working on a separate device for peripheral-central testing. Building up to this I am attempting to implement a few custom Bluez profiles. The ones I am trying to implement are: A2DP, HFP, and PBAP.
So far, I am able to register the profiles on the Pi and can see them using bluetoothctl show and dbus-monitor --system.
The one I am having trouble with is A2DP. For HFP I have been using test-hfp as inspiration and for PBA I have been using pbaclient.py along with an override of the Bluez Profile methods. For A2DP it seems very difficult to find any documentation of how to write a custom profile. As of now, I've left it as a method override of the Bluez profile methods. With HFP, it was necessary to work with socket connection and client, I assume it is quite similar for A2DP, but where/how do I start? I assume I will also need to disable the inbuilt Pi profile Audio sink before registering my own A2DP, and remember I have read how to do this somewhere, but if anyone knows from the top of their head how to do this, feel free to help me out :)
On another note, I am placing the relevant .h and .c files in the same folder as where I am implementing the profile.py files, using the given .h and .c files found in bluez.5.58, but for HFP, I can only find a .c file in my bluez library. Can I use the .h file found in AlsaBluez or am I just missing the placement of the correct file?
Any tips and pointers on how to approach these issues and my method/efforts overall moving forward is greatly appreciated! :)
I want to use a bluetoothmodul like this Waveshare Core51822 to send data to a raspberry. I want to use the SPI on the bluetooth modul but i dont have a plan how to configure that.
What do i need?
Thanks
The SPI and BLE are all documented extensively at http://infocenter.nordicsemi.com/, including examples, specifications, and an API.
In the future, you should give much more information about your situation. For instance, what platform/IDE are you using to develop? If your module is compatible, you would probably be best off using ARM's mbed compiler (https://os.mbed.com).
I have a Raspberry Pi that acts as a BLE peripheral. I want to add Apple's HomeKit Accessory Protocol (HAP) to the Raspberry Pi's BLE code, to control the BLE device using Homekit. I would like to avoid implementing HAP over the internet.
The closest resource I found is https://gist.github.com/KhaosT/6ff09ba71d306d4c1079. However, this gist makes it seem like there are many unknowns with that process.
Does anyone know if this is possible? If so, any info or resources would be greatly appreciated. Thanks!
As mentioned at https://developer.apple.com/homekit/ under Accessory Developers, you need to first sign up for MFi and then you will get access to all the resources you need in order to implement homekit. All source code you can find publicly online is against Apple's license since they prohibit public redistribution of documentation and source code of implementations.
Hi I'm not very good with coding but I'm trying to learn as much as I can. I've been looking for tutorials on how to create an internet call app on android studio. So far I haven't found any. If anyone knows a process that could guide me I would very much appreciate it.
You can use android's own implementation
Session Initiation Protocol
from docs
Android provides an API that supports the Session Initiation Protocol
(SIP). This lets you add SIP-based internet telephony features to your
applications. Android includes a full SIP protocol stack and
integrated call management services that let applications easily set
up outgoing and incoming voice calls, without having to manage
sessions, transport-level communication, or audio record or playback
directly.
or other third-party libraries like following.
1.Pjsip
2.Mjsip
3.doubango
4.belle-sip
Hope it helps..
P.S taken from this answer
refer this also..
Happy Coding :)
This is a basic question of understanding. I'm trying to follow this explanation http://www.barryvandam.com/node-js-communicating-with-arduino/ but something there sounds a bit off to me.
As far as I understood before, I only need to push the standard Firmata code into the Arduino and code via Node.js to call actions and information from the Arduino.
But in this link they point our that I need to upload a code to the Arduino, which will obviously delete the Firmata code that is now there. wouldn't it result in loosing connection to the Arduino?
How does it work?
many thanks!
The example above does not use Firmata, though Firmata makes things easier. If you want to implement your own serial control protocol, there nothing stopping you.
However, if you load StandardFirmata on your Arduino, and then use the Firmata.js package in node, then you have a full-featured, well established serial protocol and an api to access the pins from.
There are Firmata controller implementations for most languages out there.
On top of Firmata.js, you might choose to use an abstraction called Johnny-Five. Johnny-Five abstracts the pins as components, with an intuitive API. Instead of controlling a servo by setting a pin value, you create a servo, and call servo.to(angle). It is kind of like jQuery but for hardware. It abstracts the platforms and devices in such a way that the shape of the interface is the same, but the hardware might be completely different. It is a very comfortable place to develop from.
Firmata is a set of functions that you can pre-load onto your Arduino that libraries like Johnny-Five can call to perform certain tasks.
As previously said by the author of the accepted answer, you don't have to use it, you can write your own logic to send and receive custom message.
In Node.js you can use the node-serialport library to send the message:
myPort.write();
Then read the message from the Arduino with the built in Serial library:
while(radio.available()){
radio.read(chr, 1);
}
Firmata is one way to communicate with an Arduino, you do not have to use it.
You can "talk" to Arduindo directly using the SerialPort module - which is what the linked example is doing.