Notifications
Clear all

Nodemcu V3 upload problem

30 Posts
4 Users
4 Likes
1,116 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@onearm I can't check a Linux setup as mine is packed away but I am fairly sure that second library you mentioned is a result of a manual install done wrong.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@onearm The libraries are in the same place as far as I can see.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1678
 

Hi @onearm,

re: To make clearing of libraries easier, where should they be to avoid confusion?

 Sorry. I am probably not the best person to answer the question. I have tried to have a quick Google, but haven't found anything helpful yet.

I did find some stuff in the Arduino docs ..

e.g https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library

which describe the basic process, although you probably already know that,

and also some about how to write a library. I don't think the latter is appropriate, but it implied that some of the details of the structure and contents of a library have evolved several times from say Arduino 1.5 through to Arduino 2.0x, but so far as possible, I had the impression that they have tried to limit any changes to adding functionality with the later versions, rather than any massive changes. Although it discussed the file structure of an individual library, I didn't see anything about the location of the whole library sub-tree.

However, if the library manager is going to find it, then presumably the range of places to look will need to be small.

Of course, if you have manually installed any libraries, without using the library manager, then I guess there are no limits as to where the libraries could be located???

--------------------------------------------------------------------------------------------

Bearing in mind, I haven't done much with ESP32 on the machine I looked at, and I haven't tried to run the code you are interested in, I did a quick 'locate -i wifi.h' on a Ubuntu 22.04 box, with both Arduino 1.8.19 and Arduino 2.1.0. Whether, this will tell you much, I don't know. I do not claim this is 'correct' in any sense.

The list of files are found are in the attached file

 There are a couple of odd entries at the bottom of the list, that may have nothing to do with the Arduino system 'in action', so I would ignore them.

Otherwise there seems to be two destination groups:

  ~/.arduino15/packages/....

  ~/Arduino/hardware/..

 

I am assuming Arduino 2.x uses both of these groups, though I confess I haven't worked out any details.

----------------------------------------------------------------------

As for your best way forward, then I probably would start by trying to cleanout using the library manager if you can remember what you added, but I wouldn't recommend spending too long on this process.

If that doesn't seem to help much, then I would be tempted to wipe the whole Arduino installation and reinstall from scratch. Obviously, you should save copies of any sketches you have written (???.ino), etc, that you would like to reuse before such a drastic action.

Then try following Bill's instructions ... if it starts being troublesome, post a new thread start, providing the full details etc.

---------------------------------------------

Good luck.. I hope it goes well for you, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@davee @onearm CAN YOU BOTH HEAR ME????????

You don't need to know. It's AUTOMATIC.

If the Library is an official Library, you simply click Install on the Library menu. see pic. I searched for a Cloud Library as an example.

If it's not an official then you locate it on github and download the zip file. Then you use the IDE to do a Sketch/Include Library/Add .ZIP Library... see pic

HOWEVER your original post was for the WiFi.h. That Library is a part of the IDE. I showed you many posts ago that I could compile your sketch with NO WiFi.h in my 'libraries' folder.

Screenshot 2023 05 21 at 16.53.26
Screenshot 2023 05 21 at 16.53.39

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1678
 

Hi Ron @zander,

   RE: your reply starting "The fact that he found an instance of WiFi.h "

I certainly agree with the general sentiment of your answer, though I confess to not having looked deeply enough at some of the detail.  .. Frankly, I think the Arduino library and .h file system is a mess. Of course, there is a lot of merit in what it achieves, but this is a definite Achilles heel.

Perhaps, if it is used in a very disciplined or limited manner, then it works. But as it is clearly designed for 'beginners', then having a system that has multiple files of the same name, but with no obvious checking or disambiguration mechanism feels like driving a car, knowing all the wheel nuts are loose. 

----------------

I do have one or two options to follow this up more closely, but at the moment my general thoughts are in other areas. Hence, I am not in a position to give a 'simple' answer.

I have previously followed a similar path of identifying the .h files actually being used, when I had somewhat similar experiences playing with the ESP32-CAM. It is possible to follow the path through, but it isn't easy, as one .h file often calls up several  more .h files ... and they too can consist of multiple possibilities.

Combine this, with the fact that most beginners have not met classes, methods, and other C++ stuff, and the result is confusion, not simplicity.

Maybe, there is a simple answer, but I haven't found it yet.

-----

Hope your move and health are both going well.

Best wishes my friend. Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@davee Let me help you to understand.

I certainly agree with the general sentiment of your answer, though I confess to not having looked deeply enough at some of the detail.  .. Frankly, I think the Arduino library and .h file system is a mess. Of course, there is a lot of merit in what it achieves, but this is a definite Achilles heel.

Not a mess. Actually very standard way of organizing libraries for any system I have ever encountered other than the most primitive.

Perhaps, if it is used in a very disciplined or limited manner, then it works. But as it is clearly designed for 'beginners', then having a system that has multiple files of the same name, but with no obvious checking or disambiguration mechanism feels like driving a car, knowing all the wheel nuts are loose. 

The 'disambiguation' mechanism is the Board selector. Picking esp32 gets you the correct version of the WiFi.h file. It is brilliant in it's simplicity however I am biased as I used a similar technique in my award winning IBM software development environment I invented.

As I have stated and documented several times, with NO WiFi.h file in your personal Libraries folder, the esp32 WiFiScan sketch compiles clean, and the compile output even tells you where it found the file. It is IN the files supplied by the board manager. See pic.

Screenshot 2023 05 21 at 17.25.15

 

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@onearm)
Member
Joined: 12 months ago
Posts: 9
Topic starter  

@zander Good morning all and thanks for the help.

I have decided that after persistent issues with Manjaro, it's time to reformat the hard drive and start afresh. Drastic measure I know, but I can start everything from scratch.

I'll be back in a few days, stay safe.

Cheers

Brian.

This post was modified 11 months ago 2 times by ONEARM

If you can't be bothered to keep learning and helping others in life, you may as well put the other foot in the grave.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@onearm Ok, good luck with that, but understand that has nothing to do with your simple compile error. As I showed you the sketch compiles clean with NO need of library additions, the esp32 board has WiFi on the board and software support in the IDE.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@onearm)
Member
Joined: 12 months ago
Posts: 9
Topic starter  

Yes, I understand that Ron, but there are other issues with failing to syncronise databases so upgrades won't install and in my mind may lead to other complications. It appears Manjaro does not have dialup groups, so some WiFi sketches may not work from what I understand.

My knowledge of Linux is very, very limited!

If you can't be bothered to keep learning and helping others in life, you may as well put the other foot in the grave.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@onearm You and me both, I play with it now and again and will do so more later after I get moved. However, to the best of my knowledge the OS matters very little to the Arduino environment. True the IDE and associated directory tree may be located at a different point in the OS tree, but from the Arduino15 sub tree down they will be identical. The WiFi.h file is part of the board directory, I can see it on my Mac because I run in admin mode (I know, foolish but after 60 odd years old habits die hard)

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1678
 

Hi @onearm and Ron @zander,

  I see (onearm) you have decide to do a refresh of Linux upwards .. more drastic than I was expecting, but if you have some Linux problems as well, then this is probably a good time to fix them as well.

   I don't want to confuse you any more, but I as I have an ESP32 CAM board, and a Ubuntu 22.04 Linux box with Arduino 2.1, I have been able to compile link and run the WiFiScan example, straight from the Arduino examples directory. Hopefully this gives you some confidence of future success.

Some time ago, I followed Bill's ESP32 CAM video/blog instructions ( https://dronebotworkshop.com/esp32-cam-intro/) to the letter in terms of installing the correct ESP32 support, so I didn't need to use the library manager  today.

I am sure if you follow Bill's or Ron's instructions, assuming the board you have, matches the board and instructions you are selecting, you will ultimately be successful.

Good luck and best wishes to you both, Dave


   
Ron reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1678
 

Hi @onearm,

Re: It appears Manjaro does not have dialup groups

I have used several different USB-to-circuit boards, including ESP32-CAM, and each one has had its own 'features' that need to be fixed, each usually needing different fixes in Ubuntu and Windows. Hence, I can't remember which board needed which fix.

However, my Ubuntu box has a group called dialout with a single member of dave, my username.

I vaguely remember Googling for how to add myself to the group, and maybe also how to create the group. Sorry, I don't remember the exact details, but it was only one or two simple commands in a terminal window, almost certainly involving sudo. I would assume the same applies to Manjaro.

The command groups (in terminal window) will list the groups on your system

and members dialout will show who is a member of the group dialout

Both members and groups are presently on my system, but you may have to install them using your flavour of Linux's application manager.

------------

A second problem I saw, but maybe with non-Arduino boards, is a clash in the USB identification numbers between the board I was trying to connect, and the predefined allocation for a Braille machine in Ubuntu's standard installation. This showed up in the Ubuntu system event log file ... when the USB plug was inserted, it would initially recognise it, but a second or two later, abort the connection process. The fix was to remove the existing allocation and add a new one. Again, Google was my guide. Hopefully, this will not be a problem to you, but if you have a problem with a new USB device, it is worth looking in the system event log file to see what is going on.

--------

Good luck, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@davee FYI @onearm Regarding the following

Both members and groups are presently on my system, but you may have to install them using your flavour of Linux's application manager.

That is standard *nix stuff, nothing to do with 'application manager' (don't really know what that is) just go to terminal and do a 'apropos group' and 'apropos member'. Those commands will reveal what terminal commands are available for your flavour of Unix/Linux that I refer to collectively as *nix. Simply pick what appears to be a possible useful tool and do a man for it to see if that is what you need. I would start with listing the groups and users/members already configured and I bet the dialout or similar is already set up by default.

I think Dave has already figured out most of that for his system, but for @onearm this might help.

Good luck.

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1678
 

Ron @zander (and @onearm),

As you know, Linux often has a number of different programs for utility functions, such as groups and members, to do essentially the same job, so only a subset usually get installed in the common distributions. 

Hence, most distributions support one or more programs to simplify the installation of programs, which is what I meant by the term 'application manager'.

Thus by 'application manager', I meant a generic name for programs like apt, synaptic, and so on .. ie a program to install other. Different Linux distributions tend to have several different programs for this task. Perhaps there is a better term?

------------

I have never used 'apropos' .. in fact I didn't even know what it did ... maybe I'll try it in the future, but obviously the bare commands (groups and members) do the essential job on their own.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6959
 

@davee fyi @onearm I fear we are spiralling down into the rabbit hole of *nix so I will keep this short.

Different distros most certainly like to put their own spin on things like installers and user management but sometimes leave the basic Linux commands in place for those comfortable with the command line. 

Better term? Not really, that is also something some distros play with. I understand what you are getting at, I just hardly use them as I am friends with the command line/terminal approach.

Apropos even works on my laptop which is running MacOS which is just a fancy GUI on top of BSD Unix. I think it will also work on Windows 10/11 at the command line prompt. Try 'apropos groups' or even 'man groups' to test. If groups is not understood try something like 'man ls'. I will bet a large coffee it works as Msft has been moving towards better *nix support since friends of mine showed them the light (long story, NDA prevents me saying more)

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
DaveE reacted
ReplyQuote
Page 2 / 2