Giter Club home page Giter Club logo

raspberry's Introduction

MySensors Library v2.4.0-alpha

Please visit www.mysensors.org for more information

Current version in Arduino IDE arduino-library-badge

Documentation

master development

CI statuses

Current build status of master branch: Build Status

Current build status of development branch: Build Status

Current build status of master branch (nightly build of Arduino IDE): Build Status

Current build status of development branch (nightly build of Arduino IDE): Build Status

raspberry's People

Contributors

aliasdoc avatar andrimarjonsson avatar gertsanders avatar henrikekblad avatar mtill avatar stelgenhof avatar thozza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspberry's Issues

make all in librf24-bcm crashes when installing in Jesse

Having a clean rpi Jessie image.
When following the instructions and entering "make all" I get a lot of errors. failing the make.

Errors (a lot of them) look like this:

bcm2835.c:1253:79: note: in expansion of macro ‘BCM2835_ST_BASE’ bcm2835_st = (volatile int32_t *)mapmem("st", BCM2835_BLOCK_SIZE, memfd, BCM2835_ST_BASE);

ttyMySensorsGateway only accessable as root

when I

ls -l ttyMySensorsGateway

I get

lrwxrwxrwx 1 root root 10 Jan  3 20:21 ttyMySensorsGateway -> /dev/pts/0

Meaning I can only access as root which results in all kinds of accessability issues. The makefile states

TTY_GROUPNAME := tty

But that doesn't seem to do anything. How to change ?

Using GPIO_P1_22 instead of RPI_BPLUS_GPIO_J8_15 works perfectly fine on Raspi 2

Following test in PiGatewaySerial.cpp should be reversed:

/* create MySensors Gateway object */

ifdef __PI_BPLUS

gw = new MyGateway(RPI_BPLUS_GPIO_J8_15, RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ, 1);

else

gw = new MyGateway(RPI_V2_GPIO_P1_22, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_8MHZ, 1);

endif

Using GPIO_P1_22 instead of RPI_BPLUS_GPIO_J8_15 works perfectly fine on Raspi 2

please mention the raspi version in README

Hi,

I believe your pinout diagram in README file corresponds to older raspis with 26 pins? Or is it for the newer ones b+/2/3 with 40 pins? It would be good to mention the raspi version, so people don't fry their boards.

100% CPU all the time

I have been using this gateway for 3 months without any problem on a Raspberry Pi 2

I was using raspian wheezy.

When I started the gateway, i had 100 % CPU load for the new process, but after about 1 minute, the CPU was low.

I had to upgrade to jessie and now CPU is 100% all the time (before and after I rebuild the gateway).

With strace, i see this request every time

poll([{fd=3, events=POLLRDNORM}], 1, 500) = 1 ([{fd=3, revents=POLLHUP}])

Do you have an idea to decrease the CPU usage ?
Thanks

Docker?

Hey
Great project(s)

What about creating a Docker image for Raspberry?
(Same question for MyController, etc)
That would make the installation very easy. install docker, and docker run ...
Maybe I can help, let me know if this makes any sense.

PiGatewaySerial doesn't write to virtual serial device /dev/ttyMySensorsGateway

Hi, I have some troubles with PiGatewaySerial (last version from github), raspberry pi Model B Revision 2.0 (000e)

$ cat /proc/cpuinfo
processor   : 0
model name  : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS    : 2.00
Features    : half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xb76
CPU revision    : 7

Hardware    : BCM2708
Revision    : 000e
Serial      : 00000000b9b39005

When i execute ./PiGatewaySerial, it prints on the screen values read from sensors, but
it doesn't write anything on the virtual serial device /dev/ttyMySensorsGateway

$ sudo ./PiGatewaySerial
Starting PiGatewaySerial...
Protocol version - 1.4
Created PTY '/dev/pts/0'
Gateway tty: /dev/ttyMySensorsGateway
================ SPI Configuration ================
CSN Pin   = CE0 (PI Hardware Driven)
CE Pin   = Custom GPIO25
Clock Speed = 8 Mhz
================ NRF Configuration ================
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xa8a8e1fc01 0xa8a8e1fc00
RX_ADDR_P2-5 = 0xff 0xc4 0xc5 0xc6
TX_ADDR = 0xa8a8e1fc01
RX_PW_P0-6 = 0x20 0x20 0x20 0x00 0x00 0x00
EN_AA = 0x3b
EN_RXADDR = 0x06
RF_CH = 0x4c
RF_SETUP = 0x23
CONFIG = 0x0e
DYNPD/FEATURE = 0x3f 0x06
Data Rate = 250KBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_LOW
read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
send: 255-194-1-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
read: 255-0-8 s=255,c=3,t=3,pt=0,l=0:
send: 255-194-1-8 s=255,c=3,t=3,pt=0,l=0,st=fail:

instead, if i read from /dev/ttyMySensorsGateway i obtain only the first
message by the gateway, nothing else.

$ sudo cat /dev/ttyMySensorsGateway
0;0;3;0;14;Gateway startup complete.
$ ls -al /dev/ttyMySensorsGateway 
lrwxrwxrwx 1 root root 10 nov  5 16:32 /dev/ttyMySensorsGateway -> /dev/pts/0
$ ls -al /dev/pts/*
crw-rw---- 1 root tty  136, 0 nov  5 16:32 /dev/pts/0
crw--w---- 1 pi   tty  136, 1 nov  5 16:33 /dev/pts/1
c--------- 1 root root   5, 2 gen  1  1970 /dev/pts/ptmx

if i understood anything i think i should find all the messages from remote nodes in /dev/ttyMySensorsGateway but it isn't working like this.

Make it SystemD compatible.

Could you create the SystemD .services equivalent to the init.d scripts (PiGateway and PiGatewaySerial) for those who use it?
thanks for all the work.

Compatibility with RPI2 ?

I try to use this gateway with a rpi2
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 57.60
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

Hardware : BCM2709
Revision : a01041
Serial : 000000002eec91d0

But I think the Makefile does not detect it is a RPI2 but a RPI B+, so

make
g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv7-a -D__PI_BPLUS -I. -Ilibrf24-bcm/
g++ -o PiGatewaySerial MyGateway.o MySensor.o MyMessage.o PiEEPROM.o PiGatewaySerial.o -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv7-a -D__PI_BPLUS -I. -Ilibrf24-bcm/ -lrf24-bcm -lutil

So in the PiGatewaySerial.cpp the flag __PI_BPLUS is set and the wrong parameter are taken.

I modify the code like in this post http://forum.mysensors.org/topic/1974/domoticz-as-controller-and-a-gateway-for-mysensor-nodes-running-on-a-raspberry-pi-2/19, but I still have problem with this gateway on a rpi 2.

Can someone help me ?

Raspberry is freezing after create the TTY

Hello Guy's. I'm new here and I need some help.

I was trying to use MySensors on my Raspberry Pi 2, but I can't start the serial gateway.

Configurations:
No capacitor connected to the NRF24L01
not overclocked PI
CN not connected

I followed this tutorial:
http://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection

When I start the program in get this output:

./PiGatewaySerial
Starting PiGatewaySerial...
Protocol version - 1.4
Created PTY '/dev/pts/1'
Gateway tty: /dev/ttyMySensorsGateway

and my raspberry freezes. I can't finish the processes with STRG+C. What do I need to do?

regards,
Ricardo Leoni

cant start Gateway

i cant start the serial gateway.

  • I have a Pi 1 B (first Generation with 256 MB RAM)
  • capacitor connected to the NRF24L01+
  • not overcloced PI
  • CN connected to PIN 22 (GPIO 25)

i followed this tutorial:
http://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection

When i start the programm in get this output:

./PiGatewaySerial
Starting PiGatewaySerial...
Protocol version - 1.4
Created PTY '/dev/pts/1'
Gateway tty: /dev/ttyMySensorsGateway
check wires

and a 100% CPU Load.

I cant end process with STRG+C. Only a KILL -9 stop it.

regards,
n3ro

Can't build it.

When trying to run make I get the following output.

# make
g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME=\"/dev/ttyMySensorsGateway\" -D_TTY_GROUPNAME=\"tty\" -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -D__PI_BPLUS -I. -I/usr/local/include/RF24
In file included from /usr/include/c++/6.2.1/bits/char_traits.h:39:0,
                 from /usr/include/c++/6.2.1/ios:40,
                 from /usr/include/c++/6.2.1/ostream:38,
                 from /usr/include/c++/6.2.1/iostream:39,
                 from ./MyMessage.h:37,
                 from ./MySensor.h:18,
                 from ./MyGateway.h:16,
                 from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
/usr/include/c++/6.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
In file included from ./MySensor.h:18:0,
                 from ./MyGateway.h:16,
                 from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected unqualified-id before 'const'
     min(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected ')' before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:195:5: error: expected initializer before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected unqualified-id before 'const'
     max(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected ')' before 'const'
/usr/include/c++/6.2.1/bits/stl_algobase.h:219:5: error: expected initializer before 'const'
In file included from /usr/include/c++/6.2.1/bits/char_traits.h:39:0,
                 from /usr/include/c++/6.2.1/ios:40,
                 from /usr/include/c++/6.2.1/ostream:38,
                 from /usr/include/c++/6.2.1/iostream:39,
                 from ./MyMessage.h:37,
                 from ./MySensor.h:18,
                 from ./MyGateway.h:16,
                 from PiGatewaySerial.cpp:36:
/usr/include/c++/6.2.1/bits/stl_algobase.h:243:5: error: 'std::min' declared as an 'inline' variable
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected primary-expression before 'if'
       if (__comp(__b, __a))
       ^~
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected '}' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:246:7: error: expected ';' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:248:7: error: expected unqualified-id before 'return'
       return __a;
       ^~~~~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:265:5: error: 'max' declared as an 'inline' variable
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected primary-expression before 'if'
       if (__comp(__a, __b))
       ^~
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected '}' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:268:7: error: expected ';' before 'if'
/usr/include/c++/6.2.1/bits/stl_algobase.h:270:7: error: expected unqualified-id before 'return'
       return __a;
       ^~~~~~
/usr/include/c++/6.2.1/bits/stl_algobase.h:271:5: error: expected declaration before '}' token
     }
     ^
make: *** [Makefile:61: PiGatewaySerial.o] Error 1

I tried on a Rpi3, with archlinux, as root.

I succeeded to install the RF24 library though.
Is there something I could do?

error when sudo /etc/

hi when that i run code :

`sudo /etc/init.d/PiGatewaySerial start

this error show:
[....] Starting PiGatewaySerial (via systemctl): PiGatewaySerial.serviceFailed to start PiGatewaySerial.service: Unit PiGatewaySerial.service failed to load: No such file or directory.`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.