New firmware release 1.0.0.b1



  • Hello Daniel, this is a big improvement. Would you mind to update the github repository, such that I can enable support of .mpy files?
    Robert



  • @daniel
    In this release note you have mentioned WiFi and BLE Coexistence, I have tried a very simple REPL script to check if that's true and I'm sorry to say I have found it's not!
    I have tried importing BLE first like this:

    from network import Bluetooth
    ble = Bluetooth()
    # Heartbeat LED turns constant blue.
    ble.scan()
    # outputs a few bluetooth devices in 10 secs
    from network import WLAN
    wifi = WLAN(mode = WLAN.STA)
    wifi.scan()
    # REPL won't give back the control and it never finishes the task
    

    This is a little different if the order was reversed:

    from network import WLAN
    wifi = WLAN(mode = WLAN.STA)
    wifi.scan()
    # Outputs list of WiFi devices very fast
    from network import Bluetooth
    ble = Bluetooth()
    ble.scan()
    # Outputs a list of BLE devices in 10 seconds.
    wifi.scan()
    # Won't return the control in ever.
    

    So, in essence, yeah, there is no co existence, even for the simple scan functionality! This means if Bluetooth is imported, WLAN won't work. I have tested the Scan functionality for both but that's bad enough for my scenario.
    Any comments?

    Update:

    It seems vital to mention that from the looks of it, instantiating Bluetooth overwrites memory like this:

    from network import Bluetooh()
    ble = Bluetooth()
    BTDM CONTROLLER VERSION: 010101
    btip start
    copy .data from 4000d890 to 3ffae6e0, len 00001830
    set .bss 0x0 from 3ffb8000 to 3ffbff70, len 00007f70
    BTDM ROM VERSION 0101
    BD_ADDR: ..:..:..:..:..:..
    

    is that a right assessment?



  • @pipomolo I have faced the same issue last week. My problem was related to installed FTDI drivers. Have you tried to install FTDI drivers on your mac? if so, you need to remove one of them and leave just one acting driver live.

    You can find more info on related FTDI driver's page info: http://www.ftdichip.com/Drivers/D2XX.htm



  • @daniel Hi Daniel, i have just tried to upgrade my 3 LoPy recently received, with the latest firmware here, and after installing the PyMaker (which works with the actual version of the LoPy) and then trying with the PyCom firmware Updade software, on an iMac, connected with USB cable (and selecting the /dev/cu.Bluetooth-Incoming-Port for Serial), i face the sameproblem. Failed.
    It seems there is an issue with the serial / USB driver ?
    I have tried with a MacBookPro also, and i face the same issue.
    I use the same interface and cable to program my Arduino without issues.
    i have tried also to change the speed (9600, 19200) in the .py file related, but no luck.

    thanks for pointing me to a relevant doc or tool.



  • @brotherdust said in New firmware release 1.0.0.b1:

    One thought that occurs to me: what are other MP boards doing for BT (the BBC:micro comes to mind)? Isn't it more pythonic to not reinvent the wheel?

    The particular Nordic part used in the micro:bit didn't have enough RAM (16K) to run both MicroPython and the BLE stack so they never implemented it.

    They only support wired (!) networking and a simple proprietary radio protocol from Nordic.

    So here we have a chance to be true pioneers.



  • One thought that occurs to me: what are other MP boards doing for BT (the BBC:micro comes to mind)? Isn't it more pythonic to not reinvent the wheel?



  • @daniel
    The cb (CoreBluetooth) module in Pythonista could give some inspiration as well

    http://omz-software.com/pythonista/docs/ios/cb.html



  • @jasonriedy
    I've been keeping an eye on the implementation status of the ULP coprocesssor functions in the upstream espressif-idf repository. Espressif has been making progress on it, but it doesn't seem like it's ready yet. Pycom did mention they updated their downstream idf repo, which means the ULP functions are present in C; but I didn't see any mention of ULP functions for MicroPython yet. Likely we will see it in them in the near future.

    For those interested, I'd strongly suggest occasionally reviewing the commit log on the upstream espressif-idf. It's pretty fun to watch!

    https://github.com/espressif/esp-idf/commits/master



  • @daniel
    I suggest you take a look at CurieBLE's API as well (https://www.arduino.cc/en/Reference/CurieBLE). It's related to Intel's IoT enabled MCU you can find on Arduino/Genuino 101.
    I have used it for a BLE project and it did the job quite beautifully.



  • @daniel They're hive sensors from Broodminder. The sensor pipes up every few seconds, but we likely only need the measurements every 10-15 minutes. Assuming that dropping to low power / standby during that time can be made to work... Otherwise might just gather all the data but only send it every longish time. The actual processing is minimal. We just need to re-arrange the bytes into a packet to send of to TTN.



  • @daniel Ah, but the Pi3 sees many devices advertising in the neighborhood.



  • Reinstalling the installer app every time is a bit annoying. Is it possible to have a direct link to a firmware file on the web site? Or at least please make OTA-version, that does not require install.

    PS: I've updated the last firmware, machine.freq() is 160MHz now instead of 80. Magic :)


  • administrators

    @jasonriedy and @jmarcelino I think you both have very good ideas around what the BLE API should look like. I'd love to hear your suggestions around that. We have also been looking and bluepy for inspiration.

    Cheers,
    Daniel


  • administrators

    @jasonriedy right now the scan function only provides a list of the devices advertising in the neighborhood, so it makes sense to see only one entry in your tests. The next step (and it's what we will release soon) is to subscribe to a given device and get each of the advertisements messages that it sends.

    Cheers,
    Daniel


  • administrators

    @brotherdust @RSK thanks for the feedback. We will release the source code to github over the weekend.


  • administrators

    @pwest

    Will we get the ability to read BLE beacon advertisements w/that rev?

    Yes, you will be able to read the data from the advertisements.


  • administrators

    @jasonriedy thanks for your feedback. Receiving and sending is the next feature that will be implemented. Regarding your application... how often are your BLE sensors sending data? Every 15 minutes as well or more frequently?

    Cheers,
    Daniel



  • @jmarcelino
    Agreed 100%! BLE is not about transmitting data but more like advertising and patterns like publish/subscribe. I hope they'll implement true BLE stack the way it's supposed to be.

    I wish Pycom updates their marketing material and in their documentation suggest that not all functionalities are implemented at the moment (more like 30% is implemented now) to help firms like mine that are going to place orders for large quantities of their devices know better! It is ridiculous to buy these gorgeous boards and not be able to at least determine a release date for your product because of the firmware not being ready for prime time! Because right now when you see their marketing material it is based on promises that don't even have a definitive schedule of release! I can't believe it!



  • AVAST antivirus reports installer as malware and do not let it install. I can disable it, but it is imposing a security risk in my WIN10 desktop.



  • @daniel
    Can we have more details of the planned Bluetooth API? To be honest
    "open BLE sockets to send and receive data" doesn't sound very Bluetooth LE-like thing to do at all, a protocol focused on ultra short interactions/notifications around data attributes.

    Please don't just rush into an BLE API that'll be useless in a few weeks just to tick "BLE" feature box. It's easier/better to spend a bit of time and do a bit of planning now rather than changing an implemented mess later.


Log in to reply
 

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.