Additional library for MikroBasic PRO 2009
Additional library for MikroBasic PRO 2009
Hello all,
Additional library for MikroBasic PRO 2009 are available here :
http://www.microelemente.ro/MikroBasic/ ... y_V1_2.zip
This setup will install the following files in \Uses\P18 folder :
all_digital.mbas
Bit_Lib.mcl
Bootloader_lib_V7_ZABBIX_64K.mcl
Bootloader_lib_V7_ZABBIX_96K.mcl
Bootloader_lib_V7_ZABBIX_128K.mcl
CAN_lib.mcl
definitions_enc.mcl
Flash_Mem_Library.mcl
Frecv_lib_P18.mcl
lib1_18f97j60_v3_5.mcl
lib1_enc28j60_v3_5.mcl
lib2_18F97J60_V3_5.mcl
lib2_enc28j60_V3_5.mcl
lib1_18f97j60_v3_4.mcl
lib1_enc28j60_v3_4.mcl
lib2_18F97J60_V3_4.mcl
lib2_enc28j60_V3_4.mcl
Lib_Delays_LIO.mbas
onewire_base.mcl
pic_additional_string_library.mcl
SDMMC_SPI1.mcl
SDMMC_SPI2.mcl
sensirion_lib_P18.mcl
snmp_library_user.mcl
Termal_Library_My.mcl
PPS_Library.mcl
MB_PRO_Library_V1_2_Uninstall.exe
Examples for this libraries will be available soon.
Enjoy!
Additional library for MikroBasic PRO 2009 are available here :
http://www.microelemente.ro/MikroBasic/ ... y_V1_2.zip
This setup will install the following files in \Uses\P18 folder :
all_digital.mbas
Bit_Lib.mcl
Bootloader_lib_V7_ZABBIX_64K.mcl
Bootloader_lib_V7_ZABBIX_96K.mcl
Bootloader_lib_V7_ZABBIX_128K.mcl
CAN_lib.mcl
definitions_enc.mcl
Flash_Mem_Library.mcl
Frecv_lib_P18.mcl
lib1_18f97j60_v3_5.mcl
lib1_enc28j60_v3_5.mcl
lib2_18F97J60_V3_5.mcl
lib2_enc28j60_V3_5.mcl
lib1_18f97j60_v3_4.mcl
lib1_enc28j60_v3_4.mcl
lib2_18F97J60_V3_4.mcl
lib2_enc28j60_V3_4.mcl
Lib_Delays_LIO.mbas
onewire_base.mcl
pic_additional_string_library.mcl
SDMMC_SPI1.mcl
SDMMC_SPI2.mcl
sensirion_lib_P18.mcl
snmp_library_user.mcl
Termal_Library_My.mcl
PPS_Library.mcl
MB_PRO_Library_V1_2_Uninstall.exe
Examples for this libraries will be available soon.
Enjoy!
Last edited by yo2lio on 19 May 2009 11:08, edited 1 time in total.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
-
- Posts: 10
- Joined: 28 Jun 2005 05:14
- Location: Mexico DF
- Contact:
Mix of libraries
I have some questions
1.- I cant find a dns resolver in your library, then can i use ME function for this case?
2.- Why are the best use for send_tcp? my app try to send a http request to server, in two different ways, the first :
dim header as String[100]
str2ip("my ip address",my_app);
i'm looking for ip via http at remote server
tcp_open(5000)
open_tcp_conection(my_app,80,5000)
cadena="GET /resolve_exe?arg=ciasamx.com"+ chr(13)+chr(10)+ "host: www.tracert.com" + chr(13) + chr(10)
send_tcp(my_app,80,str_len(cadena),cadena)
......
......
close tcp_conection(my_app)
tcp_close_port(5020)
then in the enc_lib_user
in eth_user_tcp:
when source port = 5000 then call my own function
.......
........
in my own function:
i get the response from server, etc
but server response 400 bad request javascript:emoticon(':shock:')
i try the same example from telnet some like:
telnet www.tracert.com 80
GET /resolve_exe?arg=ciasamx.com + CR
host: www.tracert.com + CR + CR
and i get the IP from the the request
in the other way
tcp_open(5000)
open_tcp_conection(my_app,80,5000)
......
......
then in the enc_lib_user
in eth_user_tcp:
when source port = 5000 then call my own function
.......
........
in my own function:
cadena="GET /resolve_exe?arg=ciasamx.com"+ chr(13)+chr(10)+ "host: www.tracert.com" + chr(13) + chr(10)
send_tcp(my_app,80,str_len(cadena,cadena)
goto end rutine
exit
end_rutine:
Socket[j].RAM_ROM=0
Socket[j].Start_addr=@cadena
Socket[j].Stop_addr=@cadena + str_len(cadena)
end sub
in this case i never get response or conection to port 5000 from server i tes if the conection is alive in tcp socket at server side and i see it in netstat at server side it s status is established javascript:emoticon(':(')
Thanks for your kind attention
1.- I cant find a dns resolver in your library, then can i use ME function for this case?
2.- Why are the best use for send_tcp? my app try to send a http request to server, in two different ways, the first :
dim header as String[100]
str2ip("my ip address",my_app);
i'm looking for ip via http at remote server
tcp_open(5000)
open_tcp_conection(my_app,80,5000)
cadena="GET /resolve_exe?arg=ciasamx.com"+ chr(13)+chr(10)+ "host: www.tracert.com" + chr(13) + chr(10)
send_tcp(my_app,80,str_len(cadena),cadena)
......
......
close tcp_conection(my_app)
tcp_close_port(5020)
then in the enc_lib_user
in eth_user_tcp:
when source port = 5000 then call my own function
.......
........
in my own function:
i get the response from server, etc
but server response 400 bad request javascript:emoticon(':shock:')
i try the same example from telnet some like:
telnet www.tracert.com 80
GET /resolve_exe?arg=ciasamx.com + CR
host: www.tracert.com + CR + CR
and i get the IP from the the request
in the other way
tcp_open(5000)
open_tcp_conection(my_app,80,5000)
......
......
then in the enc_lib_user
in eth_user_tcp:
when source port = 5000 then call my own function
.......
........
in my own function:
cadena="GET /resolve_exe?arg=ciasamx.com"+ chr(13)+chr(10)+ "host: www.tracert.com" + chr(13) + chr(10)
send_tcp(my_app,80,str_len(cadena,cadena)
goto end rutine
exit
end_rutine:
Socket[j].RAM_ROM=0
Socket[j].Start_addr=@cadena
Socket[j].Stop_addr=@cadena + str_len(cadena)
end sub
in this case i never get response or conection to port 5000 from server i tes if the conection is alive in tcp socket at server side and i see it in netstat at server side it s status is established javascript:emoticon(':(')
Thanks for your kind attention
Hello,
Examples for library will be available soon.
Till then, I will show you the routine for preparing HTTP data :
Examples for library will be available soon.
Till then, I will show you the routine for preparing HTTP data :
Code: Select all
include pic_additional_string_library
dim http_send as string[1024]
device_id as word ' some variable
ntp as longword ' some variable
host_name as string[64] 'test.yahoo.com
http_send_port as word
sub procedure PrepareHTTPdata
dim txt_buf as string[64]
EOL as string[2]
EOL[0] = $0D
EOL[1] = $0A
EOL[2] = 0
http_send ="GET /achizitie1.php?ID="
Word2Str(device_id,txt_buf)
Str_Cat(http_send,txt_buf)
txt_buf ="&Ntp="
Str_Cat(http_send,txt_buf)
LongWord2Str(ntp,txt_buf)
Str_Cat(http_send,txt_buf)
txt_buf ="&status=1 HTTP/1.1"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Host: "
Str_Cat(txt_buf,host_name)
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="User-Agent: my user agent name"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Accept: text/html"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Accept-Language: en-us,enq=0.5"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Accept-Encoding: deflate"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Accept-Charset: ISO-8859-1"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Keep-Alive: 300"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
txt_buf ="Connection: keep-alive"
Str_Cat(http_send,txt_buf)
Str_Cat(http_send,EOL)
Str_Cat(http_send,EOL)
end sub
main:
PrepareHTTPdata
if inc(http_send_port) > 60000 then http_send_port = 5000 end if ' increment my port
TCP_Open_Port(http_send_port)
if Open_TCP_Connection(http_server_address, 80, http_send_port) then
Send_TCP(http_server_address, 80, Str_Len(http_send), http_send)
Close_TCP_Connection(http_server_address, 80);
end if
TCP_Close_Port(http_send_port)
end.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
-
- Posts: 10
- Joined: 28 Jun 2005 05:14
- Location: Mexico DF
- Contact:
Send TCP
Thanks for your fast response latter i try the code, great work
Library updated. See first post...
Added support for Ethernet Library V3_4.
Added support for Peripheral Pin Select, thanks to JPC.
The Ethernet Library V3_4 is V3_5 without TCP/IP stack.
Include also DHCP, DNS and firewall policy. Be careful at opened ports... See V3_5 example.
Before installations you must uninstall old version with MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder.
Added support for Ethernet Library V3_4.
Added support for Peripheral Pin Select, thanks to JPC.
The Ethernet Library V3_4 is V3_5 without TCP/IP stack.
Include also DHCP, DNS and firewall policy. Be careful at opened ports... See V3_5 example.
Before installations you must uninstall old version with MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
hI
Im new to MikroBasic Pro and was wondering if somebody clarify how to update my download with the new Lib. I dont know whats installed where to be honest. I saw the following post below from the Mikro Team
"Before installations you must uninstall old version with MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder "
Regards
Alan
Im new to MikroBasic Pro and was wondering if somebody clarify how to update my download with the new Lib. I dont know whats installed where to be honest. I saw the following post below from the Mikro Team
"Before installations you must uninstall old version with MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder "
Regards
Alan
Hello Alan,Alan_c wrote:Im new to MikroBasic Pro and was wondering if somebody clarify how to update my download with the new Lib. I dont know whats installed where to be honest. I saw the following post below from the Mikro Team
"Before installations you must uninstall old version with MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder "
I want to clarify one thing:
This library "Additional library for MikroBasic PRO 2009" is made by me and I use this in all my applications.
Practically I share my work and experience with you.
If something goes wrong (the library don't work like expected) I'm guilty for this not Mikroe Team !
At this moment, this library, (MB version) is not documented and I don't have examples for this.
I have examples only for MikroPascal version: http://www.mikroe.com/forum/viewtopic.php?t=19970
I will do my best to make some documentation and examples.
About your problem, before a new installation, you must uninstall old version only if you used old version before.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
Hi
I have downloaded the additional lib from the link
however looking into my Uses folder I do not find the unintall
function as mentioned to uninstall the old lib
MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder "
I have only .mcl files in this folder any help appreciated
Regards
P.Erasmus
I have downloaded the additional lib from the link
however looking into my Uses folder I do not find the unintall
function as mentioned to uninstall the old lib
MB_PRO_Library_V1_1_Uninstall.exe from /Uses/P18 folder "
I have only .mcl files in this folder any help appreciated
Regards
P.Erasmus
P.Erasmus
Saratov,Russia
--------------------------------------------------------------
Saratov,Russia
--------------------------------------------------------------
Examples and documentations for this libraries (for now in MikroPascal only) are available here :
http://www.microelemente.ro/MikroPascal ... xample.zip
http://www.microelemente.ro/MikroPascal ... xample.zip
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
yo2lio
Thank you for makeing your extended Lib available to us working with the
mE compilers ,
It is very kind of you and it helps people like me who can not write these type of function myself ,it helps us to speed up our work and it makes the compiler very good
Best regards
Peter
Thank you for makeing your extended Lib available to us working with the
mE compilers ,
It is very kind of you and it helps people like me who can not write these type of function myself ,it helps us to speed up our work and it makes the compiler very good
Best regards
Peter
P.Erasmus
Saratov,Russia
--------------------------------------------------------------
Saratov,Russia
--------------------------------------------------------------
Hello all,
Additional library for MikroBasic PRO 2009 are available here :
http://www.microelemente.ro/MikroBasic/ ... y_V1_3.zip
This setup will install the following files in \Uses\P18 folder :
all_digital.mpas
Bit_Lib.mcl
Bootloader_lib_V7_ZABBIX_64K.mcl
Bootloader_lib_V7_ZABBIX_96K.mcl
Bootloader_lib_V7_ZABBIX_128K.mcl
CAN_lib.mcl
definitions_enc.mcl
Flash_Mem_Library.mcl
Frecv_lib_P18.mcl
lib1_18f97j60_v3_5.mcl
lib1_enc28j60_v3_5.mcl
lib2_18F97J60_V3_5.mcl
lib2_enc28j60_V3_5.mcl
lib1_18f97j60_v3_4.mcl
lib1_enc28j60_v3_4.mcl
lib2_18F97J60_V3_4.mcl
lib2_enc28j60_V3_4.mcl
Lib_Delays_LIO.mpas
onewire_base.mcl
pic_additional_string_library.mcl
SDMMC_SPI1.mcl
SDMMC_SPI2.mcl
sensirion_lib_P18.mcl
snmp_library_user.mcl
snmp_library_user_32.mcl
Termal_Library_My.mcl
PPS_Library.mcl
MP_PRO_Library_V1_3_Uninstall.exe
Examples and documentations for this libraries (for now in MikroPascal only) are available here :
http://www.microelemente.ro/MikroPascal ... xample.zip
added SaveAll procedure in pic_additional_string_library.
call this routine in main and interrupt routine, if you want to save FSRx and PRODx registers in interrupt.
Additional library for MikroBasic PRO 2009 are available here :
http://www.microelemente.ro/MikroBasic/ ... y_V1_3.zip
This setup will install the following files in \Uses\P18 folder :
all_digital.mpas
Bit_Lib.mcl
Bootloader_lib_V7_ZABBIX_64K.mcl
Bootloader_lib_V7_ZABBIX_96K.mcl
Bootloader_lib_V7_ZABBIX_128K.mcl
CAN_lib.mcl
definitions_enc.mcl
Flash_Mem_Library.mcl
Frecv_lib_P18.mcl
lib1_18f97j60_v3_5.mcl
lib1_enc28j60_v3_5.mcl
lib2_18F97J60_V3_5.mcl
lib2_enc28j60_V3_5.mcl
lib1_18f97j60_v3_4.mcl
lib1_enc28j60_v3_4.mcl
lib2_18F97J60_V3_4.mcl
lib2_enc28j60_V3_4.mcl
Lib_Delays_LIO.mpas
onewire_base.mcl
pic_additional_string_library.mcl
SDMMC_SPI1.mcl
SDMMC_SPI2.mcl
sensirion_lib_P18.mcl
snmp_library_user.mcl
snmp_library_user_32.mcl
Termal_Library_My.mcl
PPS_Library.mcl
MP_PRO_Library_V1_3_Uninstall.exe
Examples and documentations for this libraries (for now in MikroPascal only) are available here :
http://www.microelemente.ro/MikroPascal ... xample.zip
added SaveAll procedure in pic_additional_string_library.
call this routine in main and interrupt routine, if you want to save FSRx and PRODx registers in interrupt.
Best regards, Florin Andrei Medrea.
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro
http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/
mail : florin@microelemente.ro