The general approach would be to cross-compile them and copy them over. This is a good candidate for creating an OpenWRT module and doing the cross-compile within there.
Posts made by Marc Nicholas
-
RE: Homekit Lightswitch with hap-nodejs
-
RE: What's wrong with my I2C code?
@Przemyslaw-Downar I did. Although it doesn't seem 100% reliable on the Onion.
-
Wanted: Omega 1s
Do you have an Omega 1 that you don't want anymore? I need several more for a project I'm working on and all the stockists seem to be sold out.
Send me a private message if you have one to part with. Bonus points for expansion dock and ethernet.
-
RE: Using the Onion nodejs package -- illegal instruction
So, just to clarify: OpenWRT build root (Chaos Calmer) + node v4.3.1 (from the Omega OpenWRT Packages repo) results in an illegal instruction.
Setting soft-float doesn't seem to fix the problem.
-
RE: Using the Onion nodejs package -- illegal instruction
@WereCatf I never said I was using an Omega 2
-
RE: Using the Onion nodejs package -- illegal instruction
@WereCatf My bad, it was actually info on Github (https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment).
Because the Onion packages don't work based on these instructions, I git clone'd their packages repo into the packages directory (works the same).
-
Using the Onion nodejs package -- illegal instruction
I've made my on build root based on the instructions in the Wiki. I can successfully compile nodejs, but I get an illegal instruction on running. I've read elsewhere this can be caused by FPU issues (lack of) -- but I note the makefile has a configure option for soft FPU.
Has anyone been able to successfully use the compiled rather than opkg version of node?
Thanks.
-m
-
RE: What's wrong with my I2C code?
I busted out the logic analyzer and see the address (0x80 for write) and the byte (0xf3) for start conversion both get an ACK.
Reads get a NAK, however.
-
What's wrong with my I2C code?
I hacked together some I2C code based on some things I found on the Interweb. I keep getting I2C read errors despite the fact I can see the I2C device with i2ctools.
root@Omega-1041:/# ./i2c HTU21D Test error reading i2c device : No such device or address error reading i2c device : No such device or address eror reading i2c device : No such device or address eror reading i2c device : No such device or address Temperature 0x66 0xfc 0x6c\nHumidity 0x3f 0xfc 0x6c
But the values that are returned for temperature seem legit. Anyone got any ideas where I'm going wrong here?
#include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <linux/i2c-dev.h> int main( int argc, char **argv ) { int i; int r; int fd; unsigned char command[2]; unsigned char value[3]; useconds_t delay = 5000; char *dev = "/dev/i2c-0"; int addr = 0x40; printf("HTU21D Test\n"); fd = open(dev, O_RDWR ); if(fd < 0) { perror("Opening i2c device node\n"); return 1; } r = ioctl(fd, I2C_SLAVE, addr); if(r < 0) { perror("Selecting i2c device\n"); } command[0] = 0xe3; r = write(fd, &command, 1); if(r != 1) { perror("error writing to i2c device\n"); } usleep(delay); for(i = 0; i < 3; i++) { // the read is always one step behind the selected input r = read(fd, &value[i], 1); if(r != 1) { perror("error reading i2c device\n"); } usleep(delay); } printf("Temperature 0x%02x 0x%02x 0x%02x\\n", value[0], value[1], value[2]); usleep(delay); command[0] = 0xe5; r = write(fd, &command, 1); usleep(delay); for(i = 0; i < 3; i++) { // the read is always one step behind the selected input r = read(fd, &value[i], 1); if(r != 1) { perror("eror reading i2c device\n"); } usleep(delay); } printf("Humidity 0x%02x 0x%02x 0x%02x\n", value[0], value[1], value[2]); close(fd); return(0); }
-
RE: Got my i2c bus working, but now facing issues with HTU21D
Actually, I'd take some help around writing a small C program that:
- Writes a single byte command to the I2C bus
- Reads three bytes back off of the bus
I will have a stab at it myself in the meantime
-
RE: Terminal does not respond after starting Shairport-sync
Add an ampersand ("&") to then end of the command and it'll run in the background.
If you want the command to continue even when you're not logged in, add "nohup" to the beginning.
-
Got my i2c bus working, but now facing issues with HTU21D
Hi,
I'm attempting to interface with an HTU21D temperature/humidity sensor.
I've written a quick shell script that writes the start command for humidity to the device and then reads back a byte using i2cget. The byte seems valid as if I increase the humidity with my finger, the values increase and then drop as my finger goes away. All good so far.
However, I need to read a word rather than a byte. Using "0x00" as the register and "w" for word with i2cget yields a read error. Also, I'm not really reading a register per se -- these are bytes "on the wire".
Does anyone have any recommendations on how to get i2cget to work with this device? Or simple suggestions on doing this in Python etc.
Thanks in advance.
-
RE: I2C woes at 2.5VDC
@Marc-Nicholas I should point out this is an original Onion and not the 2.
-
I2C woes at 2.5VDC
Hi,
I'm having trouble speaking to an I2C device that I know works.
I have the I2C device powered from the 2.5V on the expansion doc -- my device can run from 1.8-3.3VDC. I've tried both 1K and 10K pull-up resistors, but still can't get a response in i2cdetect.
Any ideas as to what might be wrong? My multimeter and logic analyzer aren't currently available.
Thanks.