• Support for Bluetooth LE notifications?

    bluetooth ble android ios
    10
    0 Votes
    10 Posts
    4k Views
    F
    @wituwitu Did you find a way to solve this problem ? I'm having the same issue, I'm pretty sure I'm doing something wrong but I cannot find a solution
  • BLE notifications with FIPY as client

    ble notify characteristic callback
    2
    0 Votes
    2 Posts
    74 Views
    M
    Hi Fredrik, First of all, CHAR_NOTIFY_EVENT works well on FiPy. Could you tell me which version you are using? I tried my example on different versions and I haven't seen a missing descriptor error. You can try the examples below. Please let me know about your experiment. BR, Meric Subscribe_Event def chr1_handler(chr, data): global battery global update events = chr.events() print("events: ",events) if events & (Bluetooth.CHAR_READ_EVENT | Bluetooth.CHAR_SUBSCRIBE_EVENT): chr.value(battery) print("transmitted :", battery) if (events & Bluetooth.CHAR_SUBSCRIBE_EVENT): update = ~update bluetooth = Bluetooth() bluetooth.set_advertisement(name='FiPy 45', manufacturer_data="Pycom", service_uuid=0xec00) bluetooth.callback(trigger=Bluetooth.CLIENT_CONNECTED | Bluetooth.CLIENT_DISCONNECTED, handler=conn_cb) bluetooth.advertise(True) srv1 = bluetooth.service(uuid=0xec00, isprimary=True,nbr_chars=1) chr1 = srv1.characteristic(uuid=0xec0e, value='read_from_here') #client reads from here chr1.callback(trigger=(Bluetooth.CHAR_READ_EVENT | Bluetooth.CHAR_SUBSCRIBE_EVENT), handler=chr1_handler) def update_handler(update_alarm): global battery global update battery-=1 if battery == 1: battery = 100 if update: chr1.value(battery) update_alarm = Timer.Alarm(update_handler, 1, periodic=True) Notify_Event def char_notify_callback(char, arg): char_value = (char.value()) print("New value: {}".format(char_value)) bt = Bluetooth() bt.start_scan(-1) adv = None while(True): adv = bt.get_adv() if adv: try: if bt.resolve_adv_data(adv.data, Bluetooth.ADV_NAME_CMPL)=="FiPy 45": conn = bt.connect(adv.mac) try: services = conn.services() for service in services: time.sleep(0.50) chars = service.characteristics() for char in chars: c_uuid = char.uuid() if c_uuid == 0xec0e: if (char.properties() & Bluetooth.PROP_NOTIFY): char.callback(trigger=Bluetooth.CHAR_NOTIFY_EVENT, handler=char_notify_callback) print(c_uuid) break except: continue except: continue bt.stop_scan() bt.disconnect_client()
  • 1 Votes
    3 Posts
    73 Views
    P
    Pygate needs a lot of RAM. As suggested in the docs you can turn off LTE or Wifi (whichever you don't need) https://docs.pycom.io/tutorials/expansionboards/pygate/#setup
  • IP67 Universal Case.. How to open without damage it?

    4
    1
    0 Votes
    4 Posts
    48 Views
    G
    In my experience pushing them through with some force left a clean edge to install the SMA pigtail in the smallest holes (pictured on the right in your image). I have no experience with the other tabs
  • Connecting to multiple LTE carriers

    lte verizon at&t attach things mobile
    7
    0 Votes
    7 Posts
    632 Views
    K
    @reidfo I've put more time than I would like into the lte here in oz too Steve. Stumbled across some bizarre current draws after modem reset in my battery powered application. On the upside I can now finish an lte connection & get into micropower deepsleep in 3s whereas the disconnect/detach sequence used to take more like 7s. These gems are hard won by those of us who go down these rabbit holes & I'd be happy to share on a wiki. I also think pycom HQ could post some material too, like exactly what lte.init() does for instance.
  • Start Pymesh with Pymesh vs Pybytes?

    2
    0 Votes
    2 Posts
    49 Views
    J
    Missed the edit window, but to correct myself, I can't start the node with pybytes on wifi, start the pymesh, run pybytes.disconnect(), deinit wifi, and then reinit as a wifiAP with webserver without core panics. Though the bigger thing is I can't use pymesh = Pymesh() at all with current firmware? I guess? Need more coffee.
  • Pymesh Border Router Setup?

    3
    0 Votes
    3 Posts
    36 Views
    J
    Ah, interesting, it looks like the node is talking to pybytes, on the signal tab you can see the message with the node/neighbor info that I assume the Pymesh monitoring tab would use. It's just not getting loaded on the webpage. That's good enough for me, haha.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • SSO login to forum despite existing previous account from GitHub login

    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • Failed Firmware Update (Pysense)

    6
    1
    0 Votes
    6 Posts
    43 Views
    P
    @Gijs said in Failed Firmware Update (Pysense): Im guessing a Virtual Machine would be appropriate as well (though I have not tried it that way yet) Indeed, I've heard a report of windows in virtual box on mac os works. I would assume other guest-OS/VM combos to work as well
  • Using SD Card for the Whole Project.

    9
    0 Votes
    9 Posts
    97 Views
    robert-hhR
    @hakan-kayan An example of a copy function: import os def cp(s, t): try: if os.stat(t)[0] & 0x4000: # is directory t = t.rstrip("/") + "/" + s except OSError: pass with open(s, "rb") as s: with open(t, "wb") as t: while True: l = s.read(512) if not l: break t.write(l) So can call that with: from cp import cp cp("source_name", "target_name") if target_name is a directory, the target name will be create as target_name/source_name. So you could use: cp("source_file", "/sd") If you want to copy more than one file at once, you have to create a loop.
  • is I2C thread safe?

    2
    0 Votes
    2 Posts
    22 Views
    robert-hhR
    @troy-salt will there be a conflict? Yes.
  • When does "wifi_on_boot" happen?

    wifi on boot
    6
    0 Votes
    6 Posts
    90 Views
    A
    which you are able to change on the fly if needed. For OEM modules, there's only one option as there's only one antenna port
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    3 Posts
    41 Views
    G
    I must have totally missed your message. I posted the firmwares on the forum some time ago for a different user in your situation, but now we have the latest firmwares published in the documentation: https://docs.pycom.io/updatefirmware/expansionboard/ Best, Gijs
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • Any MicroPython fans? Pros? Cons?

    2
    0 Votes
    2 Posts
    206 Views
    Fynn NochbesserF
    Hi, In general, the MicroPython project is rather active and still the git history changes quite fast here. One of the advantages for me was that it was easier to use than C for my simple project. It was a garage door automation: an engineering college project (I used an ESP8266 and MicroPython). github.com/micropython/micropython/commits/master https://essays.agency/lab-report.html my engineering lab project
  • GPY deepsleep High current

    28
    0 Votes
    28 Posts
    288 Views
    P
    Allow me to add some more comments. 220uA in deepsleep is too much, this is not expected. Outside of an Expansion board, just supplying vin and gnd, it should be 20-21 uA in deepsleep (with 3.75V supply). In an Expansion board 3.1 I see it as low as 57uA. Do you have jumpers (which) and/or SD card inserted? 57uA is without any.
  • Pygate - ethernet reliability issues

    41
    0 Votes
    41 Posts
    576 Views
    G
    Hi @Richard-Martineau Over the last weeks we did some tests with the method you describe, but unfortunately no resolution there :(
  • buying the hardware

    7
    0 Votes
    7 Posts
    60 Views
    M
    Hi @Shoaib-Waqar I understand DHL shipping to Sweden takes 2-3 days. If you order today we will hand it to DHL by tomorrow.

Pycom on Twitter