Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

pc and Mac unable to communicate with mayfly ver. 0.5b

Home Forums Mayfly Data Logger pc and Mac unable to communicate with mayfly ver. 0.5b

Viewing 20 reply threads
  • Author
    Posts
    • #16446
      DaveG
      Participant

      Hi, I inherited a mayfly ver 0.5 b from my predecessor and am trying to get it set up for deployment again.  I’ve been unable to get it to connect to either a pc or a Mac.  It is getting power from the usb connection but neither computer recognizes the unit as being connected and there doesn’t appear to be any communication between them.  I’ve tried multiple usb cables.  Last night I tried downloading drivers from scilabs for my MacBook Air and still no luck communicating.

      Thanks in advance for your time and suggestions.

      Dave

    • #16447
      fisherba
      Participant

      Hi Dave,

      Don’t kick me for this, but is the Mayfly turned on? There’s a little toggle switch near the USB jack.

      Sometimes they do get “fried” and others know the trouble-shooting steps better than I do, but I see users missing the on-off toggle a lot.

      Beth

    • #16448
      DaveG
      Participant

      Hi Beth,
      No kicking involved when folks are trying to help!
      I have tried toggling the on/off switch… no luck.
      The leds do their flashy bit to let me know that the device is alive in there somewhere – and the amber light glows brightly to show that the battery is charging – but no communication b/t pc or mac.
      Dave

    • #16449
      fisherba
      Participant

      What software are you using to connect? What are you doing to confirm that it isn’t connecting? Are you trying to upload a sketch, or are you looking at it through a serial monitor?

      Have you confirmed the com-port? A PC will number the com ports sequentially (a new port for every Mayfly you connect). A Mac will have a long string assigned to the port that will include USB somewhere in the string.

    • #16450
      DaveG
      Participant

      I’m using Arduino 1.8.19.

      I’ve tried uploading a sketch (various ones) and get a not in sync error message that repeats 10x.  Entire error message below…

      Now don’t kick me, but I don’t know what “looking at it through a serial monitor” means.  I do have it set to 57600 baud.

      the port reads as follows (on my MacBook) port:”/dev/cu.Bluetooth-incoming-Port”. serial port above that is greyed out.  I don’t see any usb options.

      thanks so much for your help and guidance!

       

      Arduino: 1.8.19 (Mac OS X), Board: “EnviroDIY Mayfly 1284p”

      Sketch uses 9492 bytes (7%) of program storage space. Maximum is 130048 bytes.
      Global variables use 832 bytes of dynamic memory.
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
      Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

      This report would have more information with
      “Show verbose output during compilation”
      option enabled in File -> Preferences.

       

    • #16451
      fisherba
      Participant

      The bluetooth port is not your mayfly.

      I did this tutorial that could get you acquainted with the serial monitor: https://envirodiy.github.io/LearnEnviroDIY/01-ArduinoBasics/index.html

      What’s uploaded on your Mayfly will determine the baud rate for the serial monitor. It looks like you haven’t uploaded anything yet, but there’s an existing sketch on the board. It’s getting power and charging (per the lights you see). The baud rate is probably slower than 57600.

       

      • #16452
        DaveG
        Participant

        Thank you.  I’ll check out the tutorial.

        There are preloaded sketches for temp, depth, turbidity, and conductivity from the board’s previous deployment.

        I set the baud rate following the instructions in the on-line mayfly manual.  I’ll go over your tutorial and let you know if that succeeded in smartening me up.

        thanks again!

    • #16453
      fisherba
      Participant

      If the existing sketch is from the EnviroDIY Modular Sensors code wrapper, the serial baud should be 115200. In the arduino IDE, connected with usb, mayfly power on, if you press the little magnifying lens at the top right corner of the window for any sketch, that will open the serial monitor. You should be prompted to manually select the port (something with USB if you are on a mac) and baudrate (115200, maybe).

      • #16454
        DaveG
        Participant

        I’m sorry, I’m not getting it to work.  It seems like I am missing something simple but I’m still just getting the same error message as before.  I tried doing the blink tutorial and it didn’t work – serial monitor didn’t show anything even when switched to 9600 baud – and still had the same error message.

        Then I followed the steps above and am still not getting prompted about selecting any port when in the serial monitor.

        who wants to do the kicking now, huh? 😉

    • #16455
      fisherba
      Participant

      Did Blink successfully upload? The mayfly can only handle one sketch at a time. The fact that your board is flashing in the ways you describe means that it is probably not fried.

      As far as I can detect, you have not yet connected to your board. The serial monitor would be a way to connect to any board and see what’s on it. There are lots of charging cables that do not convey data, so that could be an issue. Now that you have learned about the serial port, try a few different cables again to see if that’s the issue.

      You also need to have the Mayfly driver. In the Arduino IDE under Tools>Boards Manager, you need to confirm that the Mayfly is selected. (https://www.envirodiy.org/mayfly/software/)

       

    • #16458
      DaveG
      Participant

      I was not able to get Blink uploaded – even at the baud rate recommended.  I verified it but still got the same “not in sync” error message as above

      The serial monitor does not show any text but the boards manager shows Mayfly 1284p.

      I’ve tried 3 different micro usb cables and none of them have had the Mac ask for a port for the Mayfly

    • #16459
      DaveG
      Participant

      so I thought I’d try it with the micro sd card removed… then I captured the following images of the Arduino program and the serial monitor – but still no port prompt, although mayfly appears to be “seen”

    • #16462
      fisherba
      Participant

      The Mayfly doesn’t have a bluetooth radio built in, so that port is not actually the one that is connected to a Mayfly. The bluetooth port is everpresent on Macs because you have bluetooth on your computer, but the Mayfly would require an extra radio to be able to connect by bluetooth. This is not the correct port to view what’s happening on the Mayfly. The correct port will have “usb” somewhere in the string.

    • #16463
      fisherba
      Participant

      Mine looks something like this:

      • #16465
        DaveG
        Participant

        I don’t have any other ports as options to select.  The only other thing it says is “serial ports” but that is greyed out and not able to be selected.

    • #16464
      DaveG
      Participant

      Understood.  I added Arduino to programs that can open ports/get past firewall on the Mac but is still only showing the same bluetooth port info for the Mayfly.  I just did a quick search online and other folks have been having this problem too.

      Dunnoh.

    • #16466
      fisherba
      Participant

      If the usb port doesn’t exist, then the most probable cause is that the driver is not installed or not valid/current.

       

      • #16467
        DaveG
        Participant

        ok, I just downloaded Arduino yesterday.  Should I maybe try the beta version for the latest update?

        I just downloaded Arduino 2.0 and it is still only showing the bluetooth port… see image

    • #16468
      fisherba
      Participant

      Nope. The instructions here: https://www.envirodiy.org/mayfly/software/ say to not use 2.0. I don’t use the Arduino IDE for anything but getting people started. But the tutorial I sent will lead you to this Mayfly driver and through a whole set of steps that will get you up and running. It may look TLDR, but I think it will help.

      • #16472
        DaveG
        Participant

        I’ve tried unsuccessfully to download and install drivers from the tutorial – some of the links were bad and then if I could download a driver, the installation was blocked b/c extension issue.

        This is way over my head and I am so grateful for your time and help but I feel like I am just going in a circle

    • #16478
      fisherba
      Participant

      Here’s a video of the process of installing the driver:

      https://mediaspace.minnstate.edu/media/Mayfly+driver+in+Arduino+IDE/1_py60bdus

      • #16479
        DaveG
        Participant

        Thanks.  I’ve done everything the video shows already, but there is no additional port popping up when I turn on the mayfly.

    • #16481
      Shannon Hicks
      Moderator

      If your Mac isn’t seeing the Mayfly as a USB device in your computer OS list of current devices, then you need to install the FTDI drivers from the device website at https://ftdichip.com/drivers/vcp-drivers/

      Mac and Windows 10 should automatically install those drivers whenever a Mayfly is connected to a computer for the first time, but sometimes company or school security software or configurations will limit the computers from automatically installing those drivers, requiring you to do it manually.

      Once you’ve installed the VCP driver, your computer should see the Mayfly as a USB device and will assign it a COM port (or on a Mac it’ll give it a somewhat cryptic port designation as Beth showed above with the screenshot).  You shouldn’t attempt to troubleshoot communications issues with the Arduino IDE until you’ve confirmed that the computer can see the Mayfly.  And as Beth mentioned, many USB cable don’t actually contain all the proper data lines because they’re only a basic charging cable, or those pins in the connector or wires in the cable can get damaged or broken, causing there to be no communication.  I’d recommend trying a couple different cables (from different manufacturers) and different USB ports on your computer.  If none of those work, then try a different computer, if it’s still not being seen, then you might have damaged the USB cable on the Mayfly, in which case the only way to communicate with it is to buy a “CP2104 Friend” from Adafruit, solder 6-pin right angle header pins (male) to the end of it and connect it to the 6-pin FTDI socket on the Mayfly.  This bypasses the FT232RL FTDI interface chip on the Mayfly and allows you to program the board directly.

      You don’t have to add the Mayfly to the Board Manager of the Arduino IDE if you simply want to view the serial output using the Serial Monitor of the IDE.  You only have to add the Mayfly support files to Board Manager if you want to program your Mayfly.  If your Mayfly is already programmed with any of our recommended sketches, it should be printing something to the USB port on startup, and usually during whatever loop it is running.  However, if you inherited this board from someone else, there’s no way to know what sketch is on it unless the Mayfly prints that information to the Serial Monitor.  Do you know what it was previously used for?

    • #16485
      DaveG
      Participant

      Hi Shannon,

      Thanks for the info.  I downloaded the drivers at the link provided and restarted my computer but still no additional ports appear when Arduino is open and the mayfly is connected, turned on.

      I’ve ordered a new micro usb/usb-c data cable that should be arriving today.  This will let me check on 2 variables; 1) it will allow me to have a new data cable with all new pins, 2) it will allow me to bypass the apple dongle that converts the standard usb connection to a usb-c.

      Additionally, I’ll try connecting it to a pc this afternoon following the tutorials that Beth sent.  If none of these steps work, then I’ll get the “friend” from Adafruit.

      Finally, the mayfly was previously used for monitoring CTD and turbidity.  I will be using it for the same purposes, just at a different location.  The sketch should be on the Mayfly already but without accurate time/date information, the data doesn’t have much value – and I can’t correct the time and date without making a connection to the computer, correct?

      Thanks again for your time and help.

    • #16486
      Shannon Hicks
      Moderator

      If there’s a CR1220 watch battery installed in the battery slot on the Mayfly (with sufficient voltage) then the RS3231 RTC will still be alive and continuing to think it’s whatever time it thinks it is. However if the board has been sitting in storage for awhile and not attached to a main Lipo battery, it’s likely that the CR1220 is dead and therefore the RTC doesn’t retain any time information, and it will reset itself to 1/1/2000 every time the Mayfly starts up until you add a new CR1220 and set the clock.  If there’s a cellular modem on the Mayfly board, then it will attempt the contact the time server to set the RTC upon bootup (assuming you’re running one of our recommended sketches built on the ModularSensors examples we share on Github).

      If the clock is still running but is just wrong because the clock was set wrong sometime in the past, you could see what time is currently being reported, then do the math (easiest in Excel) to get the offset between the correct NOW time and the incorrect NOW time, and then apply that offset to all of the stored data on the logger’s memory card.   If your Mayfly is running one of those recommended logger sketches, then it will print a variety of helpful information to the Serial Monitor upon startup, including the date/time of the RTC, and other configuration settings of the deployment.  If you reprogram the Mayfly with another sketch before you see any of that, then it’ll be lost, so I’d recommend only trying to read the data from the Mayfly serial port until you get things going smoothly with the computer and not trying to upload any new sketches until you’re able to connect reliably and correctly to the Mayfly with the USB port on your computer.   The previous sketch is probably transmitting at either 115200 or 5600 baud.  That speed only refers to comunications through the Serial Monitor and doesn’t affect the upload speed used when burning a new sketch to the board.

      • #16496
        DaveG
        Participant

        Hi Shannon,

        I replaced the battery with a new one when I started this process of trying to revive the Mayfly.  The original battery may have still been good, but it was several years old and the unit has been sitting for a year or so – so I figured it would be best to start fresh with a new battery.

        The board doesn’t have a modem so time syncing can’t happen that way.  It isn’t a feature we’re likely to add to the Mayfly, either.

        Hopefully I’ll get this unit to connect to a pc, if not then we’ll have to go the Adafruit way.

        thanks again for your time and help.

         

        • #16731
          DaveG
          Participant

          Hi Shannon,

          We got the Adafruit adapter and sent it and the board to a local university where our intern is from to have the engineering dept. do the soldering.  A couple of issues came up.  One is that the pattern on the Adafruit adapter doesn’t match the screen printing on the board… but the bigger issue is that the artel/main chip looks like it has seriously corroded connections. So, it may not be fixable or worth fixing.  I couldn’t find an individual board available for sale.  Do you know when they may be available?  We don’t need/can’t afford a 5 pack and amazon doesn’t have single boards.  Do you have any top secret knowledge that you could share about when single boards might be available and what they would cost?

          Thanks again for your time and help.

          Dave

          Attachments:
    • #16736
      Shannon Hicks
      Moderator

      The Adafruit CP2104 Friend has the correct 6-pin layout to work perfectly with the FTDI interface header on all Mayfly versions.  The attached photo shows one connected to a Mayfly 1.0 but you can connect it to the Mayfly v0.5b the exact same way. Give that a try and see if you’re able to communicate with the Mayfly board.  If not, it’s possible the corrosion on the board is the cause of your problems.  If that’s the case, you could try cleaning the corrosion off using acetone or 91% isopropyl alcohol and an old toothbrush.  But if the corrosion caused a part on the board to be damaged when it was powered up, then it’s like unsalvageable.  The Mayfly v.05b boards have been discontinued as have the v1.0 boards, but the v1.1 boards will hopefully be listed as single items on Amazon sometime soon, but I don’t know the date yet.

      • #16737
        DaveG
        Participant

        Thanks, Shannon.

        I’ll try to clean it up a bit this afternoon but I think the corrosion is pretty bad – based on the image.

        I’ll keep an eye out on Amazon to see when the single boards become available.

        Thank you again for your time and help.

        Dave

      • #16754
        DaveG
        Participant

        It’s ALIVE!

        St. Patrick’s Day miracle…

        Chip cleaned with 91% but still a bit corroded – but Adafruit CP2104 manually attached (not soldered) and iMac picked up the com port, I adjusted baud rate until gibberish became legible.  Will have the adapter soldered together and we should have a working machine.

        Thanks so much for your time and help!

        Dave

    • #16756
      Shannon Hicks
      Moderator

      That’s great, I’m glad it worked.  Based on your screenshot, I can tell that your station is running a sketch that I programmed onto that Mayfly board in March of 2018.  It’ll still work if you’re using the same CTD and turbidity sensor it originally had on it, and it will save data to the memory card every 5 minutes.  It had the ability to transmit data to our older database system using a 2G cell modem, but those modems are no longer available and that database has been replaced with Monitor My Watershed.  The RTC clock on the Mayfly may still be correct if the CR1220 battery is still good, but it might not if the station has been in storage awhile without a main lipo battery.  That clock would have been set in 2018 to Eastern Standard Time, so it will appear to be one hour off from the current local time now.  Nowadays we program all our RTC clocks to GMT time instead, to be compatible with the MMW database.  If you end up needing to reprogram your Mayfly at some point in the future but still want to keep using that OBS3+ turbidity sensor, you’ll need the sensor’s 6 calibration coefficients from the calibration sheet that it was originally shipped with, which we still have in our records.  You can send me an email at mayfly@envirodiy.org and I can provide those numbers to you so you can put them into the new logger sketch.

      And for reference, here’s a better picture of how I soldered the right-angle header pins onto my CP2104 board.

       

      Attachments:
Viewing 20 reply threads
  • You must be logged in to reply to this topic.