Go to advanced search

by Massi
Sat Aug 19, 2017 5:23 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

OK, so stupid..
The update simply deleted alla the trusted and paired devices
Had to trust and pair it again with bluetoothctl..
Happy ;)

(Working without -C and without the SP add)
by Massi
Sat Aug 19, 2017 5:17 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

The error OS noto something about the lack of the rfcomm porta, it's something happening in the communication over the port. The bind commando cant be run since the address is already in use. The bluetooth service seems also ok So, i cant underatand ;) Ill try fixing this next week when ill be back ...
by Massi
Sat Aug 19, 2017 4:35 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

This is Jessie. I updated my Jessie install, maintenance i'd say :) Still no stretch.. It's 5.23 This is the service file relevant part: ExecStart=/usr/lib/bluetooth/bluetoothd -C ExecStartPost=/usr/bin/sdptool add SP ExecStartPost=/usr/bin/rfcomm bind rfcomm0 20:15:12:04:3$ ExecStartPost=/usr/bin/r...
by Massi
Sat Aug 19, 2017 4:07 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

I had to add the -C (never needed this before), but the sensor is still noto working. Do you see anything useful in this? Andò thanks a lot, as always :) [email protected]:/usr/local/bin/classes/sensors $ sudo sdptool browse local Browsing FF:FF:FF:00:00:00 ... Service RecHandle: 0x10000 Service Class ID ...
by Massi
Sat Aug 19, 2017 3:56 pm
Forum: Troubleshooting
Topic: I2C sensor throwing errors
Replies: 5
Views: 2414

Re: I2C sensor throwing errors

Ive always seen these i2c errors with bad connections
H21 is also very sensitive to long cables
Not a pi problem, or a software problem, in my opinion
by Massi
Sat Aug 19, 2017 3:40 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

This is an old working hc06 adapter, set up and working for ages.
But this seems interesting ;)

Code: Select all

[email protected]:~ $ sudo sdptool browse local                
Failed to connect to SDP server on FF:FF:FF:00:00:00: No 
such file or directory
Sounds arabic to me ;)
by Massi
Sat Aug 19, 2017 2:09 pm
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

Hello douglas, i was hoping in you :) Here is the output: [email protected]:~ $ hciconfig -a hci0: Type: BR/EDR Bus: UART BD Address: 43:43:A1:12:1F:AC ACL MTU: 1021:8 S CO MTU: 64:1 UP RUNNING RX bytes:1602 acl:6 sco:0 events:69 errors:0 TX bytes:1668 acl:4 sco:0 commands:51 errors:0 Features: 0xbf 0xfe ...
by Massi
Sat Aug 19, 2017 9:57 am
Forum: Troubleshooting
Topic: STICKY: Bluetooth not working after update - need info
Replies: 164
Views: 154575

Re: STICKY: Bluetooth not working after update - need info

Hello, I ve just dist-upgraded my pi3, i saw some news on bluez and various firmware, upgraded and now my rfcomm virtual serial port returns only this odd error read failed: device reports readiness to read but returne d no data (device disconnected or multiple access on port ?) What was wrong? And ...
by Massi
Tue Aug 15, 2017 2:15 pm
Forum: Python
Topic: help me , my python script doesn't work
Replies: 5
Views: 937

Re: help me , my python script doesn't work

Am I alone in thinking this name == main thing in python is completely bonkers ? The justification seems to be purely so you can write elements of a python module (i.e. not something a beginner should be contemplating for quite a while) and then run parts of the module as if they were stand-alone s...
by Massi
Thu Aug 10, 2017 9:42 am
Forum: Beginners
Topic: Communication between 3 Raspberry Pi
Replies: 10
Views: 1521

Re: Communication between 3 Raspberry Pi

DougieLawson wrote:
Thu Aug 10, 2017 9:02 am
I've not looked at Javascript with Mosquitto/MQTT, everything I've done has been python or good old C.
Well, to be honest this makes sense. I can't imagine you coding a web interface :)
Btw, the new version of the js library is quite good, reconnection to the broker works flawlessly.
by Massi
Wed Aug 09, 2017 6:46 am
Forum: Beginners
Topic: Communication between 3 Raspberry Pi
Replies: 10
Views: 1521

Re: Communication between 3 Raspberry Pi

DougieLawson wrote:
Mon Aug 07, 2017 9:42 pm
Sounds like another job for Mosquitto with the python paho-mqtt library.
[ot]
i've just noticed a new paho javascript client has been released, finally with auto reconnect! (1.0.3, actually still not on cdn)
i can't find any sort of documentation about that,have you tried it?
Thanks :)
[/ot]
by Massi
Wed Aug 09, 2017 4:32 am
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

as i told you before, you have to turn this while True: pi.write(gpio,0) time.sleep(0.1) pi.write(gpio,1) #this triggers the count time.sleep(1) pi.write(gpio,0) time.sleep(1) pi.write(gpio,1) #click one time.sleep(1) pi.write(gpio,0) time.sleep(1) pi.write(gpio,1) #click 2 time.sleep(1) pi.write(gp...
by Massi
Mon Aug 07, 2017 3:52 pm
Forum: Troubleshooting
Topic: I2C Rasperru Pi 3 GY87 sensor
Replies: 3
Views: 1344

Re: I2C Rasperru Pi 3 GY87 sensor

what do you see with a sudo i2cdetect -y 1 at the command line?
by Massi
Mon Aug 07, 2017 1:26 pm
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

I'm trying to test out your code and my switch but I get the error: AttributeError: 'NoneType' object has no attribute 'send' This is a PiGPIO error i usually see on i2c transactions, not our case, and should happen occasionally. Is it giving this error to you every time? In this case you should di...
by Massi
Mon Aug 07, 2017 11:40 am
Forum: Python
Topic: Simple script optimisation and starting at boot
Replies: 4
Views: 990

Re: Simple script optimisation and starting at boot

The question 1: is possible to optimise it somehow, to spend less CPU time? The question 2: how to make it run automatically at start? I'd try using pigpio's waves for the watchdog square wave. for temperature, i'm with dougie. Not really useful, but if you are doing that for testing.. well half a ...
by Massi
Mon Aug 07, 2017 10:09 am
Forum: General discussion
Topic: 5v vs 3.3v data wires
Replies: 10
Views: 1596

Re: 5v vs 3.3v data wires

oh, and remember to connect the right side! :lol: some time ago, during my experiments, i found myself in deep night to connect a 5v RF receiver to my raspi. I had a level shifter for that. I connected the output of the receiver to the 3.3V side and the raspi at the 5V side. My raspi worked for a da...
by Massi
Mon Aug 07, 2017 9:55 am
Forum: General discussion
Topic: 5v vs 3.3v data wires
Replies: 10
Views: 1596

Re: 5v vs 3.3v data wires

OutoftheBOTS wrote:
Mon Aug 07, 2017 9:03 am
Can you damage a RPi by a 5v chip sending 5v signals to the RPi pins ???
yes.
the level shifter is a good choice.
by Massi
Fri Aug 04, 2017 7:39 pm
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

well, i just discovered how watchdog works :) it's giving the timeout only when for 5 seconds nothing changes on the GPIO Not right for what we are trying to do.. At least, not that easy :) New version #!/usr/bin/env python3 #coding=utf-8 import time import pigpio #setup vars gpio = 16 #where the sw...
by Massi
Fri Aug 04, 2017 6:45 am
Forum: Advanced users
Topic: AM2315, i2c, PIGPIO, bb_i2c_zip
Replies: 1
Views: 564

Re: AM2315, i2c, PIGPIO, bb_i2c_zip

did you disable i2c?
because you are using gpio 2 and 3 with bitbanged i2c, i don't think this is gonna work on i2c pins :)
by Massi
Thu Aug 03, 2017 9:10 pm
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

what did you need to correct in code? i'm quite curious :)
the code should count clicks for 5000ms starting from the first click, isn't it?
by Massi
Thu Aug 03, 2017 1:59 pm
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

you don't have to manage those arguments, since it is pigpio itself to send arguments to the callback. As you can see here: http://abyz.co.uk/rpi/pigpio/python.html#callback the set up callback receives 3 arguments. "g" is our gpio, we know it, it's used since you can use the same callback on differ...
by Massi
Thu Aug 03, 2017 6:38 am
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

how did you phisically connect the switch? are you sure you are using the GPIO 20 (pigpio uses BCM numbers, see www.pinout.xyz) That said, at least you should see the "clean exit" message when you ctrl+c to close the program. Try adding a "print something" in the callback, just to check if it's call...
by Massi
Wed Aug 02, 2017 11:46 am
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

as you can see the code is based on pigpio module ref: http://abyz.co.uk/rpi/pigpio/index.html on the GPIO used for the button is set up a callback (= a function called by the system when a event - rising or falling edge - is found on the gpio) the pigpio's "watchdog" waits for some events on the GP...
by Massi
Wed Aug 02, 2017 7:26 am
Forum: Python
Topic: How to count button presses during a specified amount of time
Replies: 21
Views: 4232

Re: How to count button presses during a specified amount of time

well, you could set up a callback on the button with a watchdog 5 seconds long. Untested: #!/usr/bin/env python3 #coding=utf-8 import time import pigpio #setup vars gpio = 7 #where the switch is connected debounce = 1000 #debounce time, in us clickPeriod = 5000 #control period for clicks. in ms clic...
by Massi
Mon Jul 17, 2017 2:52 pm
Forum: Automation, sensing and robotics
Topic: Peaceview PZEM-004T Energy Module
Replies: 31
Views: 17446

Re: Peaceview PZEM-004T Energy Module

hello, is this of any help for your wiring? https://www.circuitspecialists.com/content/189799/ac004.pdf as far as i can remember (sorry but my pzem04 is left alone with a remote bluetooth serial dongle inside the electrical panel and i have no access to it..) i could not get it to work with the seri...

Go to advanced search