BeagleBone Black CAN - beagleboneblack

Is there some libs to work with CAN interface on BeagleBone Black?
Commands cansend and candump are working successful. Now I need to write program in C/C++ for CAN interface.

Yes! cansend and candump uses SocketCAN API so you could make use of SocketCAN API in your code as well.

Related

how to program PRU of beaglebone black in C

I want to try blinking a led on PRU core of beaglebone black rev c.The program I want to write is in c language and o.s. is ubuntu without emulator as described in TI's hands on labs for pru.
I tried blinking led program with TI am335x cortex-A8.
I want to try same with PRU.
I am confused with the dependencies required by PRU.
Any suggestions or guideline will be very helpful.
you can use this example to blink the a led. It is working on my side.
https://github.com/beagleboard/am335x_pru_package/blob/master/pru_sw/old_example/PRU_gpioToggle/
Also please, review the git repository:
https://github.com/beagleboard/am335x_pru_package

Sony Spresense Arduino audio recording with digital microphones

The examples and documentation for the Spresense have a lot of very clear information, yet I think there's something missing for using digital mics with the Arduino IDE. Modifications to the extension board for using digital mics are very clearly documented with nice pictures. The Arduino example projects are great, showing you to record, encode, etc. And I've also understood you must tell the recorder to use the digital microphones with the following:
theAudio->setRecorderMode(AS_SETRECDR_STS_INPUTDEVICE_MIC_D);
There are also nice details in the audio documentation explaining that CXD56_AUDIO_MIC_CHANNEL_SEL must be changed from the default value of 0xFFFF4321, which is for analog microphones, to values for digital microphones. I've been able to follow the instructions for rebuilding the Nuttx kernel and spresense SDK with a new value of 0xCBA98765 which should enable eight digital mics. The last piece that is not clear is what nuttx/sdk binary files now need to be copied over to the Arduino environment. I have a Windows PC for use with the Arduino IDE and I have a Linux PC for building Nuttx and those examples. Can you please list which files on the Linux machine that I need to copy over to the Windows PC for the Arduino IDE to use the SDK that enables the digital mics? Sorry if this is documented somewhere and I overlooked it!
The instructions provided by Sony to record using the digital mic work fine! It was a hardware problem with my microphones. I was able to use the nuttx example named audio_recorder. I haven't tried with Arduino and the process of copying files from a nuttx build to the arduino build folders is still not very clear, but that's a separate issue.

Create an Apple Homekit accessory with NodeMCU (ESP8266)

My goal is to create a simple LED controlled by my iPhone through Homekit.
I'd like to do it using only a NodeMCU (ESP8266).
I found lots of solutions using a NodeJS library (HAP-NodeJS), which works well on my PC, but obviously can't run on a NodeMCU board.
As I understand, all these solutions require a RaspberryPI (or similar board running Linux) that talks with the NodeMCU board. But I don't like this solution.
Is there a way to achieve this goal only with a NodeMCU board?
Update 1 (25/01/2017)
Ok, I'm reading lots of blogs and watching some videos, and I'm understanding more about this topic.
I found NodeMCU Flasher to install the firmware on the board, and I found the firmware I'd like to use (I think I could be more comfortable with Lua).
First problem... I'm using a Mac, and NodeMCU Flasher is for Windows... Is there an alternative?
I downloaded also ESPlorer. Does it provide the same functionality as NodeMCU Flasher?
Please check this.
Public Apple's HomeKit protocol code has been around for some time for more potent processors (notably HAP-NodeJS). This is a rewrite for the ESP8266 to make the server foundation. This project uses ESP8266_RTOS_SDK and WolfCrypt 3.9.8 for the crypto. It will however NOT deliver a certified HomeKit device.

setting up for programming using webGL

I am having problems for setting up my laptop to program using webGL.
I am using mint linux 16. I tried installing nodejs because the webGL is javascript program but it seems not working. I am reading a book called WebGL programming guide and try to run an example in the book to make sure that my laptop is set up for webgl. One of the very first example in the book uses javascript libraries such as webgl-utils.js, webgl-debug.js... but I can find those libraries. Can anyone help me please??
I'd check to see if your video card or browser is supported.
http://get.webgl.org/
http://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists

Solaris: Programmatic interface to ifconfig?

I'm looking for a programmatic interface to the Solaris ifconfig(1M) command.
Apparently Linux has the getifaddrs(3) command, but as far as I can tell this has not been ported to Solaris.
Short of attempting to use the code at the link above, is there any way to determine ifconfig(1M)-type data (network interface presence, state, etc.) without forking the system command and parsing the output?
I have an implementation here, IPv4-only based on SIOCGIFCONF ioctl()'s and IP family agnostic version using SIOCGLIFCONF:
http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/getifaddrs.c
Tested on SPARC/Solaris 10 and x86/OpenSolaris 2008.11 & 2009.06, LGPL 2.1 license.
getifaddrs() was recently integrated into the source code for future OpenSolaris & Solaris releases, but that doesn't help your code run on current releases:
6731945 need BSD getifaddrs() API
OpenSolaris source: usr/src/lib/libsocket/inet/getifaddrs.c
Until then you'll need to use the SIOCGLIFCONF ioctls, which you should find lots of examples of in open source code, including the link you posted.
Real men use ioctl ;)
Take a look at if(7P).

Resources