Shop OBEX P1 Docs P2 Docs Learn Events
P2 WX WiFi SIP — Parallax Forums

P2 WX WiFi SIP

In my new P2 setup, plugged in the WiFi SIP. When I do a compile & run, flexbasic, it shows "ERROR: Download failed ". Yes, I selected the correct port, am I missing something very obvious?

Ray

Comments

  • Maybe the setting for reset pin? DTR Vs CTS? As the sip header doesn't have the DTR signal as I recall.

    Don't know if flex handles that automatically.

  • Also remember to remove the Parallax plug as the two will fight.

    Mike

  • I removed the "Parallax plug", and I am still getting "ERROR: Download failed ". When I have the "Parallax plug" plugged into the RPi and select USB0 , it downloads and runs the program. Flexprop finds the WiFi SIP, but it does not download. Not sure what is going, is this a hardware or a software problem.

    Ray

  • Try logging into the wx module gui, and set the reset pin to CTS.

    Also make sure you have CTS connected to reset of course, and also tx Rx the right way around. Really is as simple as that. No other hidden things.

    About the GUI setting, flex might do that for you, if the setting exists in flexprop somewhere.

  • Thanks, I was kind of hoping for a plug & play, getting to old to be playing around like that. Probably, I would short something out in the process; I am trying to minimize losing control of my nickles & dimes.

    Ray

  • I think the load baud rate for download also has to be set 230400.

    Mike

  • It should be plug and play with the adapter board. Send us a picture of your WiFi setup.

    Mike

  • I may be mistaken, but I think the WiFi SIP is set for 115200 baud. I checked what flexprop set the baud, it is 230400. I guess I have to check and see what the WiFi SIP baud is set at.

    Ray

  • I tried changing dtr to cts on the WiFi SIP, that did not make a difference. I have the SIP adapter plugged into the 62 63 bank on the P2 edge adapter. I do not know what to try next.

    Ray

    This what the FlexProp ANSI Terminal displays:

    Opening file '/home/pi/programs/flexbasic/m2_sta/m2_sta.binary'                 
    Downloading file to port 192.168.35.121                                         
    ERROR: Download failed                                                          
    
    
  • That should be correct, but the Prop Plug must not be installed on the board. It will hold the Reset pin.

    Mike

  • I tried it both ways, Prop Plug installed, and uninstalled. I still got the download failed.

    I have the small P2 edge adapter also. I tried the WiFi SIP adapter on that, and that also shows download failed.

    I think I remember Eric mentioning, back eight months ago, that the WiFi thingy for the p2 was not functional. May be it never got updated.

    The other thing that I noticed is that all of the P2 programs in the samples folder are for the original P2 board, and not the P2 edge. Not sure if that would make a difference.

    Ray

  • I use my own custom loader so I gave the Propflex a try.

    Worked just fine.
    Here is my setup, I use a custom board to interface my ESP8266 unit.

    Mike

  • VonSzarvasVonSzarvas Posts: 3,486
    edited 2023-11-30 15:20

    @Rsadeika said:
    I tried it both ways, Prop Plug installed, and uninstalled. I still got the download failed.

    I have the small P2 edge adapter also. I tried the WiFi SIP adapter on that, and that also shows download failed.

    I think I remember Eric mentioning, back eight months ago, that the WiFi thingy for the p2 was not functional. May be it never got updated.

    The other thing that I noticed is that all of the P2 programs in the samples folder are for the original P2 board, and not the P2 edge. Not sure if that would make a difference.

    Ray

    In case you didn't already, and the flexprop docs don't explain how to use with WiFi, then maybe reach out to @ersmith in-case he has any insight about how using FlexProp for wireless programming is supposed to work. Also try Parallax tech support if they can help with the step-by-step of hardware setup.

    Using the WiFi module to program your boards is not complicated, and I feel sure the solution is a very simple missing step that we can't "see" from these forum posts. Whereas support might be able to jump on a zoom call with you, and with video sight work over the steps to get things working for you.

    As @iSeries has shown with the dip adapter, the programming setup is rather simple and certainly works reliably.
    Like you, I also use the sip adapter regularly with P2 Edge and FLiP projects and never have the issues you are facing; something with your setup doesn't quite make sense, probably just the smallest thing like a missing common-GND or CTS wire, or TX/RX reversed, or something in the software settings.

    BTW, the only things I change from default settings are the CTS to DTR reset signal, depending on which uC I am using (CTS for P2, DTR for FLiP). I always keep the default baud setting of 115200, although it can run faster if you wanted. It was a long time ago, but seem to recall testing up to 2MBaud, which was OK with a limited test and probably a small code file size. Though I'd always advise to keep defaults to get started.

  • One other thought.....

    Although you get the message "Download Failed", can you determine if the code had successfully downloaded ?
    Maybe download a simple LED flasher to eeprom memory, and then power cycle the P2 Edge after a failed download and see if the LEDs are flashing.

    Another test, try adding a reasonable delay as the very first instruction in your code - maybe "pause for 5 seconds".
    Then try downloading the code again and see if you still get Download Failed. (With this test, a certain result would determine if you have a specific issue. It is not necessary to keep the pause after the test. Just let us know if that appears to solve your issue).

  • RsadeikaRsadeika Posts: 3,837
    edited 2023-11-30 15:24

    Thanks Mike for testing out your setup with flexprop. To bad you do not have a setup with a WiFi SIP.

    I have an Activity Board WX with a WiFi WX DIP plugged in. With SimpleIDE, it has no problem using the WiFi, for downloading and running programs. Today I am going to try using flexprop to download and run a simple program.

    In the past, I have tried using a FLiP and WiFi SIP, with mixed results. Not saying that their is a problem with the WiFi SIP, but I am having difficulties using the WiFi SIP. The WiFi SIP modules seem to die very rapidly when I start to use them.

    I will do some more testing today, but I am starting to get discouraged with using WiFi. For me, if the P2 Edge had a Lan connection, that would solve a lot of problems, I think.

    Ray

  • I tried a real dumb experiment, using SimpleIDE, and using the ip address for the P2, I tried downloading a program. Below is the result.

    It seems that SimpleIDE found the ip address, but could not find a P1, which makes sense, since it is a P2. Not sure what this proves.

    I also tried, with flexprop, putting in a five second pause at the start of the program, that did not solve the issue.

    Opening file 'cmm/solsta_telnet.elf'
    ERROR: Propeller not found on 192.168.35.121
    ERROR: Download failed: -1
    
  • @Rsadeika said:
    I also tried, with flexprop, putting in a five second pause at the start of the program, that did not solve the issue.

    Thanks for trying that. OK, it's not the issue I was thinking about.

    It's not really obvious where the problem lies unfortunately. But if you keep experimenting, surely you'll figure it out.

    Is there a step-by-step guide on how to use the WiFi module with P1 and P2 somewhere? Feels like that would be handy in your situation. Maybe there are details in the forum somewhere.
    Do the Flexprop docs include any instructions on what's needed for WiFi programming when using the SIP module ? (There might not be docs, or maybe only to Patreon subscribers- not sure about that).

    Perhaps try techsupport if you are still unable to find the answers you need.

  • In my opinion, Eric is very terse, in his documentation, which I totally understand.

    Another experiment. I used flexprop, in the compile & run on P1 mode, for a simple program. When I chose the Activity board ip address, it downloaded and ran the program, no issues. I also used the same program, but chose the P2 address and got the following:

    Opening file '/home/pi/programs/flexbasic/test_p1_wifi/test_p1_wifi.binary'     
    ERROR: Communication lost                                                       
    ERROR: Download failed 
    

    What is interesting is it shows "Communication lost ", so it seems like there might be an issue with the WiFi SIP module. I am not sure what to look for next.

    Ray

  • dgatelydgately Posts: 1,631
    edited 2023-11-30 19:26

    Testing this with the WiFi modules (I tested several) set to 230400, I also get failure when loading a binary from flexprop (v6.6.1). However, I am able to use the P2 Drag/Drop Loader webpage to drop the binary, without issue.

    =-=-= EDIT
    Running an older version of proploader allows success... (proploader v1.9.3 versus pro-load v1.9.3-4)
    =-=-=-=-=-=
    Testing by adding "-v" to flexprop's "Configure Commands" WiFi Run Command

    "%D/bin/proploader" -k -2 -D baud-rate=%r %P "%B" -r %9 -q -v
    

    gives me a little more detail:

    $ proploader -k -2 -D baud-rate=230400 -i 192.168.1.240 $HOME/flexprop/samples/blink1.binary -r -9 $HOME/flexprop/samples -q -v
    
    Opening file '$HOME/flexprop/samples/blink1.binary'
    Downloading file to port 192.168.1.240
    b) Load Image to Chip Version = P2
    Open telnet connection status 0k
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    Receive response failed
    reset request failed
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    base encode new size 2585 orig 1936
    enc removed = at 2582
    enc removed = at 2583
    download failed!
    b) Load done!
    ERROR: Download failed
    

    A second test, with a slightly different result (P1-fast-loader disabled)

    % proploader -k -D chipver=P2 -D baud-rate=230400 -i 192.168.1.240 $HOME/flexprop/samples/blink38.binary -r -9 $HOME/flexprop/samples -q -v
    Opening file '$HOME/flexprop/samples/blink38.binary'
    Chip Version set to P2 and P1-fast-loader disabled
    Downloading file to port 192.168.1.240
    b) Load Image to Chip Version = P2
    Open telnet connection status 0k
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    Receive response failed
    reset request failed
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    p2ChipVersion request failed
    p2ChipVersion request failed
    
    base encode new size 2585 orig 1936
    enc removed = at 2582
    enc removed = at 2583
    download failed!
    b) Load done!
    ERROR: Download failed
    

    WiFI Module settings

    Does this help?

  • Thanks for your detailed explanation. I think I will have to give up on this for a while and work with a Prop plug connection.

    Ray

  • Apologies for carrying on such an old thread, but this seems like an issue that should be sorted out!

    I just tried uploading a simple file with Proploader and noticed the same issue reported above.

    I'm currently using this version: PropLoader (totalspectrum branch) v1.9-14 (2022-06-15 13:13:46 g64d6321)

    I've experimented with a couple other recent versions of proploader and found the same problem.

    proploader -v -R -D reset=13 p2-flash56.bin
    Opening file 'p2-flash56.bin'
    From 192.168.168.181 got: { "name": "wx-f9f212", "description": "", "reset pin": "13", "rx pullup": "disabled", "mac address": "18:fe:34:f9:f2:12" }
    
    generateResetSignal - Chip Version = P2
    fastLoaderClockSpeed -43665880, fastLoadClockMode 00, clockSpeed -43665880, clockMode 00
    

    One immediate issue I could see... regardless of the reset-pin setting in the WiFi module GUI, proploader programming attempts always use reset pin 12, as viewed in the WiFi module debug log and confirmed by scope at the pin. In the cmd line response above, we see the JSON style reply includes the reset pin 13 (to WiFi module reports it's settings), but then proploader (or something in the programming chain) still uses pin 12.

    Does anyone know if those "fastLoaderClockSpeed" numbers look correct ? I wasn't aware P2 used that feature.. maybe that's another issue? Is the proploader failing to switch to P2 mode? We used to have a -2 parameter, but that's not recognised now.

  • Hi @ersmith

    Could I ask your help with proploader?

    Reference to @dgately findings #20 above, that v.1.9.3 proploader was able to wirelessly program P2, but v.1.9.3-4 onwards are not.
    https://forums.parallax.com/discussion/comment/1555900/#Comment_1555900

    Are you able to say what might have changed between those two proploader versions ?

    If anything needs adjusting on the wifi module side, then no problem I can do that quickly.
    I'm wondering if the log error "p2ChipVersion request failed" gives a clue.... is that a url command that is being ignored?

    I can see this being called on the wifi debug log, although that's the wifi firmware version, not the P2:

    URL = /wx/setting?name=version
    148012> GET args = name=version
    148012> GET 'version' --> 'v1.63 (2024-12-09 22:14:01 0-g1a5cf60)'
    
  • ersmithersmith Posts: 6,068

    @VonSzarvas I don't know what's going on there, but I do see from the log that there were some timeout tweaks and a MacOS bug fix after the version you seem to be using. The one I have reports its version as PropLoader (totalspectrum branch) v1.9.4 (2023-12-01 15:59:32) and it works for me.

  • @ersmith said:
    @VonSzarvas I don't know what's going on there, but I do see from the log that there were some timeout tweaks and a MacOS bug fix after the version you seem to be using. The one I have reports its version as PropLoader (totalspectrum branch) v1.9.4 (2023-12-01 15:59:32) and it works for me.

    Thank you Eric.
    That newer version works as expected.
    (And actually version 14 also worked after adding the -2 param that sleepiness had me remove!)

    The older versions seemed to be mixing P1 and P2 loaders somehow -- anyway-- doesn't matter. The latest proploader version is all good- Thank you again.

    This will be included with some P2LF content tomorrow.

    Michael.

Sign In or Register to comment.