New firmware release 1.5.0.b1 and SiPy Sigfox certification completed
-
We will investigate the I2C problem and provide a fix today or tomorrow.
machine.idle() only stops the CPU until an interrupt occurs (and there are several internal interrupts, including the system tick every 1ms). The machine.idle() function is mean to be called inside a loop when you are waiting for a callback to fire.
-
This release was more focused on memory improvements.
@mohpor pleasd give me more details around the way you need the notify functionality to work on the GATT server. Thanks
Cheers,
Daniel -
Here is what we need:
-
Being able to actually
Subscribeto a Characteristic defined in a GATTS: Currently, when you try to subscribe to characteristics defined in service in GATTS, the subscription would simply fail and will report to the subscriber that it has not been subscribed. -
Get notifications from a GATTS Characteristic when the
Valueis updated, even if the notification could be sent manually. Other device's BLE Stack like Curie, Nordic, ATMEL, ... they all send the notification, if: There is a subscription on a characteristic and the value gets updated by device.
More Technically:
Service Changed characteristic present on the server
In this case, a client needs to subscribe to the server-initiated updates by writing into the corresponding CCCD enclosed within the Service Changed characteristic (see Characteristic Descriptors). This will allow the server to alert the client of any structural changes. If the client and the server are bonded as described in Security Modes and Procedures, the client can cache attribute handles across connections and expect them to remain identical. If the devices are not bonded, the client will need to perform discovery every time it reconnects to the server.from: https://www.safaribooksonline.com/library/view/getting-started-with/9781491900550/ch04.html
-
-
@daniel or @abilio
On the I2C issue:I2C is open drain and uses the GPIO_MODE_INPUT_OUTPUT_OD mode flag. This includes one bit to set open drain
#define GPIO_MODE_DEF_OD (BIT2)which is 4 (or b100)I noticed in the latest bitfield changes mode became a 2 bit field in pin_obj_t (set in esp32/mods/machpin.h)
unsigned int mode : 2;so to me it appears mode doesn't have enough bits to hold the _OD open drain bit. It should be 3 bits:
unsigned int mode : 3;I tested this change on my fork and I2C - which was behaving very erratically - is now working well again. So it could well be a very simple fix :-)
-
@jmarcelino thanks for investigating the issue. You are right. I'll apply the fix now and release a new version in a few minutes.
Cheers,
Daniel -
@daniel said in New firmware release 1.5.0.b1 and SiPy Sigfox certification completed:
We will investigate the I2C problem and provide a fix today or tomorrow.
machine.idle() only stops the CPU until an interrupt occurs (and there are several internal interrupts, including the system tick every 1ms). The machine.idle() function is mean to be called inside a loop when you are waiting for a callback to fire.
Right, then I misunderstood it completly.
-
I tested this change on my fork and I2C - which was behaving very erratically - is now working well again. So it could well be a very simple fix :-)
I wish you could make a PR to somehow break this open-source barrier we've set ahead of us and maybe encourage others to do the same!
Cheers,
M. -
@mohpor anyone can open a PR on the repo: https://github.com/pycom/pycom-micropython
and propose changes.
Anyway, this will be much easier once we merge our port with the official MicroPython repository.
Cheers,
Daniel -
@daniel
I know they can, I meant I wish he would've!Cheers,
M. -
@mohpor
There was no open issue on Github for this problem and to me changing a 2 to 3 didn't seem to warrant opening a PR so I simply brought it up on the forum, seemed to be most practical way of addressing this.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login