Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cant read my irange 4+ module #2

Closed
jims1234 opened this issue Apr 27, 2021 · 31 comments
Closed

I cant read my irange 4+ module #2

jims1234 opened this issue Apr 27, 2021 · 31 comments

Comments

@jims1234
Copy link

I'm using flashmulti version 6.1
have tried multiple USB ports on two Win10 PC's and have two other MPM's that work Ok with my cable and I can Read/write the mpm firmware in them both. However, on my primary iRangeX 4+ module which has 20 planes bound to it.. I can't read the global ID yet as I update drivers, then update the bootloader using the DFU device which shows up Ok in Device manager.. I get a "done" message suggesting success.. after each attempt, with no error but then I can't get past this...

I keep seeing :

DFU Recovery Fail and then
Filter on vendor = 0x1eaf product = 0x0003
Opening DFU capable USB device... ID 1eaf:0003
Run-time device DFU version 0110
Found DFU: [1eaf:0003] devnum=0, cfg=1, intf=0, alt=2, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Cannot set alternate interface

I have posted several screen dumps of the verbose sessions in Pascal's DIY MPM thread on RCgroups .com

all I need is to read the global ID from this module.

I've tried it many times with the USB-A to mini USB cable to a module IN a RM TS16S Radio that is turned OFF, as well as with the module alone on the end of my cable... If I need to get a TTS Serial to USB adapter, and solder the header and try again that way I will but do you think that might work?

@benlye
Copy link
Owner

benlye commented Apr 27, 2021

The only time I've seen a message like that is with a bad USB hub. Given that you've tried multiple PCs and cables I think you probably have a bad USB port on the module

Soldering the serial header pins on and using a USB-to-serial adapter will almost certainly work and should get you what you need.

@jims1234
Copy link
Author

jims1234 commented Apr 28, 2021 via email

@jims1234
Copy link
Author

jims1234 commented Apr 28, 2021 via email

@benlye
Copy link
Owner

benlye commented Apr 28, 2021

FT232RL-based adapters can be variable as there are quite a few fakes. I tend to prefer CP2102-based devices, like this one:
https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8/

The easiest way to flash it is to use the 3V3 connection from the USB-to-serial adapter to power the module, then you don't need to have it powered up in the radio.

You will also need a couple of jumpers so that you can put the module into BOOT0 mode for flashing.

@jims1234
Copy link
Author

jims1234 commented Apr 28, 2021 via email

@benlye
Copy link
Owner

benlye commented Apr 29, 2021

  1. Can I try to Read it with FlashMulti 6.1 once I connect the iRangeX to my PC?

Yes.

  1. Can I do this OUTSIDE of my Txmitter with this IRX4 Plus module connected via the CP2102 adapter and jumpered to the pins in the top left?

Yes.

  1. If so does the iRangeX need the USB Adapter to be in the +5.0 or the +3.3 position to get power? And Once powered will GRN LED be ON constantly?

You must use 3.3V. Using 5V will destroy the module. The green LED should be on and the red LED should be off. If the red LED comes on then the BOOT0 jumpers are in the wrong position.

  1. At any point do I need to press the “ Bind “ button on the outside back of the module?

No

  1. I assume it is a Serial Interface (not PPM)

Yes, it's serial.

  1. And should be programmed with the Yellow rotatable Switch in it’s normal “0” position.

It shouldn't matter, but yes, keep it at 0 so that if the module starts up there is no chance it will start transmitting.

  1. Should I also:
    Bridge the BOOT0 pin to the adjacent 3.3V pin as shown by the yellow jumper. If it doesn't work move the jumper to bridge the two left hand pins (BOOT0 and directly above).

Yes, you must bridge the BOOT0 pins. I have had most success using two jumpers, placed on the two left-most pairs of pins in the 6-pin block, like this ||:

@jims1234
Copy link
Author

jims1234 commented Apr 29, 2021 via email

@jims1234
Copy link
Author

jims1234 commented Apr 30, 2021 via email

@jims1234
Copy link
Author

jims1234 commented Apr 30, 2021 via email

@benlye
Copy link
Owner

benlye commented Apr 30, 2021

I was wrong about the LEDs - when wired correctly for flashing neither LED will not come on at all.

I have an iRangeX IRX4. It's like yours but does not come with the bind button or LEDs. I soldered two LEDs and a USB port onto my module. It's the same PCB though.

The connections on the 4-pin header should be (top to bottom):
GND
TX
RX
Vin

If you wire it up and only put a jumper on the middle pair of pins in the six-pin block (labelled 3V3) the module should power up and boot normally - green LED on and red LED flashing. If you power it off, add the jumper to the left-most pins, then power it on, the module will be in BOOT0 mode with no LEDs on.

If you're sending pictures, they're not coming through. Can you try adding them in Git directly (rather than replying to the email),

Here are some pictures of my wiring. When connected like this I had no trouble reading the module.
IMG_20210430_073908 (Medium)
IMG_20210430_073936 (Medium)
IMG_20210430_073941 (Medium)
IMG_20210430_073952 (Medium)

@jims1234
Copy link
Author

jims1234 commented Apr 30, 2021 via email

@jims1234
Copy link
Author

jims1234 commented Apr 30, 2021 via email

@jims1234
Copy link
Author

Ben,
I'm getting pretty frustrated now since I kept failing to Read and/or install drivers with my primary module and decided I should try it with a DIFFERENT IRANGEX 4Plus module that Did once work and that I was able to Read the global Id and to flash it with a pre-compiled firmware update.. but now with either the USB to Serial adapter wired per your photos, and with that removed and a normal USB-A to micro cable, using either my laptop or my normal Win 10 PC I can't access the module any more.. Win10 sees it as a MAPPLE DFU device on the port , I refresh and see it as a DFU Device in FlashMini 6.1 then try to read it and it can't attach to it and When I run thru the Install Drivers sequence again I never get the RED LED to stay OFF.. it just blinks every 1/2 second..with GRN Constantly ON.
This is ridiculous.. now both basically are doing the same thing on two different Pc's either with the straight USB cable or the the USB Serial adapter.. I don't know what to do next .. I tried with the BOOT0 jumper in either position and or both.. and re-installed FlashMulti.. here is a screengrab of the error:

new error w previously working module

@benlye
Copy link
Owner

benlye commented Apr 30, 2021

Ah. From the screenshot I can tell that you have the wrong DFU drivers installed.

Instructions for fixing them are here:
https://github.com/benlye/flash-multi/blob/master/doc/Troubleshooting.md#re-installing-the-maple-dfu-device-drivers

I think you should use the second approach and replace the driver with Zadig.

@jims1234
Copy link
Author

jims1234 commented Apr 30, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 1, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 1, 2021

Using my previously working "spare" on a new USB cable and my Win10 PC, I went thru Option 1 at the link you just provided and it failed again..so I tried to replace the Mapple driver using Zadig Option 2 and that did change the Windows 10 dirver I see in Device manager to a Multiprotocol type but I still cant read the module so I looked down further and saw where you're asked to go to a cmd prompt and run flashmulti from C:\Program Files (x86) .. my Flash multi was NOT installed there so I re-installed it there and re-ran it from that directory.. Tried to Read the module there .. no luck, tried to re-install the Module's USB drivers and Bootloader there and that did not work either..I have been unplugging the module from the USB cable after each step and re-plugging it back in.. I never so see the state required with a GRN LED On and RED Off.. mine always flashes the RED LED at a slow .5 sec ON/OFF rate.. I can send lots of screen dumps showing the result of each step is you want them.. do you? but this last called "Nope" shows it's current state.. I also added a display of a USB Port logger at the bottom.. What next? I have a 4th module on order and haven't messed with the third one at all... its a Jumper JP4IN1SE..
Nope

@jims1234
Copy link
Author

jims1234 commented May 2, 2021

Ben,
you're off doing more important things.. but I just wanted to recap where this effort stands.. I've got two of these iRangeX 4 Plus MPM Modules and a JP4IN1 SE. The one I call my Primary works operationally ON -AIR but I can't use with FrSky Rx's since ever since I updated it last about 3 months ago I get a Trainer Signal Lost / Trainer signal recovered" audible cycling about every 5 seconds yet the Wireless signal is fine, and so I want to swap it out to try to fix that.. It has about 20 models bound to it so I need that global ID in it but have now tried a Desktop and Laptop with slightly different versions of Windows10 64 bit Pro s/w and driver sets in them. I've tried reading both irange 4plus modules, a new USB cable, re-installing using Zadig 3.5 and got a Successful notice and see a new MultiModuleDFU Bootloader notice you see immediately above here.. But I still can't use flashmulti 6.1 to read either module on either PC with either cable. I have tried using USB serial adapter in line with the Primary module too but not lately.. should I hook it back up to my Spare irange and try with that thing instead of the USB cable? I have another iRangeX 4Plus on order but it'll be a week+ from banggood minimum. I have the JP4IN1 SE as well but it has a RED LED that never comes on..I should probably return it. Conversely with the two iRAnge 4Plus units I know I need to enter a state which I haven't seen in a month where the GRN LED is constantly ON and the RED is OFF but none of my MPMs enter this state.. One odd thing i noticed is that one of them has a male pin on the antenna connector mounted in the module, and the other irange has a female.. but this has nothing to do with reading that global ID.
Should I try reading that ID again on the JP4IN1 SE.. it, and the SPARE iRANGE4Plus did both read and write a precompiled firmware image before I started, but the iRanges are both useless to me now ( except I still fly with the primary all the time) and I'm hoping that once the new Irange4 plus comes In that it's got a compatible bootloader installed in it and that I can use it, if need be by rebinding all my receivers to it.. as long as I can read it's global Id and write a compiled image to it I feel it's safe to proceed.. and I'll get a 5th one as a spare. I'm sorry for this big hassle.

@benlye
Copy link
Owner

benlye commented May 4, 2021

I'm running out of ideas and really not sure why this isn't working. Something on your system is stopping the tools from talking to your module.

For reference, this is what the output should look like:

Filter on vendor = 0x1eaf product = 0x0003
Opening DFU capable USB device... ID 1eaf:0003
Run-time device DFU version 0110
Found DFU: [1eaf:0003] devnum=0, cfg=1, intf=0, alt=2, name="STM32duino bootloader v1.0  Upload to Flash 0x8002000"
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...

See how the 'name=' line in mine says name="STM32duino bootloader v1.0 Upload to Flash 0x8002000" but yours says name="UNDEFINED"? This means something is stopping the flashing tools communicating properly with the module.

Possible causes:

  • Wrong driver (but you have the libusbk driver now, so that shouldn't be it)
  • libusb DLL version
  • Antivirus software
  • Cables, ports, USB hub
  • Something else

Do you have the module plugged directly in to your computer or via a USB hub? If via a hub, try plugging in directly. Can you double check that all the files are being extracted from the .zip file archive? You should have files named libusb0.dll and libusb-1.0.dll in the \tools folder. Can you try disabling any antivirus software you have?

Your JP4IN1 module works completely differently from a PC interface point of view, and you should be to read that as it uses a different tool (it's like using the USB-to-serial adapter).

@jims1234
Copy link
Author

jims1234 commented May 4, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 5, 2021

Ben, After seeing both my PCs fail with it....I had a chance to take my "SPARE" IrangeX 4 PLUS over to someone's house with a 3rd PC and altho initially it failed too.. I was able to get the correct Win10 "Multiprotocol" USB driver onto it and try to update the module USB drivers again and that failed too except this time I figured what the hell.. and at the point it said I did not plug in the module fast enough ( right after the prior step where it says to wait until the RED LED goes out..( and mine never does) I tried it again and unplugged it anyway.. It failed with a warning " do not unplug the module" but this time when I plugged it back in, and it showed me an option to "Reset" the thing. I noticed BOTH LED's were Off ( something I never see) and as I tried reinstalling the USB Module drivers again...I'll be darned.. it worked.. I could then read and see the global ID and would have re-installed a precompiled binary too except it already had the latest version..

I brought this now working "Spare" module back home and I was shocked to see I could still read it Ok on my main PC but... NOT on my laptop,, I tried to reprogram it but it failed and it now sees a Yellow sticky error in the laptops Win10Dev Manager under the libsyn..

I then switched to the Primary IRX 4+ Module and found I can't read it with either PC .. so I plan to wait till the brand new second SPARE arrives, ( sadly Expected delivery date is: 2021-05-26) make sure I can read and write to it OK then compile a custom DIY version with a new unique global ID.. and make both SPARE module's firmware match 100%, then bite the bullet and start the long process of rebinding all my planes to a new Primary with a duplicated global ID in it since I can't get my current one to read at all.

I saved screen dumps of the entire process if you want to see them.. do you?

@jims1234
Copy link
Author

jims1234 commented May 11, 2021 via email

@jims1234
Copy link
Author

Ben,
I moved to the laptop ( which does appear to work with FlashMulti 6.1 now) and updated the IDE to the latest rev as well as loaded the STM 4 in 1 with the Boards manager and was able to re-download the STM Source file, open the _Config.h file and tweak the the Global ID with a new and different Global ID. This ID and all the modules do appear to me to compile correctly, and I appear to be able to connect the module and "UPLOAD it into either of the two spare modules I have but when I re-read either of them .. the Global ID is NOT changed.

I also tried to export the .bin file from the compilation and I tried to use FlashMulti to write it instead and I can Write to the module, it says it's successful, but when I write the .bin file that is the compiled output of the MPM source code with my different/modified global ID and re-read it back.. I find that it's not changing from what it's always been from the factory..

So:
1.) either my compiled output is incorrect and never picking up the uncommented FORCE Global ID Definition line or
2.) the IDE Upload is not Uploading it into the module(s) properly, or
3.) If I am creating a good .bin file and see Write Successful in FlashMulti.. the .bin file is not actually updating the global ID for some TBD reason..
or there is something else I am missing.. What do you think it is?

As I use the IDE to Upload I do see an "UNrecognized USB device error " but am not sure if this is "normal" I see a row of progress hashmarks that looks like it's writing OK, and a "Done" notice..
As I use Flash Multi after using the module with as a COM port with the IDE I do need to Update the Drivers each time to get the DFU Device drivers set up on both sides before I can either Read or Write to either module.. but it too says it's successful when either reading or writing.. This stuff is so frustrating to be so near yet so far after coming this far...

Any thoughts?
jimS

@benlye
Copy link
Owner

benlye commented May 12, 2021

When you read the module using Flash Multi it will only ever tell you the global ID which is stored in the EEPROM (which is based on the unique ID of the STM32 chip), it will never tell you one which you have specified in the config file as an override - there's no way to pull that out of the firmware image file, and it's not stored in the EEPROM.

If you have compiled firmware with a hardcoded ID and written that firmware to the modules you should be all set.

@jims1234
Copy link
Author

jims1234 commented May 12, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 12, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 12, 2021 via email

@jims1234
Copy link
Author

jims1234 commented May 13, 2021

Ben,
Yes I now understand I’ll only ever read the hard coded ID and I can’t change that,, yes..

But what I’d like you to please confirm is this .. if I put in that Identical EEPROM Global ID from my Primary module into the Force Global ID field of the current source codes _Config.h uncomment, recompile then export that .bin file then write it into my three iRange Plus modules, will they all work without any need to re-bind the Receivers in my planes? that has been the goal I’ve been seeking all along .. is that also your definition of being “all set.” If so I’d dearly love to end this saga and will try it right away.

@jims1234
Copy link
Author

Ben,
nevermind,, I tried it and it worked so I now have three iRAngeX 4Plus modules all flashed with the original Global ID and that all work with the latest x.x.x.77 version without re-binding my planes. Thanks so much for your patience and assist thru this ordeal.. I've never figured out why the drivers were installed correctly on BOTH the desktop PC and the Module side but something is blocking the READ in that PC even after successful "Done" driver installations.. but I'm sure glad it worked out and thank you again for walking me thru it.. Please feel free to close the issue.. There were several lessons learned but even tho the documentation was lacking or ambiguous in some specific areas.. I'm VERY relieved that this saga is over.. please feel free to close the issue.

@jims1234
Copy link
Author

I'm going to close this issue that turned out to be in my environment Windows Desktop PC.. not sure why I had such a big problem with it and at times with my 2 alternate PC's but it finally worked and I appreciate the help Ben gave me in testing it.

@jims1234
Copy link
Author

jims1234 commented May 27, 2021

The only thing I wish was documented was a photo of my type of iRAngeX 4 Plus module, and a step by step procedure that shows what to expect theFlashMulti 6.1 will show a user along the way , seems like it had to update the Windows 10 and then the module drivers multiple times and as the module is switched in and out of different modes it's very hard to tell what's going wrong if there is any issue. I now suspect some s/w or driver was blocking FlashMulti from performing but I never did find what it was .. Switching to an alternate to my backup PC for the 4th time finally started it working yet prior to that nothing worked and using a serial TTL to USB adapter and it's drivers did not help either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants