Go to advanced search

by marciokoko
Tue Aug 14, 2018 11:08 pm
Forum: Troubleshooting
Topic: Internet connection Python code help
Replies: 0
Views: 25

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: 26
Views: 676

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: 77

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: 77

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: 131

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: 26
Views: 676

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: 289

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: 131

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: 131

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 131 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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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: 26
Views: 676

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...
by marciokoko
Mon Jun 25, 2018 5:23 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Re: Reading response from BLE device on rpi3

@Douglas6

Hadnt seen your post. Yes I did try using notiications and writing the bracket...Thats the OP of this thread. My code is included and the python script just hangs when I run it.
by marciokoko
Mon Jun 25, 2018 5:20 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Re: Reading response from BLE device on rpi3

Here is the link to the board:
https://www.tinyosshop.com/index.php?ro ... uct_id=684

Here is the screenshot of when I read the value:
ble2.jpg
ble2.jpg (32.03 KiB) Viewed 391 times
by marciokoko
Mon Jun 25, 2018 1:40 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Re: Reading response from BLE device on rpi3

I get nothing...just a blank line
by marciokoko
Sun Jun 24, 2018 4:10 am
Forum: Beginners
Topic: Debugging python executable
Replies: 1
Views: 75

Debugging python executable

I made a python file with tkinter and it runs fine (the window gui part) but im working on debugging the python code so Im making changes to the python code by opening it in nano with sudo and making the change and saving. After I make changes and save the file, do I need to do something else for th...
by marciokoko
Sun Jun 24, 2018 2:35 am
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Re: Reading response from BLE device on rpi3

I just tried printing the c object, its just the characteristic: Service <uuid=Generic Attribute handleStart=12 handleEnd=15> Service <uuid=Generic Access handleStart=1 handleEnd=11> commonName= 0000ffe0-0000-1000-8000-00805f9b34fb commonName= ffe0 Service <uuid=ffe0 handleStart=16 handleEnd=65535> ...
by marciokoko
Fri Jun 22, 2018 10:51 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Re: Reading response from BLE device on rpi3

So you're saying I should print the c object as in:

Code: Select all

s = p.getServiceByUUID("0000ffe0-0000-1000-8000-00805f9b34fb")
c = s.getCharacteristics()[0]
print(c)
like that?
by marciokoko
Thu Jun 21, 2018 11:44 pm
Forum: Beginners
Topic: Reading response from BLE device on rpi3
Replies: 26
Views: 676

Reading response from BLE device on rpi3

I have a bluetooth relay board that when sent the character over serial "[", responds with this array of relay states: {1: 1, 2: 1, 3: 1, 4: 1, 5: 0, 6: 0, 7: 1} Now Im connecting with it via BLE and I can send it commands just fine and it responds fine. But when I send it the "[" character the pyth...
by marciokoko
Tue Jun 12, 2018 12:41 am
Forum: Troubleshooting
Topic: Unable to connect to BLE device
Replies: 10
Views: 766

Re: Unable to connect to BLE device

Ok writing to the characteristic does work, but it also fails. With the rpi2 using the gpio pins it never failed. Looking at the tmux session I see: File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 410, in _connect "Failed to connect to peripheral %s, addr type: %s" % (addr, addrTy...

Go to advanced search