Go to advanced search

by marciokoko
Mon Sep 17, 2018 11:18 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

I have this code so far: #!/usr/bin/env python import bluepy.btle as btle #Delegate methods class ReadDelegate(btle.DefaultDelegate): def __init__(self): btle.DefaultDelegate.__init__(self) def handleNotification(self, cHandle, data): print("Here is the data...") print("A notification was received: ...
by marciokoko
Tue Sep 11, 2018 9:57 pm
Forum: Beginners
Topic: Can i power a rpi3 and a 5” lcd from 1 power adapter?
Replies: 12
Views: 387

Re: Can i power a rpi3 and a 5” lcd from 1 power adapter?

Ok wait, im still confused. I currently have my rpi3 connected to a 5" hdmi using an hdmi-adaptor that came with the screen and I power the rpi3 which I assume in turn powers the screen via the gpio pin stack, since I dont believe hdmi connectors provide power.

I dont want my rpi3 to burn out
by marciokoko
Tue Sep 11, 2018 9:29 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Ok I tried this readline() instead of read() and i get this error: Hallo from Peripheral discovering services Hello Service <uuid=Generic Attribute handleStart=12 handleEnd=15> Service <uuid=Generic Access handleStart=1 handleEnd=11> commonName= 0000ffe0-0000-1000-8000-00805f9b34fb commonName= ffe0 ...
by marciokoko
Tue Sep 11, 2018 7:41 pm
Forum: Beginners
Topic: Can i power a rpi3 and a 5” lcd from 1 power adapter?
Replies: 12
Views: 387

Re: Can i power a rpi3 and a 5” lcd from 1 power adapter?

So you had the pi connected to the screen how, exactly?
by marciokoko
Tue Sep 11, 2018 4:32 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

So I took this part of the python code: s = p.getServiceByUUID("0000ffe0-0000-1000-8000-00805f9b34fb") c = s.getCharacteristics()[0] c.write("[") x = c.read() #parse read with helper functions######################### responseBits = convert_hex_to_bin_str (x) and inserted a print x right between the...
by marciokoko
Sun Sep 09, 2018 3:06 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Thanks I dont believe its a python issue as I havent been able to get the ble relay board (device) to respond or be able to read its characteristic data via bluetoothctl either. This is what I know so far: 1. The ble device (relayboard) can talk to any of the BLE android apps out there and I can rea...
by marciokoko
Sat Sep 08, 2018 1:09 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Please I need help writing python to read response from a ble device.
by marciokoko
Sat Sep 08, 2018 12:42 am
Forum: Troubleshooting
Topic: Ssh doesnt work but ping does
Replies: 1
Views: 72

Ssh doesnt work but ping does

So I have this network the rpi3 is on. Sometimes I can ssh into it just fine, but others like now, I can ping the IP just fine and it responds 25ms etc. But when I try to ssh via terminal, the terminal just hangs after I enter the ssh command... Any ideas why? It seems the rpi3 Gets dropped from the...
by marciokoko
Tue Aug 14, 2018 11:08 pm
Forum: Python
Topic: Internet connection Python code help
Replies: 0
Views: 135

Internet connection Python code help

I have this code where 1. init calls a scheduler for every hour, 2. fetchUpdate does the connecting 3. relayToggle parses response and executes toggle As you can see in the fetchUpdate() I have a comment which is what im trying to implement now. So if internet connection fails, I should get an error...
by marciokoko
Mon Aug 13, 2018 2:21 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Hello? Help please
by marciokoko
Wed Aug 01, 2018 5:52 pm
Forum: Troubleshooting
Topic: Raspberry pi 3 time sync on reboot
Replies: 3
Views: 115

Re: Raspberry pi 3 time sync on reboot

So it may have actually NOT updated correctly after the blackout (due to wireless vs wired connection issues) and when it tried the update ntp server it failed.

So when I saw the July 31st maybe it was still the saved time instead of the ntp updated time.
by marciokoko
Wed Aug 01, 2018 2:47 pm
Forum: Troubleshooting
Topic: Raspberry pi 3 time sync on reboot
Replies: 3
Views: 115

Raspberry pi 3 time sync on reboot

Hi guys I have this rpi3 which I thought I had configured to sync to the internet servers on reboot I'm case of power failure. It had been a while since a power failure to test it but we got a long one a few days ago. (Before that we had some but they were short-lived so perhaps the time difference ...
by marciokoko
Mon Jul 30, 2018 5:02 pm
Forum: Beginners
Topic: Using bluetoothctl commands doesnt work for me
Replies: 4
Views: 174

Re: Using bluetoothctl commands doesnt work for me

Thanks @Douglas6, I posted back in the original thread. This post was actually meant to be for Invalid Commands error I was getting. The solution to that seems to be that I had to be inside the menu gatt for those commands to work. I was trying to make them work from the main menu.
by marciokoko
Mon Jul 30, 2018 5:01 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

ok so i backed up from scripting the commands to using bluetoothctl to make sure they work again. I tried notifications in this way but i still get 00. Is there a special way to read notifications with bluetoothctl? [BT Bee-BLE:/service0010/char0011]# notify on [CHG] Attribute /org/bluez/hci0/dev_00...
by marciokoko
Mon Jul 30, 2018 3:20 am
Forum: General discussion
Topic: Read wearable data via BLE
Replies: 5
Views: 382

Re: Read wearable data via BLE

Hi

Could you tell me what you did in order to read it? I ran into a similar issue:

viewtopic.php?f=91&t=219274&p=1346761#p1346761

Thanks!
by marciokoko
Mon Jul 30, 2018 2:48 am
Forum: Beginners
Topic: Using bluetoothctl commands doesnt work for me
Replies: 4
Views: 174

Re: Using bluetoothctl commands doesnt work for me

I had to connect to the service before connecting to the char and the read it: Screen Shot 2018-07-29 at 9.00.53 PM.png But im getting. I used to send the value "[" to get back a response in the form of a json string or list or array telling the state of each relay, so like: [1:0, 2:0, 3:1, 4:0] to ...
by marciokoko
Sun Jul 29, 2018 8:06 pm
Forum: Beginners
Topic: Using bluetoothctl commands doesnt work for me
Replies: 4
Views: 174

Using bluetoothctl commands doesnt work for me

Im on rpi3 using bluetoothctl. Some commands work, im connected to my ble device, but I try to select and read attributes but I get 'Invalid Command' errors:
Screen Shot 2018-07-29 at 2.04.49 PM.png
Screen Shot 2018-07-29 at 2.04.49 PM.png (94.37 KiB) Viewed 174 times
How can I read these chars?
by marciokoko
Sun Jul 29, 2018 7:48 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

ok from what ive been reading, i think noble is for reading and writing ble chars from a rpi (or computer) with a dongle ble. I dont think it works for rpi3 with onboard ble. Whenever I run simply: var noble = require('noble'); noble.startScanning(); var serviceUUIDs = ["0000ffe000001000800000805f9b...
by marciokoko
Sun Jul 29, 2018 3:45 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

ok i found this and i was able to install everything fine: npm config set registry http://registry.npmjs.org/ I'm running my js file now. But it hangs here: [email protected]:~/bleproject $ sudo node readtsrb.js Started scanning My final code is: var noble = require('noble'); //noble library var periph...
by marciokoko
Sun Jul 29, 2018 1:28 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

I ran this:

Code: Select all

npm install noble
but it hangs here:

Code: Select all

fetchMetadata: sill resolveWithNewModule [email protected] checking installable status
By hang I mean it took more than 5 minutes so I Ctrl-C out...
by marciokoko
Sat Jul 28, 2018 9:32 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

I'm using this code from https://github.com/tigoe/BluetoothLE-Examples/blob/master/noble/exploreReadWriteExample/explore.js But they mention: var peripheralName = "LED"; // the local name of the peripheral you want var targetService = '19b10000e8f2537e4f6cd104768a1214'; // the service you want var t...
by marciokoko
Sat Jul 28, 2018 6:02 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

The node one seems much simpler. It seems to be basically: noble.on('discover', function(peripheral) { peripheral.connect(function(error) { console.log('connected to peripheral: ' + peripheral.uuid); peripheral.discoverServices(['180a'], function(error, services) { var deviceInformationService = ser...
by marciokoko
Fri Jul 27, 2018 10:43 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Thanks phatfil. I started reading and noticed that it uses bleno and noble which are js modules. Well I'll venture into the js world but I was looking for a python way for reading BLE characteristics. Would you happen to know of any? Also, although I don't see why not, will it work for rpi3? Because...
by marciokoko
Tue Jul 24, 2018 12:59 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

So can anyone point me in the right direction for reading data from the BLE device using BLE?
by marciokoko
Tue Jun 26, 2018 3:22 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 34
Views: 1190

Re: Reading response from BLE device on rpi3

Im not for any particular way. Im coming from an rpi2 with gpio connected hm10 module which used serial. When I migrated to rpi3, I asked for help and was suggested to use BLE instead, so I did for writing. Now that I have to read I was suggested to use the delegate to listen for notifications. So h...

Go to advanced search