Connect with us

Need Advice: Software to Read an IC

Discussion in 'Microcontrollers, Programming and IoT' started by MrElectroncisMan, Aug 2, 2016.

Scroll to continue with content
  1. MrElectroncisMan

    MrElectroncisMan

    5
    0
    Aug 2, 2016
    I am looking for a free software I can use to read the program off an IC in a board I have. The chip is a Nuvoton M0516 and I am using a ST-Link V2 to connect with it. The ST-Link seems to communicate with the chip, but I have only been able to do a blank check, as the software does not have a read function.

    My problem: I purchased 5 web relay boards from SainSmart and although I can change their IP address via web interface, they all have the same MAC address. My understanding is that it is assigned in the program on the Nuvoton (as opposed to hard coded into the ENC 28j60 chip by the manufacturer as would be typical with a NIC). It seems the vendor simply cloned the boards rather than adjusting the MAC for each copy.

    My Goal: To read the program off one of the boards, try to figure out where the MAC address is coded (I suspect a monumental task in itself) and then to modify the address on four of the boards so I can use them all on the same network without issues.

    Steps Taken:
    -Worked with vendor support to no avail.
    -Scoured the internet for help and suggestions, including posts on numerous forums.
    -Reviewed a youtube vid about burning in new IP addresses to a different version of this board, but it does not seem to apply and is done through an arduino.
    -Sent comments to various buyers via Amazon who had expressed similar concerns
    -Tried a number of ic programming software packages that I could find via google searches, but they were either too proprietary (ether for the IC or for the ST-Link, or both) or I could not figure out how to use them (OpenOCD) since I am highly inexperienced.
    --Nuvoton
    --Keil
    --ST-Link (although I can't remember the name at this moment)
    --Various others over the past couple of weeks... too many to recall.

    All suggestions are welcomed. Thank you.
     
  2. Alec_t

    Alec_t

    2,928
    798
    Jul 7, 2015
    Welcome to EP!
    Sorry I can't suggest any software, but I'm curious as to how, even if you could read bytes from the IC, you would go about finding which ones define the address/data/program? Any internal program is proprietary and likely to be encrypted or otherwise protected.
     
  3. MrElectroncisMan

    MrElectroncisMan

    5
    0
    Aug 2, 2016
    Luck and a prayer mostly. Assuming the security bit isn't on and I can get to the code, I assume it will be in hex format. My hope is that by searching for the MAC address bits in hex, I might find a pattern of hex that translates to the MAC.

    Beyond that, I have no real plan. I know it is a long shot. And clearly, I am not a programmer. If I were, I would just rewrite the entire code and reprogram the board with my own code. It's an option for me to consider, but would rely on the good will of others, since it is beyond my capacity.
     
  4. Fish4Fun

    Fish4Fun So long, and Thanks for all the Fish!

    464
    105
    Aug 27, 2013
    Hey MrElectronicsMan, Welcome to EP!

    Maybe it would be best to explain your ultimate goal....a quick ebay search shows two sainsmart ethernet relay modules an 8ch and a 16ch.....how many relays do you need? It APPEARS the ethernet portion of the product simply "plugs-into" a standard 8/16 channel relay board....this would allow "desoldering" one of the ethernet boards from the relay-board and (in the "16 channel module") would in theory allow you to directly address 2^16 (65536) relays with the addition of "Address Latching Hardware Interfaces" from a single ethernet unit....then again, there are a myriad of "home automation" products available that might be easier to implement....There are several other approaches that might work depending on what you are ultimately trying to achieve.....In any case, attempting to change the MAC address of a device without a priori knowledge about the device is a prodigious task.....Likely best to let the forum suggest the best way to achieve your ultimate goal rather than focus on a project with so few prospects for success.....

    Good Luck!

    Fish
     
  5. MrElectroncisMan

    MrElectroncisMan

    5
    0
    Aug 2, 2016
    Fish, Thanks for the input. You are most definitely correct that there are better solutions for what I am trying to accomplish. This really started out as a hobby project (and still is for that matter).

    My ultimate goal is to place four, or five of these boards in different places in my house to control simple lighting fixtures and such. I am only using the network attachment side of the boards, and not the relay units. The reality is, although each board can control 16 channels, I will likely use only 1 to 3 on each board. The intent was/is to use my existing network in the home so I don't have to run a bunch of signal wires from a single, centrally located board to all over the house.

    I build my own relays and simply control them from the control signal generated by the web-server boards.

    This was supposed to be a relatively simple, fun project to help me learn html coding as I wrote a webpage to control the boards so I could do it from my phone. I also dabbled with using the Amazon Dash buttons and some widely publicized hacks as well.

    All fun stuff and working well. The easy part was supposed to be buying these boards (which I got an insanely cheap deal on) and using them as a quick solution to network connectivity. (In days gone by I had worked with a friend who developed a light control system which used midi signals transmitted via 485 protocol. It was great fun for holiday lighting, but not practical for more "residential" uses.) But, that knowledge resource is no longer available to me.

    I'm wondering if it is more practical to seek advice about blanking the boards and reprograming them. The main goal there being to have a network connected relay server that I can control via http, or similar commands over my existing home network. (Again, a task which is quite daunting to me, since I have no programming background beyond changing a few variables in a well-commented ASM file and compiling it to a chip.) I never really know how much to ask for/expect from a community forum, since they are a group of enthusiasts volunteering their help. I have so little to offer in return, it makes me feel like a leach.

    Thanks again for comments and offerings.
     
  6. Fish4Fun

    Fish4Fun So long, and Thanks for all the Fish!

    464
    105
    Aug 27, 2013
    Hey MrElectronicsMan!

    K, I was pretty certain this was a "home automation" project.....and the fact that you "don't need the relays" **could** make things easier....

    In all projects there are several considerations that determine viability, namely: 1) Cost 2) Effort 3) Perceived Value of the result.....

    Obviously one solution would be to run signal cables from a single unit to all the various locations.....that seriously violates #1, #2 & #3, so it is pretty much a non-starter....

    Another Solution would be to use one of the modules you have now and find some "Remote Controlled Relays" (~$2 each on ebay) and then modify the remotes so that they were controlled by the board you already have on hand....I think this approach would violate #2.....regardless, I think it would be a real PiTa....LoL

    Then there is the solution of scrapping what you have and going with something like these:

    http://www.ebay.com/itm/ESP8266-220...528261?hash=item2ef090f885:g:ZSgAAOSw-4BXYUN3

    ....This last solution is based on the ESP8266 WiFi module.....there are several "stand-alone" Home Automation variants available on ebay....I haven't personally used any of them, but **in theory** they look like they would do what you want right out of the e-packet from china....

    OR you might consider ordering one of the ESP8266 based solutions above AND a few of the bare bones ESP8266 modules:

    http://www.ebay.com/itm/ESP8266-Ser...818992?hash=item1c5e475b30:g:c6QAAOSwSdZWb4Qg

    @ < $2.50 each they offer a lot of potential functionality.....They can obviously be configured to operate in "stand-alone-mode", but would likely require a bit of research to DIY them as such....The good news is that there is a lot of information about them already on the net, and very active ongoing development in the general open source community AND in the Arduino Community....so even if you can't find a "simple" solution immediately, it is quite likely that one that will meet your needs is under development.....With the latest UnO R3 variants available for ~$2.60 each and "Wall-Wart" type USB power supplies cheap and readily available....if you found an existing "Sketch" .....a DIY Solution could cost as little as $8 + Relays/station....It would also be fairly trivial to add environmental sensors and other functions at various stations without dramatically altering the per station cost.

    If the ESP8266 modules peak your interest, you might start your research here:

    http://rayshobby.net/first-impression-on-the-esp8266-serial-to-wifi-module/

    Good Luck!

    Fish
     
  7. MrElectroncisMan

    MrElectroncisMan

    5
    0
    Aug 2, 2016
    Fish,
    Thanks for the pointers. I will have to check out the wifi modules you've suggested. My fear is, that it will turn out that they are all mass produced with the same hard-coded addresses as well. I did a bit of research and found that there are some USB boards out there that are all coded the same and two can't be connected to the same computer. That, combined with my experience with the web-server relays, makes me think that all of these cheap DIY boards, no matter what the form factor, will just not work.

    Most likely, I will buy two of the wifi units, and at worst, only use one. Then give up on the project. It's just not important enough to invest in a more professional set up. ...Just a fun project gone bad.

    Thanks to everyone for the help.
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,477
    2,820
    Jan 21, 2010
    The esp boards work fine.

    I've seen a project with a stack of them connected all at once.
     
  9. MrElectroncisMan

    MrElectroncisMan

    5
    0
    Aug 2, 2016
    Cool. Placing my order today. Thanks.
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,477
    2,820
    Jan 21, 2010
    Depending on what you order, you should look at a breakout board because their pins (or pads) do not have 0.1 inch spacing.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-