Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


tripwire last won the day on May 2

tripwire had the most liked content!

About tripwire

  • Rank
    Level 2

Profile Information

  • Gender
    Not Telling
  1. Hi, I'm hoping some of you might have had experience of waterproofing sensor nodes or individual sensors, and can make suggestions. I have a project using the SensorTag to measure altitude, and need to seal it up enough that it doesn't fail after the first rain shower. It doesn't need to be completely watertight as it should never be submerged, but it needs to resist heavy and persistent rain. It can't go in a hard-shelled airtight container as that would interfere with the pressure measurements. It would probably be a bad idea to get conformal coating in the sensor port too. I'm not too sure whether conformal coating would protect the coin cell and holder adequately either. To make it even more difficult I have a wire running to an external reed switch that counts wheel revolutions, so that entry point needs sealing too. My current "plan" is to mummify it in plumber's PTFE tape and hope for the best, unless there are any better ideas out there
  2. Bitshift problem

    This is down to the subtleties of integral promotions in C. The standard says this for the bitwise shift operators: "The integral promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width in bits of the promoted left operand, the behavior is undefined." Integral promotion can "widen" a type as far as unsigned int, which is 16 bits on MSP430. The RHS of the shift is 16, so that means undefined behaviour; in this case that seems to mean (100 << 16) == 100.
  3. Program won't fit weirdness

    Either way works (char const * const is equivalent to const char * const). That cdecl site only accepts the latter, however. The const after the * is the one that makes the pointers in the array const. You could get away with omitting the first const in this case, but I tend to just use both.
  4. Compiler optimization traps for the unaware

    If anything I'd have expected: 5, 4, 1, 3, 2, 0 (sorted by key rather than value or insertion order). That's what you'd get out of a std::map in C++. The C++ standard library designers originally avoided the issue of unspecified map iteration order by only permitting ordered maps, and hash-based maps were not officially included until C++11. In terms of performance, it looks like the randomisation in go is a random start offset rather than a complete shuffling of the iteration order. That's just enough to prevent anyone from relying on the order from one iteration to the next. They might also have some random input into the hash function which would jumble the ordering between program runs. Apparently that can also be implemented to defeat hash collision DoS attacks when user-provided values are used as map keys.
  5. RANT: Cloud of this, IoT of that . . .

    Agreed. That's why I'm not delighted by the prospect of IoT-mania encouraging a proliferation of cheap internet-connected devices.
  6. RANT: Cloud of this, IoT of that . . .

    Or the person making the IoT device *DOESN'T* (Yes, this has since been patched out)
  7. RANT: Cloud of this, IoT of that . . .

    That works against remote attacks, but the linux/BSD/non-windows server protecting the wireless device can be bypassed if you're in the vicinity. Then the unsecure wireless device can be exploited to leak your wireless key (for example). The scale of that approach is greatly limited by the need to be near the target, but it means you can't assume a secure router will protect you if the devices are unsecure.
  8. RANT: Cloud of this, IoT of that . . .

    So, yeah: "Designing an internet-facing server with security protection can be a very challenging task" is fair enough. It's not so much that the original title implies the world will end if you don't attend, more that it implies the content is somehow specific to IoT when it's not. What would be nice is if someone came up with a way to deal with the security holes left in the many internet "things" abandoned by their manufacturers without ongoing firmware updates...
  9. Good news! This issue is fixed in the TI Emulators package, which contains the version firmware for XDS110. TI have added support for 2-wire cJTAG debugging, which only uses the TMS and TCK lines. In the firmware they also stopped the emulator from driving TDO, which was blocking access to the SPI. It looks like 2-wire cJTAG is the default mode now too, so debugging SPI flash code should just work like you'd expect.
  10. TI not supporting MSP-EXP430G2 on Mac or Linux?

    Except when the onboard USB hub goes out to lunch
  11. TI not supporting MSP-EXP430G2 on Mac or Linux?

    Strange. I wonder if it has anything to do with the fact that the G2 launchpad has a different emulator to all the others.
  12. Have feedback for TI? Please share here.

    This is one of my pet hates too. I find energy profiling to be an incredibly powerful debugging tool, it's like an ECG for your MCU! Unfortunately the UI in CCS has a lot of bugs and missing features that make it inconvenient to use and a lot less reliable than I'd like. I used to have a long list of requests for features that would make EnergyTrace more informative, now I just be happy with CSV export of the recorded data for offline analysis. This week I looked into using DSS scripting which does support CSV output, but the EnergyTrace DVT API is completely undocumented. I think my next step may be to forget about the EnergyTrace support in CCS and try this instead: http://forum.43oh.com/topic/9674-casio-watch-rebuild-w-msp430/#entry72969
  13. MSP432 launchpad as programmer...?

    I've done this little mod on a MSP432 launchpad so I can program the CC2650 SensorTag with it (and use energytrace too). The 1x7 0.05" headers aren't the easiest to get hold of, so I just took a standard 10-pin cortex debug cable, cut it in half and soldered it directly to J103. The connections needed are (LP -> Cortex debug connector): GND -> GNDDetect (pin 9) RST -> nRESET (pin 10) SWCLK -> SWDCLK/TCK (pin 4) SWDIO -> SWDIO/TMS (pin 2) 3V3 -> VTref (pin 1) Pin 1 is marked by the red stripe on the cable linked above. Apart from making sure to read the pin numbers the right way round, the only fiddly bit is crossing over the GND and reset wires in limited space. The ribbon enters the connector opposite the key at one end and next to it at the other. It's worth checking both halves of the cable to see which gives the best cable routing for your target board. To test you can remove the jumpers from the isolation block and set the JTAG switch to external, then connect the cable to the Ext Debug header on the launchpad and try to program the MSP432 target.
  14. I like the idea of making it compatible with the kentec touchscreen boosterpack, but stacking one of those above your board would block access to the buttons. If instead used with the onboard OLED display or headless you'd have pushbuttons immediately next to a set of upward pointing male boosterpack headers. Have you thought about using right-angle tactile switches pointing off the edges of the board? TI has just started to use them on their launchpads: http://www.ti.com/ww/en/launchpad/launchpads-connected-launchxl-cc2650.html#tabs
  15. SensorTag Altitude Logger

    Recently I took a trip to the US, which offered a good opportunity to test my altitude logger by recording a profile of the whole journey there. The trace revealed some interesting details about the flights I took, and airline operations in general. Here's the profile for the entire trip: The x-axis shows elapsed time in minutes. The altitude is shown in metres, measured relative to the start of the trace (not too far above sea level). Despite that I'll be using feet as the unit of altitude here, since that's the standard used in aviation. Because the logger calculates altitude based on air pressure, it is affected by cabin pressurisation. Instead of recording the true altitude of the aircraft it gives a trace of the effective altitude inside the cabin. The first big peak at the blue cursor is a flight from Edinburgh to London Heathrow. Comparing the cabin altitude trace against real altitude data makes it easier to pick out the main features, so here's a chart showing this flight's altitude as broadcast over ADS-B: And this is a closeup showing what my altitude logger recorded for the same flight: The cursors mark where I think the flight started and finished, based on the fact that the plane was in the air for 70 minutes. From takeoff the pressure falls steadily until the effective altitude in the cabin is about 7000ft, at which point the aircraft is actually at 37000ft. After cruising there for 12 minutes the plane descends and cabin pressure steadily increases. The cabin pressure reaches ground level before the plane actually lands, so the trace stays flat for the next 12 minutes. In fact, this section of the trace is effectively below ground level while the plane approaches landing. The plane's environmental control system has deliberately overshot and pressurised the cabin to higher than ambient pressure at the destination. At the orange cursor marking the end of the flight you can see a slight increase in altitude. This is when the flight is over and the controller opens the pressurisation valve to equalise with the external air pressure. It seems this extra pressurisation is done before takeoff and landing to help the system maintain a steady pressure. There's a detailed explanation of the reasons for this here: http://aviation.stackexchange.com/questions/16796/why-is-cabin-pressure-increased-above-ambient-pressure-on-the-ground Now on to the second flight, which was from Heathrow to Dallas Fort Worth. First the ADS-B trace: And the altitude logger's version of events: Again, the cursors mark the start and end of the flight and line up with the reported duration. The "steps" along the top of the trace match up with changes in cruise altitude from 32000?>34000?>36000ft. Maximum effective cabin altitude is about 5500ft, lower than the first flight even when the lower cruise altitude is taken into account. I think that's down to the use of a newer 777 on the international flight compared to the A319 on the domestic route. Modern planes are increasingly designed to offer lower effective cabin altitudes for passenger comfort. The stepped flight profile is used to maximise fuel efficiency. Flying higher reduces losses to air resistance, but early in the flight the aircraft is heavy with fuel and climbing is expensive. As the fuel is burned off the optimal cruise altitude increases, so ideally the plane would climb to match. In fact the plane can't climb gradually because modern air traffic control regulations restrict aircraft to set flight levels. The best option under these restrictions is to perform a "step climb" up to a higher level when it's more fuel-efficient than the current one. The flight levels are multiples of 2000ft for flights from the UK to the US, which is why the steps are 32000->34000?>36000ft. Wrapping up, one of the things I hoped to test by recording this journey was high rates of altitude change. The altitude logger can currently handle rates of change up to