Net+OS 7.0 Isues

In lieu of waiting for official 7.0 forums, this seemed like the best place for questions about 7.0.

  1. Why is it that building a project so often requires building the BSP? This takes forever.

  2. Why isn’t the UDP port an option for STDIO, instead of serial?

  3. How can you build a project for an ME module that uses the serial port without conflicts?

Example: Create a new project leaving Serial Console Port to COM1, checking only Web Server and FTP server, and leaving STDIO and Dialog Port set to Serial Port A. This application can be loaded into the development board and will run fine. Now create another project, with STDIO and Dialog Port set to None. This application hangs before calling applicationStart(). Placing a breakpoint in applicationTcpDown() shows a thread called Serial Monitor, which might be the problem (no Dialog Port?). This is my big killer right now, since the code I want to load uses Serial Port A on my ME module and there is no Serial Port B on non-jtag modules. Also, the same thing (hangup before applicationStart() ) happens if I select Serial Port B for STDIO and Dialog Port. Only when both are set to Serial Port A does the application run. Note that I have not changed any source files or the appconf.h file, this project is exactly as created by the New Project Wizard.

  1. None of the porting guides cover the changes to web layout. Anything on deck in this area? Changing from the format used by the weatherstation demo to the new layout looks daunting. Also, has it been fixed where PBuilder would not correctly handle files with different roots? With 6.0 and 6.3, everything had to be beneath …/pbuilder/html, trying to add anything above that folder into list.bat didn’t work. I had to build a script to move the right files into that structure before building (95% of pages were common to about 7 projects, only a few were different, so it made no sense to duplicate the 95% across 7 projects).

  2. Speaking of multiple projects sharing common code, any idea of how to manage that with DigiESP? I would like to have a base project that is shared by multiple variant projects that differ only by a couple of files (appconf.h, a few .c files, a few .htm files). Before, I put my variant parts under the common root, and modified my Makefile (plus the aforementioned scripts) to handle this new directory structure. DigiESP doesn’t like this arrangement, because then all the variants are included as part of the common project causing conflicts.

  1. Bind Errors - Using this call, I am getting an error from bind.

struct sockaddr_in TheUdpAddress;
TheUdpAddress.sin_family = AF_INET;
TheUdpAddress.sin_addr.s_addr = htonl(INADDR_ANY);
TheUdpAddress.sin_port = htons(MY_PORT);

TheUdpSocket = socket(AF_INET, SOCK_DGRAM, 0);

CallStatus = bind(TheUdpSocket,
(struct sockaddr *)&TheUdpAddress,
sizeof(TheUdpAddress));

if(CallStatus < 0)
{
int err;
err = getErrno();
dgSyslog(“udp_BindASocket CallStatus = %d, err = %X (%s)”, CallStatus, err, ErrorToText(err));
return -1;
}

CallStatus is -1, and err is 0x16. I can’t find what 0x16 means anywhere in the documentation or source code.

Any ideas?

Some answers:

  1. this is going to be fixed in v7.1
  2. not sure
  3. the way the CLI has been designed is to use some API that makes it uncompatible with the concurrent use as a STDIO.
    However, you can create your own serial port parser for the user command, I have done it and it’s definitely easy and there is a lot of code in the Net easily portable.
  4. check the Advanced_Web_Server_Toolkit.pdf document
  5. I believe this is not possible at the moment

-PC

Hi jwormsley
I too am attempting to use the serial port without having dialog data on NET+OS 7.0. As you say if Dialog is disabled then the application just hangs.

I have the added complexity of when the dialog data gets sent out for the CLI to change settings the device that the ME is being connected to echos back data so the unit goes into meltdown.

I am strugeling to find a solution has anyone out there managed to fix this ?

For your point 5) :
You can create a “Simple Make C Porject” called COMMON (for example), and make you main project dependant of this new project.

However, it won’t work if your COMMON project need files from your main project…

Paul

> However, it won’t work if your COMMON project need files from your main project…

Unfortunately, that’s the case.

OK I found a way to do it.

With the appconf.h the data that is entered when the Dialog port is disabled in the NET+OS config wizard is incorrect. the define
#define APP_DIALOG_PORT “”
is created when really all the tests in the code look for a value of 0 so replace it with
#define APP_DIALOG_PORT 0

and all is happy. The problem occurs because all the test code looks at an empty string and decides that is valid and allows an attempt to open the com port “” this is where it fails and goes into an os ERROR which you can’t get out of. Thats where you see the hang.

I am now sucessfully booting without STDIO and Dialog.

Phew!!!

Thanks for the tip. I’d been just commenting out the whole #define, seemed to have the same effect.

Some other things to look out for. If you want a file system, you have to manually define the APP_FILE_SYSTEM #define, and the #defines in appservices.h rarely if ever match your selections.