Avatar for JohanWinas

JohanWinas

Member since Sep 2020 • Last active Nov 2020
  • 6 conversations
  • 18 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    Sometimes one has to ask the question to realise the simple answer... It's an electricity meter I'm talking to as well, and yes the easy way is to just hard code the query :-)
    But it might be good to check the CRC on the reply.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    How did you sort out the CRC calculation??

    Thats the only part that can be a bit tricky for a simple modbus implementation, I can build the packet by hand and parse the response my self.

    I often get devices scattered all over the place that has a RS485 port with modbus, often its just a few bytes of data that I want from it. But running a hardwire etc etc to this makes it a lot of work. A small BLE device that polls data and sends it as BLE manufacture data would be perfect to just get the status and monitor the device values. WiFi is often hard to get working, and BLE actually has longer range in real life :-) Being able to reprogram the device wireless makes it just perfect.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    I'm thinking of using a MDBT42Q module to poll data from a Modbus device over RS485.

    My hardware will use the MAX13487 that implements auto tx/rx switch, I have used this in many designs before and it works just fine with modbus. So no need for TX control pin.

    I found this, https://github.com/makejs/modbusTCP-EsprĀ­uino, but cant make out if its just a clone of modbus-serial or if it's actually for Espruino.. anyone?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    As I said in my first reply, this is not an issue any more as the DFU app has found a way to work around how iOS it self and other iOS apps normally shows devices, as long as you operate the app the correct way.
    I was just a bit to quick to post a suggestion based on my previous experience, not having used the nRF-Connect app to any extent before.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    It's fine when you have several units with the same name, they have different mac addresses, like fitness devices etc etc. For normal use this is not a problem, the app will talk to the mac and not the name etc etc.

    The problem with the cache is during development and programming, if a device changes it name from the default to the production name iOS then shows the old name instead of the new name as the cache is not updated, after some time it does change over.

    The same kind of problem happens when starting new units that have the same name, as I did yesterday where all the units show up as DFUtag, but with new mac addresses one after another, within iOS it self there is no way to tell them apart and apps like LightBlue struggles with this as they try to connect by getting the mac from the cache based on the name.

    Now Nordic has managed to go around this byt doing a refresh, not stop/start of scanner or stop/start of the app, but swiping down, this makes the new device show up at the top and the icon is in a different colour the the last unit.
    Using for example the LightBlue app this is a problem, I have had units that come from the supplier with the same name for all modules, when I am done with one unit and are moving on to the next it is a hassle to get iOS to go for the new module instead of the previous.

    Somehow Nordic has found a way around this, so will have a look if they published the code for the DFU app and I can show that to our iOS developers on how to force iOS to do a refresh or how to go around the cache issue.

    Changing services have the same issues, it's cached and the cache has to expire to read the new data. To "force" this a restart of the bluetooth helps, but not always. Can be a pain during development as you don't see whats there but what was there... :-)

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    The web dfu looks very interesting, will have a look at that.

    I was a bit quick with my post, as it turns out Nordic has done something "out of the ordinary" with the app, you swipe down to refresh the list it manages to clear the cached data and shows the new device and new device names. This is something we have had issues with in other apps and with other developers. The same problem happens when a device change its name, the old name is shown for a long time in iOS as it is in the cache.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for JohanWinas

    I just ran into a funny problem.
    I need to upgrade 23 MDBT42Q modules to the latest FW, and since I have already packaged them I have no other option than to use DFU, and I use iOS...
    So since all the modules have the same name, iOS remembers the mac, so for each device I have to go into settings of iOS and turn of bluetooth, and then activate it. Or the app will try and talk to the last devices mac adress as it caches this...

    Having the module present itself with a name that includes part of the mac would solve this.

Actions