Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - masud58

1
General discussion / Dangerous Helpfull
Dear all,

Dangerous Prototypes help me a lot. i am exited with my next project, i want to order at least 1 pcs for all  microchip item. because in our country we cant get it easily. please give me a space to contribute with you.

Thanks
Masud Rana
2
Web platform / Re: Need help with static Ip setup
Hello all.

I have customize code above for my requirement.
7 IO for relay(led). 1 IO for heartbeat. i have also edit demo web page with password protection.

in HardwareProfile

Code: [Select]
// dsPIC33F processor
#define GetSystemClock() 80000000 //Hz
#define GetInstructionClock() (GetSystemClock()/2)
#define GetPeripheralClock() GetInstructionClock()

#define LED0_TRIS TRISAbits.TRISA8
#define LED0_IO LATAbits.LATA8
#define LED1_TRIS TRISAbits.TRISA9
#define LED1_IO LATAbits.LATA9
#define LED2_TRIS TRISCbits.TRISC3
#define LED2_IO LATCbits.LATC3
#define LED3_TRIS TRISCbits.TRISC4
#define LED3_IO LATCbits.LATC4
#define LED4_TRIS TRISCbits.TRISC5
#define LED4_IO LATCbits.LATC5


#define LED5_TRIS TRISBbits.TRISB6
#define LED5_IO LATBbits.LATB6
#define LED6_TRIS TRISBbits.TRISB5
#define LED6_IO LATBbits.LATB5
#define LED7_TRIS TRISBbits.TRISB8
#define LED7_IO LATBbits.LATB8


//#define BUTTON0_TRIS TRISBbits.TRISB6
//#define BUTTON0_IO PORTBbits.RB6
//#define BUTTON1_TRIS TRISBbits.TRISB5
//#define BUTTON1_IO                       PORTBbits.RB5
//#define BUTTON2_TRIS TRISBbits.TRISB8
//#define BUTTON2_IO PORTBbits.RB8
//#define BUTTON3_TRIS TRISBbits.TRISB7
//#define BUTTON3_IO PORTBbits.RB7

#define LED_GET() (0)
#define LED_PUT(a)


in CustomHTTPApp

Code: [Select]
/****************************************************************************
  Section:
GET Form Handlers
  ***************************************************************************/
 
/*****************************************************************************
  Function:
HTTP_IO_RESULT HTTPExecuteGet(void)

  Internal:
  See documentation in the TCP/IP Stack API or HTTP2.h for details.
  ***************************************************************************/
HTTP_IO_RESULT HTTPExecuteGet(void)
{
BYTE *ptr;
BYTE filename[20];

// Load the file name
// Make sure BYTE filename[] above is large enough for your longest name
MPFSGetFilename(curHTTP.file, filename, 20);

// If its the forms.htm page
if(!memcmppgm2ram(filename, "forms.htm", 9))
{
// Seek out each of the four LED strings, and if it exists set the LED states


ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led7");
if(ptr)
LED7_IO = (*ptr == '1');


ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led6");
if(ptr)
LED6_IO = (*ptr == '1');


ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led5");
if(ptr)
LED5_IO = (*ptr == '1');


ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led4");
if(ptr)
LED4_IO = (*ptr == '1');

ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led3");
if(ptr)
LED3_IO = (*ptr == '1');

ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led2");
if(ptr)
LED2_IO = (*ptr == '1');

ptr = HTTPGetROMArg(curHTTP.data, (ROM BYTE *)"led1");
if(ptr)
LED1_IO = (*ptr == '1');
}

// If it's the LED updater file

[attachment=1]
[attachment=0]
3
Web platform / Re: Need help with static Ip setup
Thanks

our culture didnt permits enjoy alone. you are all invited. now i am going for webpage template. which is compatible with wp all io pin. on/off switch with status call back. i want to control array of  relay and one adc . any idea ? 
4
Web platform / Re: Need help with static Ip setup
Its  my fault. I dint check my Lan card ip setup. when i change wp ip to similar (not same)with my Lan card. its work without IPphone. its a basic error.  so sorry for that. but i learned more. but i cant write step by step. because Ronz point out . about my english.  i am not an tcp/ip expert. i am working on power environment. now its time to go for freedom of web platform. Thanks Ian , Ronz,  Trev ,  another request to Ian, Please Change Dangerous. because  its hurt me when i was go for custom clear. anyway many many thanks.
7
Web platform / Re: Need help with static Ip setup
Thanks for your taking challenge. my connection is as above.

pc Lan card to hub port 1. which ip is 192.168.2.3

web platform to hub port2. which ip is 192.168.2.2

IP Phone to hub port 3. which ip is 192.168.2.1   its like a server with dhcp enable. bcause i dont know. Grandstream Handy tone 486.

nothing are connected on that network.  if i unplugged IP phone all network stop. i have attached capture file from winshark.

 
thanks
masud

if i change mac add for another thats work. and its get ip 192.168.2.4   another thanks for point  out.
8
Web platform / Re: Need help with static Ip setup
wow . I cant express my fillings behave of you. many many thanks.

yes its true that its not for hobby. i will follow your guide. let me time to check all procedure. also i am not expert about that. i can show you all thing with debuging. please wait.

Thanks
masud
9
Web platform / Re: Need help with static Ip setup
[quote author="Trev"]
I never had any luck getting the web config  page to work, but as DHCP worked, I didn't spend a lot of time on it.
[/quote]

Thanks for your information. where should i change code for fixed ip . i am so confused. please help

thanks
10
Web platform / Re: Need help with static Ip setup
Thanks for fast reply.

yes i have also change that way but not work. Can u help with your code where i can format eeprom. or how can i change ip from web page . please see attach.
11
Web platform / Need help with static Ip setup
Dear all.

I have get 4 PCS web platform v1.1. all are well with factory setting and own compile. now i want to assign static ip for that. when i have disable #define STACK_USE_DHCP_CLIENT and AppConfig.Flags.bIsDHCPEnabled = TRUE; to AppConfig.Flags.bIsDHCPEnabled = FALSE; its not working. i am also confuse about eeprom, its not format with new ip . how can i get out from this problem?

thanks
Masud

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01462387216session_write_close ( )...(null):0
20.01502518816ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01502519592Database_MySQL->query( ).../DatabaseHandler.php:119
40.05962658328Database_MySQL->error( ).../Db-mysql.class.php:273