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.
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.
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.
@Przemyslaw-Downar I did. Although it doesn't seem 100% reliable on the Onion.
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.
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.
@WereCatf I never said I was using an Omega 2
@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).
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
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.
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);
}
Actually, I'd take some help around writing a small C program that:
I will have a stab at it myself in the meantime